Home |
Function RTUGetMsgQTimed |
Function RTUGetMsgQTimedRTUGetMsgQTimed waits for and retrieves a message pointer from a queue: RTUSBMessage * RTUGetMsgQTimed(RTUQHandle Queue, int Timeout); ParametersQueueHandle to the queue from which the pointer shall be retrieved. TimeoutMaximum number of milliseconds to wait. return valuePointer to the retrieved message or NULL if none became available in the given time period. Message buffers posted by RTUSB-32 (as opposed to messages posted by a client using RTUPutMsgQ) should be released to RTUSB-32's free buffer pool using RTUFreeBuffer. RTUGetMsgQTimed implements a blocking wait. The calling thread consumes no CPU time while it waits. If it is called while one or more messages are in the queue, the function returns immediately and does not wait. The accuracy of the timeout period depends on the granularity of the clock of the underlying multitasking kernel. With RTKernel-32, the timer granularity can be set with function CLKSetTimerIntVal.
|