BFLinux
|
Data Structures | |
struct | tCIsignalEventData |
Data struct representing a signal event. More... | |
Typedefs | |
typedef struct tCIsignalHandle * | tCISHP |
anonymous signal handle More... | |
typedef struct tCIsignalEventData * | tCISEDP |
Functions | |
tCIRC | CiSignalSetup (tCIp cip, tCIU32 signal, tCIU32 link, tCISHP *cish) |
Create a signal handle. More... | |
tCIRC | CiSignalQueueOp (tCIp cip, tCISHP cish, tCIU32 operation, tCIU32 *count) |
Signal queue inquiry and manipulation. More... | |
tCIRC | CiSignalExec (tCIp cip, tCIU32 cishCnt, tCISHP *cishAry, tCIU32 maxWakeCnt, tCIU32 *pWakeCnt, int timeoutMsec) |
Execute the signal wait service. More... | |
tCIRC | CiSignalWait (tCIp cip, tCISHP cish, tCIU32 recSize, tCISEDP storeHere, int timeoutMsec) |
Wait for a signal. More... | |
tCIRC | CiSignalWaitCancel (tCIp cip, tCISHP cish) |
Cancel one call to CiSignalWait. More... | |
tCIRC | CiSignalCleanup (tCIp cip, tCISHP cish, tCIU32 queueOp, tCIU32 *count) |
Cleanup the signal handle, and all associated resources. More... | |
typedef struct tCIsignalEventData * tCISEDP |
typedef struct tCIsignalHandle* tCISHP |
anonymous signal handle
enum tCIsignalEnums |
Signals.
Cleanup the signal handle, and all associated resources.
Cleanup will clear the matching interrupt enabled register, where appropriate, then perform the specified queue operation.
NOTE: Outstanding calls to CiSignalWait must be resolved prior to signal handle cleanup.
NOTE: If count is not provided (NULL), non-modifying queue operations are considered no-op, and skipped. kCISQflush, however, will be performed.
cip | this frame grabber |
cish | signal handle to cleanup |
queueOp | queue operation to perform (tCIsignalQueueOpEnums) |
count | (optional) returns number of queue entries effected |
tCIRC CiSignalExec | ( | tCIp | cip, |
tCIU32 | cishCnt, | ||
tCISHP * | cishAry, | ||
tCIU32 | maxWakeCnt, | ||
tCIU32 * | pWakeCnt, | ||
int | timeoutMsec | ||
) |
Execute the signal wait service.
Execute the signal wait service. This method waits on the driver for any one of the provided signals. Whenever a signal is received, the matching signal handle will be raised, waking one call to CiSignalWait on that same handle. If no call to CiSignalWait is active when the signal is raised, a subsequent call to CiSignalWait will receive the signal immediately. Note that the wake count is not the same as the number of signals received.
A call to CiSignalExec may be canceled prematurely by calling CiSignalWaitCancel on the first signal handle provided in cishAry. If the signal is also being waited upon with CiSignalWait, only one call will be canceled at a time (i.e., two cancels are required).
If maxWakeCnt is non-zero, CiSignalExec will exit after it has raised that number of signals. This allows single-threaded use, with the following pattern: First, use CiSignalExec to wait for a fixed number of signal events; second, use CiSignalWait to retrieve those signals.
The number of signal handles (cishCount) may not exceed the total number of known signals (including per-link CXP signals).
Timeout occurs when no signals have been serviced within a period of at least timeoutMsec.
NOTE: The returned wake count may exceed maxWakeCnt in some cases. If multiple signals are received simultaneously, all will be serviced.
NOTE: This method calls poll internally to wait for events, unless an event is queued at entry. The calling thread will be blocked, until an event occurs.
NOTE: All pending calls to CiSignalExec should be cleared prior to CiSignalCleanup.
cip | this frame grabber |
cishCnt | the number of signal handles in cishAry |
cishAry | the array of signal handles |
maxWakeCnt | the maximum number of signal wakes per call (0 for infinite) |
pWakeCnt | (optional) rtrns count of wakes during this call |
timeoutMsec | negative => infinite wait |
Signal queue inquiry and manipulation.
If NULL is given for the signal handle, the operation will be applied to all queued events.
count may be NULL, if that data is not desired.
NOTE: count does NOT accumulate the count for multi-interrupt events, as does tCIsignalEventData, but merely the number of queue entries effected.
cip | this frame grabber |
cish | (optional) handle of signal to act upon |
operation | operation to perform (tCIsignalQueueOpEnums) |
count | (optional) returns number of queue entries effected |
Create a signal handle.
Initialize a handle for the given signal.
Setup will set the matching interrupt enabled register, where appropriate.
Returned handles should be cleaned up using CiSignalCleanup.
NOTE: link is used only for CXP signals, and should be 0 (zero) for all other types.
cip | this frame grabber |
signal | signal to create a handle for (see tCIsignalEnums) |
link | (optional) CXP link index |
cish | signal handle |
Wait for a signal.
Wait for the given signal, or for the timeout period to elapse. The CiSignalExec method must be called asynchronously (or prior), in order for the signal-wait to be serviced.
recSize and storeHere may be set to 0 (zero) and NULL, respecively, if the event data is not needed. If the data is required, both should be provided.
A call to CiSignalWait may be canceled prematurely calling CiSignalWaitCancel with the same signal handle.
Timeout occurs when no signal has been received within a period of at least timeoutMsec.
NOTE: This method calls poll internally to wait for events, unless an event is queued at entry. The calling thread will be blocked, until an event occurs.
NOTE: All pending calls to CiSignalWait should be cleared prior to CiSignalCleanup.
cip | this frame grabber |
cish | signal to wait upon |
recSize | (optional) size of storage available |
storeHere | (optional) event data returned |
timeoutMsec | negative => infinite wait |
Cancel one call to CiSignalWait.
Cancel a call to CiSignalWait, for the given signal handle. CiSignalWait will be canceled once per each call tho this function, even if no wait is currently active; the next call to CiSignalWait will be canceled.
This function is asynchronous, and thread safe vis-a-vis CiSignalWait.
NOTE: The cancelation queue is of finite depth. If too many cancelations are queued on the same handle, this function may block, until sufficient queue entries have been processed.
cip | this frame grabber |
cish | signal handle to cancel |