BFLinux
Data Structures | Typedefs | Enumerations | Functions
High level signal interface

Data Structures

struct  tCIsignalEventData
 Data struct representing a signal event. More...
 

Typedefs

typedef struct tCIsignalHandle * tCISHP
 anonymous signal handle More...
 
typedef struct tCIsignalEventDatatCISEDP
 

Enumerations

enum  tCIsignalEnums {
  kCIsigHW = 0, kCIsigTRIG, kCIsigSERIAL, kCIsigQUAD,
  kCIsigCTAB, kCIsigEOF, kCIsigOVSTEP, kCIsigGn2xAcquired,
  kCIsigGn2zAcquired, kCIsigGn2bmError, kCIsigGn2aeLossOfSync, kCIsigGn2pciePktDropped,
  kCIsigGn2encA, kCIsigGn2encB, kCIsigGn2xStart, kCIsigGn2yStart,
  kCIsigGn2zStart, kCIsigCXPunderCurrent, kCIsigCXPoverCurrent, kCIsigCXPtrigAckRcvd,
  kCIsigCXPctlAckVerErr, kCIsigCXPctlAckRcvd, kCIsigCXPeventRcvd, kCIsigCXPeventFIFOoverflow,
  kCIsigCXPctlRspFIFOovf, kCIsigCXPctlReqFIFOovf, kCIsigCXPdownTrigRcvd, kCIsigCXPtrigNoMatch,
  kCIsigCXPioackUnknownType, kCIsigCXPioackNoMatch, kCIsigCXPhbError, kCIsigCXPhbRcvd,
  kCIsigCXPstrmPktDrop, kCIsigCXPstrmNotEnoughDat, kCIsigCXPstrmTooMuchDat, kCIsigCXPstrmBadCRC,
  kCIsigCXPstrmOverflow, kCIsigCXPstrmCorner, kCIsigCXPserdesLostAlign, kCIsigCOUNT
}
 Signals. More...
 
enum  tCIsignalQueueOpEnums { kCISQenumQueued = 0, kCISQenumReceived, kCISQenumDropped, kCISQflush }
 < Signal queue operations More...
 

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...
 

Detailed Description

Typedef Documentation

◆ tCISEDP

typedef struct tCIsignalEventData * tCISEDP

◆ tCISHP

typedef struct tCIsignalHandle* tCISHP

anonymous signal handle

Enumeration Type Documentation

◆ tCIsignalEnums

Signals.

Enumerator
kCIsigHW 

frame grabber HW interrupt

kCIsigTRIG 

TRIG interrupt.

kCIsigSERIAL 

SERIAL interrupt.

kCIsigQUAD 

QUAD intrpt.

kCIsigCTAB 

CTAB interrupt.

kCIsigEOF 

EOF interrupt (acquisition)

kCIsigOVSTEP 

OVSTEP interrupt.

kCIsigGn2xAcquired 

Gn2 end-of-line interrupt.

Gn2 signals (Axion, Aon, Cyton, Claxon)

NOTE: Use kCIsigEOF for Y_ACQUIRED NOTE: Use kCIsigTRIG for TRIG

kCIsigGn2zAcquired 

Gn2 end-of-volume interrupt.

kCIsigGn2bmError 

Gn2 buffer manager error interrupt.

kCIsigGn2aeLossOfSync 

Gn2 acquisition engine loss-of-sync interrupt.

kCIsigGn2pciePktDropped 

Gn2 PCIe packet dropped.

kCIsigGn2encA 

Gn2 encoder A interrupt.

kCIsigGn2encB 

Gn2 encoder B interrupt.

kCIsigGn2xStart 

Gn2 start-of-line interrupt.

kCIsigGn2yStart 

Gn2 start-of-frame interrupt.

kCIsigGn2zStart 

Gn2 start-of-volume interrupt.

kCIsigCXPunderCurrent 

CXP under current detected.

CXP signals

kCIsigCXPoverCurrent 

CXP over current detected.

