| Answer to question #10:
The OtxDrvWaitForSingleEvent() function waits for
a notification event from the driver. It will put the thread to sleep
until an event occurs. Specify nMilliseconds = <t OTX_TIME_INFINITY>
to wait forever. This function is tied to the OTX EventQueue to notify
the occurence of an event. For example, when using a rawdata receiver
device, the following scenario describes the scenario when the data is
received from the T1/E1/J1 span:
1. The DSP interrupts the driver when a certain amount of data has been
received.
2. The driver then transfers the data to a device-related FIFO.
3. When this FIFO contains data, the driver stores an event in the device-related
event queue.
4. The storing of this event triggers the Win32 event which awakes a thread
that has been sleeping after a call to OtxDrvWaitForSingleEvent().
5. The awoken thread should then read the event by calling OtxDrvGetEventData()
or OtxDrvGetEventDataEx().
6. The thread should then branch on the device Type and Code of the event.
In the case of a RawData receiver device, the thread would look for event
with a code of OTX_RAWDATA_RECEIVER_EC_DATA_AVAILABLE, and it would call
OtxRawDataReadData() to read the received data from the FIFO in the driver.
|