Class L0Decoder

Class Documentation

class L0Decoder

Check of L0ID sequentiality

The L0Decoder class is capable of retrieving the L0ID (and BCID for TTC2H link) and verify it increases sequentially across chunks.

Public Functions

L0Decoder(int format, uint64_t fid)
bool check_tohost_chunk(std::vector<iovec> const &data)

Assemble the necessary chunk bytes and calls check_sequence_error.

Parameters:

data -- the iovec vector of subchunks

Returns:

whether the sequence check is passed or not.

inline xl1id_t get_last()
Returns:

Last L0ID processed.

inline uint32_t get_ec_mask()
Returns:

Mask of L0ID event counter.

Public Members

std::function<bool(const uint8_t *data, size_t len)> check_sequence_error

Check L0ID sequence of the passed chunk.

Param data:

The iov vector used by Decoder to store a chunk.

Return:

true in when out-of-sequence L0ID is detected.