C# Класс Emlid.WindowsIot.Hardware.Components.NxpPca9685.NxpPca9685ChannelValue

NxpPca9685Device channel value.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CalculateLength ( int on, int off ) : int

Calculates PWM length from on (rising) and off (falling) delay/tick values.

CalculateMilliseconds ( float frequency, int length ) : float

Calculates PWM milliseconds from a length and frequency.

Equals ( object obj ) : bool

Compares this object with another by value.

FromByteArray ( byte data, int offset ) : NxpPca9685ChannelValue

Converts a byte array into a value of this type.

FromLength ( int length, int delay ) : NxpPca9685ChannelValue

Creates a value calculated from length and optional delay.

Automatically converts zero length to "always off" and maximum length to "always on".

FromMilliseconds ( float length, float frequency, float delay ) : NxpPca9685ChannelValue

Creates a value calculated from length (given a frequency) and optional delay.

GetHashCode ( ) : int

Returns a hashcode based on the current value of this object.

NxpPca9685ChannelValue ( byte data, int offset ) : System

Creates an instance with the values from a byte array.

NxpPca9685ChannelValue ( int on, int off ) : System

Creates an instance with the specified values

SetBytes ( byte data, int offset ) : void

Sets the value from a byte array.

ToByteArray ( ) : byte[]

Converts all values to a byte array which can be written to the channel.

operator ( ) : bool

Tests two objects of this type for inequality by value.

Защищенные методы

Метод Описание
DoChanged ( ) : void

Fires the Changed event.

Описание методов

CalculateLength() публичный статический Метод

Calculates PWM length from on (rising) and off (falling) delay/tick values.
public static CalculateLength ( int on, int off ) : int
on int
off int
Результат int

CalculateMilliseconds() публичный статический Метод

Calculates PWM milliseconds from a length and frequency.
public static CalculateMilliseconds ( float frequency, int length ) : float
frequency float Frequency in Hz.
length int Length in clock ticks.
Результат float

DoChanged() защищенный Метод

Fires the Changed event.
protected DoChanged ( ) : void
Результат void

Equals() публичный Метод

Compares this object with another by value.
public Equals ( object obj ) : bool
obj object
Результат bool

FromByteArray() публичный статический Метод

Converts a byte array into a value of this type.
public static FromByteArray ( byte data, int offset ) : NxpPca9685ChannelValue
data byte
offset int
Результат NxpPca9685ChannelValue

FromLength() публичный статический Метод

Creates a value calculated from length and optional delay.
Automatically converts zero length to "always off" and maximum length to "always on".
public static FromLength ( int length, int delay ) : NxpPca9685ChannelValue
length int Pulse length in clock ticks, between 0 and .
delay int Optional delay in clock ticks, beteween 0 and .
Результат NxpPca9685ChannelValue

FromMilliseconds() публичный статический Метод

Creates a value calculated from length (given a frequency) and optional delay.
public static FromMilliseconds ( float length, float frequency, float delay ) : NxpPca9685ChannelValue
length float /// Pulse length in milliseconds. Cannot be greater than one clock interval (1000 / frequency). ///
frequency float Clock frequency of the .
delay float Optional delay in milliseconds. Cannot be greater than one clock interval (1000 / frequency).
Результат NxpPca9685ChannelValue

GetHashCode() публичный Метод

Returns a hashcode based on the current value of this object.
public GetHashCode ( ) : int
Результат int

NxpPca9685ChannelValue() публичный Метод

Creates an instance with the values from a byte array.
public NxpPca9685ChannelValue ( byte data, int offset ) : System
data byte
offset int
Результат System

NxpPca9685ChannelValue() публичный Метод

Creates an instance with the specified values
public NxpPca9685ChannelValue ( int on, int off ) : System
on int
off int
Результат System

SetBytes() публичный Метод

Sets the value from a byte array.
public SetBytes ( byte data, int offset ) : void
data byte Data buffer to read from.
offset int Optional offset to read from.
Результат void

ToByteArray() публичный Метод

Converts all values to a byte array which can be written to the channel.
public ToByteArray ( ) : byte[]
Результат byte[]

operator() публичный статический Метод

Tests two objects of this type for inequality by value.
public static operator ( ) : bool
Результат bool