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 Member Functions | Properties
CommandMessenger.QueueSpeed Class Reference

Class that regulates sleeping within a queue thread. Based on load the sleep time will increase or decrease. More...

List of all members.

## Public Member Functions
| QueueSpeed (double targetQueue)
| Initialize the queue speed with a target filling of the queue.
| QueueSpeed (double targetQueue, long maxSleep)
| Initialize the queue speed with a target filling of the queue.
void | CalcSleepTime ()
| Calculates the sleep time taking into account work being done in queue.
void | CalcSleepTimeWithoutLoad ()
| Calculates the sleep without time taking into account work being done in queue.
void | AddCount ()
| Adds a unit to the load count.
void | AddCount (int count)
| Adds a count units to the load count.
void | SetCount (int count)
| Sets the count units to the load count.
void | ResetCount ()
| Resets the count units to zero.
void | Sleep ()
| Perform the sleep based on load.
void | Sleep (long millis)
## Properties
string | Name`[get, set]`
| Gets or sets the QueueSpeed name. Used for debugging.

## Detailed Description

Class that regulates sleeping within a queue thread. Based on load the sleep time will increase or decrease.

## Constructor & Destructor Documentation

CommandMessenger.QueueSpeed.QueueSpeed | ( | double | targetQueue | ) |

Initialize the queue speed with a target filling of the queue.

Parameters:

  targetQueue | target filling of the queue.

CommandMessenger.QueueSpeed.QueueSpeed | ( | double | targetQueue,
|  | long | maxSleep
| ) |  |

Initialize the queue speed with a target filling of the queue.

Parameters:

  targetQueue | target filling of the queue.
  maxSleep | Maximum sleep times

## Member Function Documentation

void CommandMessenger.QueueSpeed.AddCount | ( |  | ) |

Adds a unit to the load count.

void CommandMessenger.QueueSpeed.AddCount | ( | int | count | ) |

Adds a count units to the load count.

Parameters:

  count | Number of load units to increase.

void CommandMessenger.QueueSpeed.CalcSleepTime | ( |  | ) |

Calculates the sleep time taking into account work being done in queue.

void CommandMessenger.QueueSpeed.CalcSleepTimeWithoutLoad | ( |  | ) |

Calculates the sleep without time taking into account work being done in queue.

void CommandMessenger.QueueSpeed.ResetCount | ( |  | ) |

Resets the count units to zero.

void CommandMessenger.QueueSpeed.SetCount | ( | int | count | ) |

Sets the count units to the load count.

Parameters:

  count | Number of load units to increase.

void CommandMessenger.QueueSpeed.Sleep | ( |  | ) |

Perform the sleep based on load.

## Property Documentation

string CommandMessenger.QueueSpeed.Name`[get, set]`

Gets or sets the QueueSpeed name. Used for debugging.

The object name.

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

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