4.3 Utility macros

The following macros can be used to navigate through the packets obtained by ndigo6g12_read().

crono_packet_data_length(current)

Returns the length of crono_packet::data in multiples of 8 bytes.

crono_packet_bytes(current)

Returns the length of crono_packet::data including its header in bytes.

crono_next_packet(current)

Returns a crono_packet pointer pointing to the next packet in the host buffer.

Must be checked before use to not point beyond the last packet of the readout data, e.g., crono_next_packet(current_packet) <= readout_data.last_packet.