CmdMessenger
3.0
CmdMessenger is a serial port messaging library for the .Net / Mono Platform.
|
Class that regulates sleeping within a queue thread. Based on load the sleep time will increase or decrease. More...
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. |
Class that regulates sleeping within a queue thread. Based on load the sleep time will increase or decrease.
CommandMessenger.QueueSpeed.QueueSpeed | ( | double | targetQueue | ) |
Initialize the queue speed with a target filling of the queue.
targetQueue | target filling of the queue. |
CommandMessenger.QueueSpeed.QueueSpeed | ( | double | targetQueue, |
long | maxSleep | ||
) |
Initialize the queue speed with a target filling of the queue.
targetQueue | target filling of the queue. |
maxSleep | Maximum sleep times |
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.
count | Number 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.
void CommandMessenger.QueueSpeed.SetCount | ( | int | count | ) |
Sets the count units to the load count.
count | Number of load units to increase. |
void CommandMessenger.QueueSpeed.Sleep | ( | ) |
Perform the sleep based on load.
string CommandMessenger.QueueSpeed.Name [get, set] |
Gets or sets the QueueSpeed name. Used for debugging.
The object name.