CmdMessenger  3.0
CmdMessenger is a serial port messaging library for the .Net / Mono Platform.
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:
targetQueuetarget filling of the queue.
CommandMessenger.QueueSpeed.QueueSpeed ( double  targetQueue,
long  maxSleep 
)

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

Parameters:
targetQueuetarget filling of the queue.
maxSleepMaximum sleep times

Member Function Documentation

Adds a unit to the load count.

Adds a count units to the load count.

Parameters:
countNumber of load units to increase.

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

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

Resets the count units to zero.

Sets the count units to the load count.

Parameters:
countNumber of load units to increase.

Perform the sleep based on load.


Property Documentation

Gets or sets the QueueSpeed name. Used for debugging.

The object name.


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