BFLinux
Data Structures | Typedefs | Enumerations | Functions
Acquisition

Data Structures

struct  tCIextraFrameInfo
 

Typedefs

typedef struct tCIextraFrameInfotCIXBIP
 

Enumerations

enum  kCIAqGetStatEnums {
  kCIAQSinvalidState = 0, kCIAQSidle, kCIAQSsnapShotInProcess, kCIAQSsnapShotDone,
  kCIAQScontinuousInProcess, kCIAQSerrorDone, kCIAQScontinuousStopping, kCIAQScontinuousDone,
  kCIAQSstateMask = 15, kCIAQSaqIsSIP = 16, kCIAQSaqUnderrun = 32, kCIAQSaqAbort = 64
}
 

Functions

tCIRC CiAqStart (tCIp cip, tCIU32 nFrames)
 Start filling first frame buffer. More...
 
tCIRC CiAqStartSIP (tCIp cip, tCIU32 nFrames)
 Begin Start-Stop Image Processing. More...
 
tCIRC CiAqStartHiFrameRate (tCIp cip, tCIU32 nFrames)
 Start filling first frame buffer using High Frame Rate Polling. More...
 
tCIRC CiAqStop (tCIp cip)
 Terminate continous DMA after next EOF. More...
 
tCIRC CiAqAbort (tCIp cip)
 Terminate any DMA immediately. More...
 
tCIRC CiAqSWtrigEnc (tCIp cip, tCIU32 trigValue, tCIU32 encValue)
 Set software trig and/or encoder. More...
 
tCIRC CiAqSWreset (tCIp cip)
 Software reset to hardware/drvr. More...
 
tCIRC CiAqGetStatus (tCIp cip, tCIU32 *state, tCIU32 *nFrames, tCIU32 *nErrors)
 Describe the acquisition state. More...
 
tCIRC CiWaitNextUndeliveredFrame (tCIp cip, int timeoutMsec)
 Return at EOF of next undelivered. More...
 
tCIRC CiGetMostRecentFrame (tCIp cip, tCIU32 *frameID, tCIU8 **frameData)
 Return most recently acquired. More...
 
tCIRC CiGetOldestNotDeliveredFrame (tCIp cip, tCIU32 *frameID, tCIU8 **frameData)
 Return oldest not delivered. More...
 
tCIRC CiResetDelivered (tCIp cip, tCIU32 frameID)
 Restart delivery from here. More...
 
tCIRC CiGetUndeliveredCount (tCIp cip, tCIU32 *count)
 Return number of undelivered frames. More...
 
tCIRC CiResetHWOVSTEP (tCIp cip)
 Reset HW/OVSTEP error w/o acquisition restart. More...
 
tCIRC CiGetExtraFrameInfo (tCIp cip, tCIU32 recSize, tCIXBIP storeHere)
 Retrieve non-pixel information. More...
 

Detailed Description

Typedef Documentation

◆ tCIXBIP

typedef struct tCIextraFrameInfo * tCIXBIP

Enumeration Type Documentation

◆ kCIAqGetStatEnums

Enumerator
kCIAQSinvalidState 
kCIAQSidle 

initial state, after Abort/SW reset

kCIAQSsnapShotInProcess 

after start w/NZ nFrames

kCIAQSsnapShotDone 

nFrames collected, DMA idle

kCIAQScontinuousInProcess 

after Start w/0 nFrames

kCIAQSerrorDone 

forced to abort

kCIAQScontinuousStopping 

after Stop requested, before EOF

kCIAQScontinuousDone 

EOF after Stop rqst, DMA idle.

kCIAQSstateMask 

reserve 4b for actual state

kCIAQSaqIsSIP 

modifies snapShot/continuous states

kCIAQSaqUnderrun 

modifies all states

kCIAQSaqAbort 

modifies all states

Function Documentation

◆ CiAqAbort()

tCIRC CiAqAbort ( tCIp  cip)

Terminate any DMA immediately.

NOTE: All processes and threads sleeping inside poll() will be awakened if any process or thread calls CiAqAbort() for this VFG.

Parameters
cipthis frame grabber

◆ CiAqGetStatus()

tCIRC CiAqGetStatus ( tCIp  cip,
tCIU32 state,
tCIU32 nFrames,
tCIU32 nErrors 
)

Describe the acquisition state.

Parameters
cipthis frame grabber
stateacquisition state
nFramesframes collected since AqStart
nErrorserrors detected since AqStart

◆ CiAqStart()

tCIRC CiAqStart ( tCIp  cip,
tCIU32  nFrames 
)

Start filling first frame buffer.

NOTE: If nFrames is 1 then hardware logic will cleanly stop the data acquisition on frame boundaries. If nFrames is greater than 1 then software logic stops the acquisition – it is possible that some data may be transferred into the nFrame+1 DMA buffer before the software stop is issued. Be sure to configure the DMA buffer count accordingly.

Parameters
cipthis frame grabber
nFrames0 => continous, else frame count

◆ CiAqStartHiFrameRate()

tCIRC CiAqStartHiFrameRate ( tCIp  cip,
tCIU32  nFrames 
)

Start filling first frame buffer using High Frame Rate Polling.

