Function caerEventPacketGrow

Function Documentation

static inline caerEventPacketHeader caerEventPacketGrow(caerEventPacketHeader packet, int32_t newEventCapacity)

Grows an event packet. This only supports strictly increasing the size of a packet. For a more flexible resize operation, see caerEventPacketResize(). Use free() to reclaim this memory afterwards.

Parameters:
  • packet – the current event packet.

  • newEventCapacity – the new maximum number of events this packet can hold. Cannot be zero.

Returns:

a valid event packet handle or NULL on error. On success, the old packet handle is to be considered invalid and not to be used anymore. On failure, the old packet handle is not touched in any way.