BFLinux
Enumerations | Functions
Interrupt Signal Handling

Enumerations

enum  kCIPollEventEnums {
  kCIPEintHW = 1, kCIPEintTRIG = 1 << 1, kCIPEintSERIAL = 1 << 2, kCIPEintQUAD = 1 << 3,
  kCIPEintDTR = 1 << 3, kCIPEintCTAB = 1 << 4, kCIPEintEOF = 1 << 5, kCIPEintOVSTEP = 1 << 6,
  kCIPEdrvrErr = 1 << 7, kCIPEnoFirmware = 1 << 8, kCIPEintCXP = 1 << 9, kCIPEintGn2 = 1 << 10,
  kCIPEintPollAll, kCIPEintError
}
 
enum  tCIinterruptCounterEnums {
  kCIintCountHW = 0, kCIintCountTRIG, kCIintCountSERIAL, kCIintCountQUAD,
  kCIintCountCTAB, kCIintCountEOF, kCIintCountOVSTEP, kCIintCountCXP,
  kCIintCountTOTAL, kCIintBitsCXP, kCIintBitsGn2, kCINinterruptCounters,
  kCIintCountENCA = kCIintCountCTAB, kCIintCountENCB = kCIintCountCTAB, kCIintCountDTR = kCIintCountQUAD
}
 

Functions

short int CiPollConfigure (tCIU32 desired)
 Return events field of pollfd. More...
 
tCIU32 CiPollResult (short int revents)
 Return mask of kCIPollEventEnums. More...
 
tCIRC CiPollClear (tCIp cip, tCIU32 mask)
 Clear all pending poll() events. More...
 
tCIRC CiTrigInterruptEnable (tCIp cip)
 Enable TRIG interrupts. More...
 
tCIRC CiTrigInterruptDisable (tCIp cip)
 Disable TRIG interrupts. More...
 
tCIRC CiEncInterruptEnable (tCIp cip, tCIU32 zAelseB)
 Enable ENCA/B interrupts. More...
 
tCIRC CiEncInterruptDisable (tCIp cip, tCIU32 zAelseB)
 Disable ENCA/B interrupts. More...
 
tCIRC CiGetIntCounts (tCIp cip, tCIU32 *ic)
 Interrupts since last AqStart. More...
 

Detailed Description

Enumeration Type Documentation

◆ kCIPollEventEnums

NOTE: TRIG interrupts enabled by CiTrigInterruptEnable(), disabled by CiTrigInterruptDisable().

NOTE: SERIAL interrupts enabled by CiCLinit(), disabled by CiCLterm().

NOTE: EncA/B interrupts enabled by CiEncInterruptEnable(), disabled by CiEncInterruptDisable(). EncA/B interrupts reported as 'CTAB'. EncA/B and DOWN_TRIG_RCVD only available on Cyton-class.

All other interrupts are managed by this library.

Enumerator
kCIPEintHW 

frame grabber HW interrupt

kCIPEintTRIG 

TRIG interrupt.

kCIPEintSERIAL 

SERIAL interrupt.

kCIPEintQUAD 

QUAD intrpt (CXP:DOWN_TRIG_RCVD)

kCIPEintDTR 

DOWN_TRIG_RCVD)

kCIPEintCTAB 

CTAB interrupt.

kCIPEintEOF 

EOF interrupt (acquisition)

kCIPEintOVSTEP 

OVSTEP interrupt.

kCIPEdrvrErr 

non-hardware driver error

kCIPEnoFirmware 

not ready to poll()

kCIPEintCXP 

CXP interrupt.

kCIPEintGn2 

Gn2 interrupts not mapped above (X_START, etc.)

kCIPEintPollAll 

These are all the possible interrupt sources from the framegrabber.

kCIPEintError 

These interrupts indicate errors in data collection.

◆ tCIinterruptCounterEnums

Enumerator
kCIintCountHW 

Array index for interrupt counter access.

The counters are reset at each CiAqStart()

kCIintCountTRIG 

TRIG ints not reset at AqStart.

kCIintCountSERIAL 
kCIintCountQUAD 

CXP: QUAD is DOWN_TRIG_RCVD.

kCIintCountCTAB 
kCIintCountEOF 
kCIintCountOVSTEP 
kCIintCountCXP 
kCIintCountTOTAL 
kCIintBitsCXP 

bitmask, not counter

kCIintBitsGn2 

bitmask, not counter

kCINinterruptCounters 

size of storage array

This many tCIU32 interrupt counters.

kCIintCountENCA 
kCIintCountENCB 
kCIintCountDTR 

Function Documentation

◆ CiEncInterruptDisable()

tCIRC CiEncInterruptDisable ( tCIp  cip,
tCIU32  zAelseB 
)

Disable ENCA/B interrupts.

Parameters
cipthis frame grabber
zAelseB0 ENCA, nonZero ENCB

◆ CiEncInterruptEnable()

tCIRC CiEncInterruptEnable ( tCIp  cip,
tCIU32  zAelseB 
)

Enable ENCA/B interrupts.

Parameters
cipthis frame grabber
zAelseB0 ENCA, nonZero ENCB

◆ CiGetIntCounts()

tCIRC CiGetIntCounts ( tCIp  cip,
tCIU32 ic 
)

Interrupts since last AqStart.

Parameters
cipthis frame grabber
ickCINinterruptCounters tCIU32

◆ CiPollClear()

tCIRC CiPollClear ( tCIp  cip,
tCIU32  mask 
)

Clear all pending poll() events.

This call only affects the pending events for this CiVFGopen() access.

Any pending events of other processes/paths are not affected.

Parameters
cipthis frame grabber
maskone or more kCIPollEventEnums

◆ CiPollConfigure()

short int CiPollConfigure ( tCIU32  desired)

Return events field of pollfd.

Parameters
desiredone or more kCPPollEventEnums

◆ CiPollResult()

tCIU32 CiPollResult ( short int  revents)

Return mask of kCIPollEventEnums.

After a call to poll() a POLLERR return indicates the frame grabber does not yet have the firmware loaded.

This call is only needed if CiPollConfigure() asked for multiple events.

NOTE: The poll() system call can return w/o timeout and w/o any enabled interrupt. This will happen if a the process/thread is signaled or if some other process/thread terminates acquisition before the desired poll() interrupt is delivered. If a signal occurs then poll() will return EINTR. Termination of acquisition can be identified by calling CiAqGetStatus() and testing for the kCIAQSaqAbort flag in the CiAqGetStatus() result.

Parameters
reventsreturned by poll()

◆ CiTrigInterruptDisable()

tCIRC CiTrigInterruptDisable ( tCIp  cip)

Disable TRIG interrupts.

Parameters
cipthis frame grabber

◆ CiTrigInterruptEnable()

tCIRC CiTrigInterruptEnable ( tCIp  cip)

Enable TRIG interrupts.

Parameters
cipthis frame grabber