C# 클래스 BrrrBayBay.LogicPWMLib.LogicPwmDataGenerator

상속: IDisposable
파일 보기 프로젝트 열기: joosthaverkort/PWMLogic 1 사용 예제들

공개 메소드들

메소드 설명
Dispose ( ) : void
LogicPwmDataGenerator ( ) : System

Constructor

applyChannelSettings ( ) : void

Applies the PWM channel settings for a single channel. Calling this method in any other mode than asynchronous mode, will raise an exception.

In asynchronous mode this method will update all channels

applyChannelSettings ( int channel ) : void

Applies te PWM channel settings for a single channel. Calling this method in any other mode than asynchronous mode, will raise an exception.

calculateRealDutyCycle ( double desiredDutyCycle ) : double

Calculates the real duty cycle when using the current sample rate

calculateRealFrequency ( int desiredFrequency ) : double

Calculates the real frequency when using the current sample rate

fillBufferWithPwmStream ( byte buffer ) : void

Fills the provided byte array with pwm stream data

resetChannelSettings ( ) : void

Resets all channel settings to their default values

resetState ( ) : void

Resets the internal PWM control values

비공개 메소드들

메소드 설명
applySynchronousChannelSettings ( ) : void

Applies the channel settings for synchronous mode

calculateSampleTickTime ( ) : double

Returns the time (in seconds) for a single sample tick

calculateSinglePeriodSampleCount ( int frequency ) : int

Calculates the number of samples needed for a single period of the given frequency

fillBufferAsyncMode ( byte buffer ) : void

Fills the provided byte array with pwm stream data in asynchronous mode

fillBufferSyncMode ( byte buffer ) : void

Fills the provided byte array with pwm stream data in synchronous mode

메소드 상세

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

LogicPwmDataGenerator() 공개 메소드

Constructor
public LogicPwmDataGenerator ( ) : System
리턴 System

applyChannelSettings() 공개 메소드

Applies the PWM channel settings for a single channel. Calling this method in any other mode than asynchronous mode, will raise an exception.
In asynchronous mode this method will update all channels
public applyChannelSettings ( ) : void
리턴 void

applyChannelSettings() 공개 메소드

Applies te PWM channel settings for a single channel. Calling this method in any other mode than asynchronous mode, will raise an exception.
public applyChannelSettings ( int channel ) : void
channel int The channel number
리턴 void

calculateRealDutyCycle() 공개 메소드

Calculates the real duty cycle when using the current sample rate
public calculateRealDutyCycle ( double desiredDutyCycle ) : double
desiredDutyCycle double
리턴 double

calculateRealFrequency() 공개 메소드

Calculates the real frequency when using the current sample rate
public calculateRealFrequency ( int desiredFrequency ) : double
desiredFrequency int The desired frequency in Hz
리턴 double

fillBufferWithPwmStream() 공개 메소드

Fills the provided byte array with pwm stream data
public fillBufferWithPwmStream ( byte buffer ) : void
buffer byte the byte array that should be filled
리턴 void

resetChannelSettings() 공개 메소드

Resets all channel settings to their default values
public resetChannelSettings ( ) : void
리턴 void

resetState() 공개 메소드

Resets the internal PWM control values
public resetState ( ) : void
리턴 void