Utility Macros¶
The following macros can be used to navigate through the packets obtained
by ndigo6g12_read().
-
crono_packet_data_length(current) ((current)->type &128?0:(current)->length)¶
Returns the length of crono_packet::data in multiples of 8 bytes.
-
crono_packet_bytes(current) ((crono_packet_data_length(current) + 2) * 8)¶
Returns the length of crono_packet::data including its header in bytes.
-
crono_next_packet(current) ((volatile crono_packet*) (((int64_t) (current)) +( ((current)->type&128?0:(current)->length) + 2) * 8))¶
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.