52
•
Xtium2-CLHS PX8 Reference
Xtium2-CLHS PX8 User's Manual
If image buffers are constructed using a trash buffer (SapBufferWithTrash using a transfer cycle
mode with trash), when no host buffers are available and no memory is available for a new image
to be stored in on-board memory, the SapXferCallBackInfo::IsTrash (C++) function or
SaxXferNotifyEventsArgs.Trash (.NET) property returns true. If a trash callback function has been
registered during construction of the SapTransfer object, it will be executed when a trash event
occurs.
When stopping the image acquisition, the event CORXFER_VAL_EVENT_TYPE_END_OF_TRANSFER
will occur after all images currently in the on-board memory are transferred to host buffer memory.
Note that if the application does not provide enough empty buffers, the Xtium2 event will not occur
and an acquisition abort will be required.
•
CORXFER_VAL_CYCLE_MODE_SYNCHRONOUS_WITH_TRASH
Before cycling to the next buffer in the list, the transfer device will check the next buffer's
state. If its state is full, the transfer will keep the image in on-board memory until the next
buffer’s state changes to empty. If the on-board memory gets filled, trash callbacks will be
generated.
•
CORXFER_VAL_CYCLE_MODE_SYNCHRONOUS_NEXT_EMPTY_WITH_TRASH
When starting an acquisition, the buffer list is put in an empty buffer queue list in the exact
order they were added to the transfer. Whenever a user sets a buffer to empty, it is added
to the empty buffer queue list, so that after cycling once through the original buffer list, the
buffers acquired into will follow the order in which they are put empty by the user. So in this
mode, the on-board images will be transferred to host buffer memory as long as there are
buffers in the empty buffer queue list. If no buffers are available on the host and the on-
board memory gets filled, trash callbacks will be generated.
•
CORXFER_VAL_CYCLE_MODE_ASYNCHRONOUS
The transfer device cycles through all buffers in the list without concern about the buffer
state.
The following table describes the possible buffer states and resulting behavior:
Trash Buffer
(cycling mode
with trash)
Xtium2 On-Board
Memory State
Host Sapera Buffer
State
Resulting Event
NO
Empty buffer available
(at least 1)
Empty buffer available
(at least 1)
Normal acquisition events
NO
Empty buffer available
(at least 1)
Full
Acquire into Xtium2 on-board
memory
NO
Full
Empty buffer available
(at least 1)
Frame Lost Event
NO
Full
Full
Frame Lost Event
YES
Empty buffer available
(at least 1)
Empty buffer available
(at least 1)
Normal acquisition events
YES
Empty buffer available
(at least 1)
Full
Acquire into Xtium2 on-board
memory
YES
Full
Empty buffer available
(at least 1)
Frame Lost Event
YES
Full
Full
Trash Callback
By default, the buffer state (empty or full) is automatically managed by Sapera LT; it can be
managed manually by the user if necessary.