pflib v3.15.1-5-ge6391b0
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
pflib::packing::TrigPathCaptureFrame< SingleECONTSample > Class Template Reference

This represents the capture block in the ZCU trigpath firmware. More...

#include <TrigPathCaptureFrame.h>

Collaboration diagram for pflib::packing::TrigPathCaptureFrame< SingleECONTSample >:
[legend]

Public Member Functions

 TrigPathCaptureFrame (std::span< uint32_t > data)
 
Reader & read (Reader &r)
 
void from (std::span< uint32_t > data)
 parse the header and then pass parsing onto the samples
 
const SingleECONTSample & sample (std::optional< int > i_sample={}) const
 get a sample at a specific index
 
const ECONTCaptureHeader & header () const
 get access to header
 
int length () const
 get the total length of this frame
 

Private Attributes

mutable::pflib::logging::logger the_log_ {::pflib::logging::get("decoding")}
 
ECONTCaptureHeader header_
 
std::vector< SingleECONTSample > samples_
 

Detailed Description

template<class SingleECONTSample>
class pflib::packing::TrigPathCaptureFrame< SingleECONTSample >

This represents the capture block in the ZCU trigpath firmware.

It uses the information passed through the ECONTCaptureHeader words in order to deduce the number of ECONT Samples to parse.

Template Parameters
SingelECONTSampleThis class must define how to decode a single sample from the ECONT(s).

Member Function Documentation

◆ from()

template<class T >
void pflib::packing::TrigPathCaptureFrame< T >::from ( std::span< uint32_t > data)

parse the header and then pass parsing onto the samples

We do some checks on the packet length mostly to check for coding errors. This is where we require the SingleECONTSample class to define a static constant value WORD_LEN defining how many words are required per sample.

◆ sample()

template<class T >
const T & pflib::packing::TrigPathCaptureFrame< T >::sample ( std::optional< int > i_sample = {}) const

get a sample at a specific index

Parameters
[in]i_sampleindex for desired sample, default is SoI as defined by capture header

The documentation for this class was generated from the following files: