Frame Status values returned by the status member are :

Define

Value

Definition

GEV_FRAME_STATUS_RECVD

0

Frame is complete.

GEV_FRAME_STATUS_PENDING

1

Frame is in progress. A frame (data) is currently being written to the buffer. This value is returned only in Asynchronous buffer cycling mode when the capture/receive thread is re-using this buffer internally for a subsequent frame at the same time as a previous frame is being examined by the program.

In Synchronous buffer cycling mode, this value not returned as a buffer cannot be re-used internally until it is returned to the transfer for re-use.

GEV_FRAME_STATUS_TIMEOUT

2

Frame in-progress was not ready before timeout condition met.

Acquisition of a frame (data) had started but was not completed before the specified frame timeout period expired. (The timeout period is the “streamFrame_timeout_ms“ member of the GEV_CAMERA_OPTIONS structure.) While there is data in the buffer from this frame, there is no way to know which data packets are missing.

Possible reasons for the frame not being complete are:

a)    The timeout is set for too short of a time. This can happen with linescan camera having slow line rates or line triggers from an external source that can generate long frame times.

b)    Packets were dropped(*) and the timeout expired before all the resend operations were complete.

GEV_FRAME_STATUS_OVERFLOW

3

Frame in-progress was not complete before the internal queue of frames in-progress was full.

The frame in-progress was abandoned before its completion due to a new frame arriving while the internal FIFO of frames in-progress was full. The internal FIFO size can be increased with the “streamNumFramesBuffered” member in the GEV_CAMERA_OPTIONS structure. While there is data in the buffer from this frame, there is no way to know which data packets are missing.

Possible reasons for the internal FIFO of frames in-progress to be full are :

a)    The FIFO size is too small.

b)    The Frame rate from the camera is very high (kHz). When frame rates are higher than the operating system scheduler context switching rate (times the number of CPU cores) multiple frame completions can become pending simultaneously,  causing the FIFO to fill while it waits to complete frames in order of their block ID.

c)    Packets were dropped(*) and the delay in the resend operations completing has caused the FIFO to fill while it waits to complete frames in order.

GEV_FRAME_STATUS_BANDWIDTH

4

Frame in-progress had too many resend operations .

The frame in-progress had dropped packets(*) and too many packet resends have been generated in an attempt to recover the frame. The “streamMaxPacketResends” member in the GEV_CAMERA_OPTIONS structure controls the maximum number of retries. By default, it is set to twice the number of packets in a frame. While there is data in the buffer from this frame, there is no way to know which data packets are missing.

GEV_FRAME_STATUS_LOST

5

Frame in-progress had resend operations that failed.

The frame in-progress had dropped packets(*) and at least one of the requests for a packet resend has failed. This frame has a missing packet that cannot be recovered so this frame is lost. While there is data in the buffer from this frame, there is no way to know which data packets are missing.

<other value>

<16-bit>

16-bit Status value from the camera itself. (Device / Vendor specific).


* To minimize the possibility of packets being dropped, the network tuning mechanisms provided in the gev_nettweak script  should be adopted (see the Performance Tuning section). These are:

·         Increasing the MTU minimizes the number of packets in a frame.

·         Increasing the rx memory (net.core.rmem_max) allows more packets to queue on the network stack

·         Increasing the packet backlog (net.core.netdev_max_backlog) allows more packets to queue before being processed onto the network stack.

For most Gigabit NIC types, using the PF_PACKET interface (via cap_net_raw or “sudo -E”) with a maximized MTU provides the best defence against packet being dropped.

Related Topics

Image Frame Acquisition