Using IOCTLs defined below, the user is able to configure various
characteristics of the Delay Driver.
Two FT_EVENT messages, Low Water Mark and Empty, are sent to the program supplying the FT_DATA messages when the backlog of FT_DATA messages is running low and when it empties.
All of the delayed FT_DATA messages written to cards via the Server
are kept in stream queues. In each stream queue there is a
single delay time line that is applied to all of its messages regardless to
which card channel an individual FT_DATA message was sent. In other words,
as each new FT_DATA message with a non-zero timestamp is sent to a card, it
is placed at the end of the stream queue to be sent following the
message in front of it after the requested delay time has elapsed. At the
front of the stream queue, messages are removed and sent to the desired card
channel as the requested delay times expire.
The time delay is measured from the beginning (transmission) of one message
to the beginning (transmission) of the next message. For the first message
in a stream queue the delay time is from the receipt of the message by
the Delay Driver to its transmission.
The Delay Driver's time resolution is one millisecond (0.001 second).
The FT_DATA message's timestamp has a resolution of ten microseconds
(0.00001 second). In order to maintain more accurate timing, fractional
millisecond values from one delay are added to next instead of being
discarded. This allows the desired message distribution to be approximated
as best as possible over time.
Each normal Client connection has its own stream queue. A program's stream
queue number is the same as its client ID number. If a program needs
two or more independent stream queues, a client connection
needs to be established for each stream queue.
A program may make use of the Delay Driver indirectly by starting a schedule or registering with the USDT Server. In both cases, separate stream queues are used which have no direct impact on the program's own stream queue if it creates one by using the CMD_SERVER_SET_TIMED_XMIT command.
The event value will be in the event field of such a frame.
Note:
Please see the include file dev_delay.h for numeric values of
the following symbols.
Event name | Event meaning |
GDELAYLOW | The number of messages in the stream queue has just crossed the low water mark. |
GDELAYEMPTY | The stream queue is empty. |
IOCTL name | Function | Data field length/purpose |
GDLYGETHIVALUE | Get the current high water mark value | 4 data bytes, 2 recv 2 bytes: Stream number (send) 2 bytes: High water number of msgs(recv) |
GDLYSETHIVALUE | Set the high water mark value | 4 data bytes, 4 send 2 bytes: Stream number 2 bytes: High water number of msgs |
GDLYGETLOVALUE | Get the current low water mark value | 4 data bytes, 2 recv 2 bytes: Stream number (send) 2 bytes: Low water number of msgs (recv) |
GDLYSETLOVALUE | Set the low water mark value | 4 data bytes, 4 send 2 bytes: Stream number 2 bytes: Low water number of msgs |
GDLYGETHITIME | Get the current high water mark time | 4 data bytes, 2 recv 2 bytes: Stream number (send) 2 bytes: High water time in ms(recv) |
GDLYSETHITIME | Set the high water mark time | 4 data bytes, 4 send 2 bytes: Stream number 2 bytes: High water time in ms |
GDLYGETLOTIME | Get the current low water mark time | 4 data bytes, 2 recv 2 bytes: Stream number (send) 2 bytes: Low water time in ms (recv) |
GDLYSETLOTIME | Set the low water mark time | 4 data bytes, 4 send 2 bytes: Stream number 2 bytes: Low water time in ms |
GDLYGETLOREPORT | Get the low water report flag | 4 data bytes, 2 recv 2 bytes: Stream number (send) 2 bytes: Low water report flag 1: Report when low 0: Do not report when low |
GDLYFLUSHSTREAM | Flush the delay stream queue | 2 data bytes, send 2 bytes: Stream number |
GDLYPARTIALFLUSHSTREAM | Flush the delay stream queue, keeping some entries | 4 data bytes, send 2 bytes: Stream number 2 bytes: Keep msgs within this time in ms |
GDLYINITSTREAM | set default high & low water marks | 2 data bytes, send 2 bytes: Stream number |
Notes:
|