C# Class CyrusBuilt.MonoPi.IO.Serial.SerialCommandQueueProcessor

Serial command queue processor.
Inheritance: IDisposable
ファイルを表示 Open project: cyrusbuilt/MonoPi

Public Methods

Method Description
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Call Dispose when you are finished using the CyrusBuilt.MonoPi.IO.Serial.SerialCommandQueueProcessor. The Dispose method leaves the CyrusBuilt.MonoPi.IO.Serial.SerialCommandQueueProcessor in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.IO.Serial.SerialCommandQueueProcessor so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.IO.Serial.SerialCommandQueueProcessor was occupying.

Enqueue ( String data ) : void

Enqueue the specified serial command data.

SerialCommandQueueProcessor ( Rs232SerialPort serial ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.IO.Serial.SerialCommandQueueProcessor class with the serial port to queue commands for. This overload uses the default delay value.

SerialCommandQueueProcessor ( Rs232SerialPort serial, Int32 delay ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.IO.Serial.SerialCommandQueueProcessor class with the serial port to queue commands for and the delay between processing of commands.

Start ( ) : void

Starts processing the command queue.

Stop ( ) : void

Stops processing the command queue.

Private Methods

Method Description
ProcessQueue ( ) : void

Processes the queue.

Method Details

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Call Dispose when you are finished using the CyrusBuilt.MonoPi.IO.Serial.SerialCommandQueueProcessor. The Dispose method leaves the CyrusBuilt.MonoPi.IO.Serial.SerialCommandQueueProcessor in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.IO.Serial.SerialCommandQueueProcessor so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.IO.Serial.SerialCommandQueueProcessor was occupying.
public Dispose ( ) : void
return void

Enqueue() public method

Enqueue the specified serial command data.
/// This instance has been disposed. /// /// cannot be null. ///
public Enqueue ( String data ) : void
data String /// The command data to enqueue. ///
return void

SerialCommandQueueProcessor() public method

Initializes a new instance of the CyrusBuilt.MonoPi.IO.Serial.SerialCommandQueueProcessor class with the serial port to queue commands for. This overload uses the default delay value.
public SerialCommandQueueProcessor ( Rs232SerialPort serial ) : System
serial Rs232SerialPort /// The serial port to queue commands for. ///
return System

SerialCommandQueueProcessor() public method

Initializes a new instance of the CyrusBuilt.MonoPi.IO.Serial.SerialCommandQueueProcessor class with the serial port to queue commands for and the delay between processing of commands.
/// cannot be null. ///
public SerialCommandQueueProcessor ( Rs232SerialPort serial, Int32 delay ) : System
serial Rs232SerialPort /// The serial port to queue commands for. ///
delay System.Int32 /// The amount of time (in milliseconds) to delay between commands. ///
return System

Start() public method

Starts processing the command queue.
/// This instance has been disposed. ///
public Start ( ) : void
return void

Stop() public method

Stops processing the command queue.
public Stop ( ) : void
return void