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

Serial command queue processor.
Inheritance: IDisposable
Afficher le fichier Open project: cyrusbuilt/MonoPi

Méthodes publiques

Méthode 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

Méthode Description
ProcessQueue ( ) : void

Processes the queue.

Method Details

Dispose() public méthode

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
Résultat void

Enqueue() public méthode

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. ///
Résultat void

SerialCommandQueueProcessor() public méthode

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. ///
Résultat System

SerialCommandQueueProcessor() public méthode

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. ///
Résultat System

Start() public méthode

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

Stop() public méthode

Stops processing the command queue.
public Stop ( ) : void
Résultat void