CmdMessenger 3.0 CmdMessenger is a serial port messaging library for the .Net / Mono Platform.

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Properties
CommandMessenger.CommandQueue Class Reference
Inheritance diagram for CommandMessenger.CommandQueue:

List of all members.

## Public Types
enum | ThreadRunStates { Start, Started, Stop, Stopped, Abort }
| Run state of thread running the queue. More...
## Public Member Functions
| CommandQueue (DisposeStack disposeStack, CmdMessenger cmdMessenger)
| command queue constructor.
void | Clear ()
| Clears the queue.
virtual void | QueueCommand (CommandStrategy commandStrategy)
| Queue the command wrapped in a command strategy.
void | AddGeneralStrategy (GeneralStrategy generalStrategy)
| Adds a general strategy. This strategy is applied to all queued and dequeued commands.
void | Kill ()
| Kills this object.
bool | Join (int millisecondsTimeout)
| Joins the thread.
## Protected Member Functions
virtual void | ProcessQueue ()
| Process the queue.
override void | Dispose (bool disposing)
| Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
## Protected Attributes
readonly Thread | QueueThread
readonly ListQueue < CommandStrategy > | Queue = new ListQueue<CommandStrategy>()
readonly List< GeneralStrategy > | GeneralStrategies = new List<GeneralStrategy>()
readonly CmdMessenger | CmdMessenger
readonly EventWaiter | EventWaiter
object | ThreadRunStateLock = new object()
## Properties
ThreadRunStates | ThreadRunState`[get, set]`
| Gets or sets the run state of the thread .
int | Count`[get]`
| Gets or sets the run state of the thread .

## Member Enumeration Documentation

enum CommandMessenger::CommandQueue::ThreadRunStates

Run state of thread running the queue.

## Constructor & Destructor Documentation

CommandMessenger.CommandQueue.CommandQueue | ( | DisposeStack | disposeStack,
|  | CmdMessenger | cmdMessenger
| ) |  |

command queue constructor.

Parameters:

  disposeStack | DisposeStack.
  cmdMessenger | The command messenger.

## Member Function Documentation

void CommandMessenger.CommandQueue.AddGeneralStrategy | ( | GeneralStrategy | generalStrategy | ) |

Adds a general strategy. This strategy is applied to all queued and dequeued commands.

Parameters:

  generalStrategy | The general strategy.

void CommandMessenger.CommandQueue.Clear | ( |  | ) |

Clears the queue.

override void CommandMessenger.CommandQueue.Dispose | ( | bool | disposing | ) | `[protected, virtual]`

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

Parameters:

  disposing | true if resources should be disposed, false if not.

Reimplemented from CommandMessenger.DisposableObject.

bool CommandMessenger.CommandQueue.Join | ( | int | millisecondsTimeout | ) |

Joins the thread.

Parameters:

  millisecondsTimeout | The milliseconds timeout.

Returns:
  true if it succeeds, false if it fails.

void CommandMessenger.CommandQueue.Kill | ( |  | ) |

Kills this object.

virtual void CommandMessenger.CommandQueue.ProcessQueue | ( |  | ) | `[protected, virtual]`

Process the queue.

Reimplemented in CommandMessenger.ReceiveCommandQueue, and CommandMessenger.SendCommandQueue.

virtual void CommandMessenger.CommandQueue.QueueCommand | ( | CommandStrategy | commandStrategy | ) | `[virtual]`

Queue the command wrapped in a command strategy.

Parameters:

  commandStrategy | The command strategy.

Reimplemented in CommandMessenger.SendCommandQueue, and CommandMessenger.ReceiveCommandQueue.

## Property Documentation

int CommandMessenger.CommandQueue.Count`[get]`

Gets or sets the run state of the thread .

The thread run state.

ThreadRunStates CommandMessenger.CommandQueue.ThreadRunState`[get, set]`

Gets or sets the run state of the thread .

The thread run state.

The documentation for this class was generated from the following file:

- D:/My Documents/Github/Arduino-Code-and-Libraries/Libraries/CmdMessenger/CSharp/CommandMessenger/Queue/CommandQueue.cs