Class Decoder
Defined in File decoder.hpp
Class Documentation
-
class Decoder
Block decoder associated to a one e-link. The Decoder translates blocks into chunks and published them over the network. Multiple Decoders share one Publisher.
Public Functions
-
Decoder(const Elink &elink, Publisher &publisher, flx_tohost_format fmt, int l0id_decoder_fmt, unsigned int block_size, uint64_t buf_vaddr)
Decoder class constructor.
- Parameters:
elink -- whose blocks are to be processed by this decoder.
l0id_decoder_fmt -- data format for L0ID sequence check (debug feature for detector integration).
block_size -- size of the blocks read from the DMA buffer.
buf_vaddr -- virtual address of beginning of DMA buffer (used for computation of key needed in zero-copy mode).
- Returns:
Publisher return code
-
inline uint32_t get_last_block()
- Returns:
address of the last processed block. Used in zero-copy mode.
-
inline uint64_t get_fid()
- Returns:
fid of the e-link associated to this decoder
-
inline void set_block_size(unsigned int block_size)
set the block size used by firmware
-
Publisher::Result decode(Block &block)
decode the block. This function will redirect to decode_subchunk_headers or decode_subchunk_trailers
- Parameters:
block -- address of the block to decode
- Returns:
Publisher return code
-
inline ToHostElinkStats get_decoder_stats()
- Returns:
copy of the current monitoring data
-
ToHostElinkStats get_decoder_stats_increment(ToHostElinkStats &previous)
wrapper of ToHostElinkStats::get_increment
- Returns:
a new instance of ToHostElinkStats containing the difference between the current values and the previous ones. It also updates the the "previous" value to the current one.
-
Decoder(const Elink &elink, Publisher &publisher, flx_tohost_format fmt, int l0id_decoder_fmt, unsigned int block_size, uint64_t buf_vaddr)