C# 클래스 Emlid.WindowsIot.Hardware.Components.NxpPca9685.NxpPca9685ChannelValue

NxpPca9685Device channel value.
파일 보기 프로젝트 열기: emlid/Navio-SDK-Windows-IoT 1 사용 예제들

공개 메소드들

메소드 설명
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