NOTE: This method is equivalent to CiAqStart, but uses a polling thread to detect new frames, rather than the system ISR. In very high frame rate scenarios, frame polling exhibits better performance characteristics than the ISR. At more typical frame rates, the ISR is less CPU intensive, so CiAqStart should be prefered.

Parameters
cipthis frame grabber
nFrames0 => continous, else frame count

◆ CiAqStartSIP()

tCIRC CiAqStartSIP ( tCIp  cip,
tCIU32  nFrames 
)

Begin Start-Stop Image Processing.

NOTE: If nFrames is 1 then hardware logic will cleanly stop the data acquisition on frame boundaries. If nFrames is greater than 1 then software logic stops the acquisition – it is possible that some data may be transferred into the nFrame+1 DMA buffer before the software stop is issued. Be sure to configure the DMA buffer count accordingly.

NOTE: SIP initiates each frame on assertion of the TRIG signal and stops collecting data when TRIG is deasserted. This allows a line scan camera to collect a variable number of lines in a frame. The VFG interrupt handler uses the deassertion of the TRIG signal to cleanly move DMA to the start of the next frame buffer.

Parameters
cipthis frame grabber
nFrames0 => continous, else frame count

◆ CiAqStop()

tCIRC CiAqStop ( tCIp  cip)

Terminate continous DMA after next EOF.

Parameters
cipthis frame grabber

◆ CiAqSWreset()

tCIRC CiAqSWreset ( tCIp  cip)

Software reset to hardware/drvr.

NOTE: All driver error conditions are cleared by this call.

Parameters
cipthis frame grabber

◆ CiAqSWtrigEnc()

tCIRC CiAqSWtrigEnc ( tCIp  cip,
tCIU32  trigValue,
tCIU32  encValue 
)

Set software trig and/or encoder.

Parameters
cipthis frame grabber
trigValue0 => 0; 1 => 1; else no change
encValue0 => 0; 1 => 1; else no change for CXP: 4lsb are ENCB/ENCA

◆ CiGetExtraFrameInfo()

tCIRC CiGetExtraFrameInfo ( tCIp  cip,
tCIU32  recSize,
tCIXBIP  storeHere 
)

Retrieve non-pixel information.

The caller should fill in the frameID field specifying which DMA frame is of interest. The remaining fields are filled in by the library.

If the frame has not yet completed then kCIEbadID is returned.

The driver maintains separate extra info for every frame in the DMA buffer pool. The extra info for each buffer is overwritten each time the buffer is filled with an image frame. If the extra information for the requested frameID has been overwritten then kCIEinfoAgedOut is returned.

Parameters
cipthis VFG
recSizesize of storage available
storeHerecaller's storage

◆ CiGetMostRecentFrame()

tCIRC CiGetMostRecentFrame ( tCIp  cip,
tCIU32 frameID,
tCIU8 **  frameData 
)

Return most recently acquired.

NOTE: When user scatter-gather DMA is configured the function CiMapFrameBuffers() returns pointers to a dummy frame. The original information used to build the scatter-gather DMA specification shuld be used to access the data frames. The frameID returned by this routine is always accurate and should be used in combination with the scatter-gather information to locate the appropriate frame boundary.

Parameters
cipthis frame grabber
frameID0.. since StartAq
frameDatapointer to frame buffer

◆ CiGetOldestNotDeliveredFrame()

tCIRC CiGetOldestNotDeliveredFrame ( tCIp  cip,
tCIU32 frameID,
tCIU8 **  frameData 
)

Return oldest not delivered.

If kCIEdmaOverrunErr is returned then the data has been or is being overwritten.

NOTE: Frames are "delivered" by this function only.

NOTE: When user scatter-gather DMA is configured the function CiMapFrameBuffers() returns pointers to a dummy frame. The original information used to build the scatter-gather DMA specification shuld be used to access the data frames. The frameID returned by this routine is always accurate and should be used in combination with the scatter-gather information to locate the appropriate frame boundary.

Parameters
cipthis frame grabber
frameID0.. since StartAq
frameDatapointer to frame buffer

◆ CiGetUndeliveredCount()

tCIRC CiGetUndeliveredCount ( tCIp  cip,
tCIU32 count 
)

Return number of undelivered frames.

Parameters
cipthis frame grabber
countcount of undelivered frames

◆ CiResetDelivered()

tCIRC CiResetDelivered ( tCIp  cip,
tCIU32  frameID 
)

Restart delivery from here.

Parameters
cipthis frame grabber
frameIDdelivery restarts at frameID+1

◆ CiResetHWOVSTEP()

tCIRC CiResetHWOVSTEP ( tCIp  cip)

Reset HW/OVSTEP error w/o acquisition restart.

Parameters
cipthis frame grabber

◆ CiWaitNextUndeliveredFrame()

tCIRC CiWaitNextUndeliveredFrame ( tCIp  cip,
int  timeoutMsec 
)

Return at EOF of next undelivered.

NOTE: Internally this function may call poll() and is the only library function which will sleep the calling process/thread.

The kCIEtimeoutErr indicates the timeout expired without any HW/OVSTEP errors and before a EOF interrupt was received.

The kCIEaqAbortedErr return indicates some other process or thread terminated acquisition before a new frame was available.

Parameters
cipthis frame grabber
timeoutMsecnegative => infinite wait