12 #ifndef ROC_PACKET_UNITS_H_
13 #define ROC_PACKET_UNITS_H_
int64_t nanoseconds_t
Nanoseconds.
seqnum_diff_t seqnum_diff(const seqnum_t a, const seqnum_t b)
Compute difference between two seqnums.
ext_seqnum_diff_t ext_seqnum_diff(const ext_seqnum_t a, const ext_seqnum_t b)
Compute difference between two extended seqnums.
bool ext_seqnum_lt(const ext_seqnum_t a, const ext_seqnum_t b)
Check if a is before b, taking possible wrap into account.
uint32_t ext_seqnum_t
Extended sequence number.
bool seqnum_le(const seqnum_t a, const seqnum_t b)
Check if a is before or equal to b, taking possible wrap into account.
int32_t ext_seqnum_diff_t
Extended sequence number delta.
int16_t seqnum_diff_t
Packet sequence number delta.
bool ext_seqnum_le(const ext_seqnum_t a, const ext_seqnum_t b)
Check if a is before or equal to b, taking possible wrap into account.
int16_t blknum_diff_t
FEC packet block number delta.
uint32_t stream_source_t
Packet stream identifier.
stream_timestamp_diff_t stream_timestamp_diff(const stream_timestamp_t a, const stream_timestamp_t b)
Compute difference between two timestamps.
bool stream_timestamp_le(const stream_timestamp_t a, const stream_timestamp_t b)
Check if a is before or equal to b, taking possible wrap into account.
core::nanoseconds_t stream_timestamp_2_ns(stream_timestamp_t ts, size_t sample_rate)
Convert stream timestamp.to nanoseconds.
bool seqnum_lt(const seqnum_t a, const seqnum_t b)
Check if a is before b, taking possible wrap into account.
uint16_t seqnum_t
Packet sequence number.
stream_timestamp_diff_t ns_2_stream_timestamp_delta(core::nanoseconds_t ns, size_t sample_rate)
Convert nanoseconds to stream timestamp delta.
uint16_t blknum_t
FEC packet block number.
blknum_diff_t blknum_diff(const blknum_t a, const blknum_t b)
Compute difference between two FEC packet block numbers.
uint32_t stream_timestamp_t
Packet stream timestamp.
core::nanoseconds_t stream_timestamp_delta_2_ns(stream_timestamp_diff_t ts, size_t sample_rate)
Convert stream timestamp.delta to nanoseconds.
bool blknum_le(const blknum_t a, const blknum_t b)
Check if a is before or equal to b, taking possible wrap into account.
bool stream_timestamp_lt(const stream_timestamp_t a, const stream_timestamp_t b)
Check if a is before b, taking possible wrap into account.
bool blknum_lt(const blknum_t a, const blknum_t b)
Check if a is before b, taking possible wrap into account.
int32_t stream_timestamp_diff_t
Packet stream timestamp delta.
stream_timestamp_t ns_2_stream_timestamp(core::nanoseconds_t ns, size_t sample_rate)
Convert nanoseconds to stream timestamp.
Commonly used types and functions.