Function caerFrameEventPacketAllocate
Defined in File frame.h
Function Documentation
-
static inline caerFrameEventPacket caerFrameEventPacketAllocate(int32_t eventCapacity, int16_t eventSource, int32_t tsOverflow, int32_t maxLengthX, int32_t maxLengthY, int16_t maxChannelNumber)
Allocate a new frame events packet. Use free() to reclaim this memory. The frame events allocate memory for a maximum sized pixels array, depending on the parameters passed to this function, so that every event occupies the same amount of memory (constant size). The actual frames inside of it might be smaller than that, for example when using ROI, and their actual size is stored inside the frame event and should always be queried from there. The unused part of a pixels array is guaranteed to be zeros.
- Parameters:
eventCapacity – the maximum number of events this packet will hold.
eventSource – the unique ID representing the source/generator of this packet.
tsOverflow – the current timestamp overflow counter value for this packet.
maxLengthX – the maximum expected X axis size for frames in this packet.
maxLengthY – the maximum expected Y axis size for frames in this packet.
maxChannelNumber – the maximum expected number of channels for frames in this packet.
- Returns:
a valid FrameEventPacket handle or NULL on error.