kCIsigCXPtrigAckRcvd 

CXP trigger acknowledgement received.

kCIsigCXPctlAckVerErr 

CXP control packet ack version mismatch.

kCIsigCXPctlAckRcvd 

CXP control acknowledgement received.

kCIsigCXPeventRcvd 

CXP event received.

kCIsigCXPeventFIFOoverflow 

CXP event FIFO overflow.

kCIsigCXPctlRspFIFOovf 

CXP detected overflow in control response FIFO.

kCIsigCXPctlReqFIFOovf 

CXP detected overflow in control request FIFO.

kCIsigCXPdownTrigRcvd 

CXP trigger received from camera.

kCIsigCXPtrigNoMatch 

CXP problem decoding trig packet.

kCIsigCXPioackUnknownType 

CXP I/O acknowledgement has unknown type.

kCIsigCXPioackNoMatch 

CXP problem decoding IO acknowledgement.

kCIsigCXPhbError 

CXP problem decoding heart beat packet.

kCIsigCXPhbRcvd 

CXP heart beat packet received.

kCIsigCXPstrmPktDrop 

CXP problem decoding stream packet header, remainder dropped.

kCIsigCXPstrmNotEnoughDat 

CXP not implemented (reserved)

kCIsigCXPstrmTooMuchDat 

CXP not implemented (reserved)

kCIsigCXPstrmBadCRC 

CXP detected CRC error in stream packet.

kCIsigCXPstrmOverflow 

CXP stream packet buffer overflow.

kCIsigCXPstrmCorner 

CXP not implemented (reserved)

kCIsigCXPserdesLostAlign 

CXP SERDES lost alignment.

kCIsigCOUNT 

◆ tCIsignalQueueOpEnums

< Signal queue operations

Enumerator
kCISQenumQueued 

count events queued presently

kCISQenumReceived 

count events received (including dropped)

kCISQenumDropped 

count events dropped

kCISQflush 

flush entries from the queue

Function Documentation

◆ CiSignalCleanup()

tCIRC CiSignalCleanup ( tCIp  cip,
tCISHP  cish,
tCIU32  queueOp,
tCIU32 count 
)

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.

Parameters
cipthis frame grabber
cishsignal handle to cleanup
queueOpqueue operation to perform (tCIsignalQueueOpEnums)
count(optional) returns number of queue entries effected

◆ CiSignalExec()

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.

Parameters
cipthis frame grabber
cishCntthe number of signal handles in cishAry
cishArythe array of signal handles
maxWakeCntthe maximum number of signal wakes per call (0 for infinite)
pWakeCnt(optional) rtrns count of wakes during this call
timeoutMsecnegative => infinite wait

◆ CiSignalQueueOp()

tCIRC CiSignalQueueOp ( tCIp  cip,
tCISHP  cish,
tCIU32  operation,
tCIU32 count 
)

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.

Parameters
cipthis frame grabber
cish(optional) handle of signal to act upon
operationoperation to perform (tCIsignalQueueOpEnums)
count(optional) returns number of queue entries effected

◆ CiSignalSetup()

tCIRC CiSignalSetup ( tCIp  cip,
tCIU32  signal,
tCIU32  link,
tCISHP cish 
)

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.

Parameters
cipthis frame grabber
signalsignal to create a handle for (see tCIsignalEnums)
link(optional) CXP link index
cishsignal handle

◆ CiSignalWait()

tCIRC CiSignalWait ( tCIp  cip,
tCISHP  cish,
tCIU32  recSize,
tCISEDP  storeHere,
int  timeoutMsec 
)

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.

Parameters
cipthis frame grabber
cishsignal to wait upon
recSize(optional) size of storage available
storeHere(optional) event data returned
timeoutMsecnegative => infinite wait

◆ CiSignalWaitCancel()

tCIRC CiSignalWaitCancel ( tCIp  cip,
tCISHP  cish 
)

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.

Parameters
cipthis frame grabber
cishsignal handle to cancel