2#ifndef PFLIB_PACKING_TRIGPATHCAPTUREFRAME_H
3#define PFLIB_PACKING_TRIGPATHCAPTUREFRAME_H
7#include "pflib/logging/Logging.h"
8#include "pflib/packing/ECONTCaptureHeader.h"
9#include "pflib/packing/Reader.h"
11namespace pflib::packing {
22template <
class SingleECONTSample>
38 void from(std::span<uint32_t> data);
45 const SingleECONTSample&
sample(std::optional<int> i_sample = {})
const;
56template <
class SingleECONTSample>
58 const TrigPathCaptureFrame<SingleECONTSample>& self) {
59 o << self.header() <<
'\n';
60 for (
int i_sample{0}; i_sample < self.header().n_samples(); i_sample++) {
61 o << (i_sample == self.header().pre_samples() ?
'*' :
' ')
62 << self.sample(i_sample) <<
'\n';
Reading a raw data stream with some underlying backend.
Definition Reader.h:19
This represents the capture block in the ZCU trigpath firmware.
Definition TrigPathCaptureFrame.h:23
const ECONTCaptureHeader & header() const
get access to header
Definition TrigPathCaptureFrame.cxx:63
int length() const
get the total length of this frame
Definition TrigPathCaptureFrame.h:49
const SingleECONTSample & sample(std::optional< int > i_sample={}) const
get a sample at a specific index
Definition TrigPathCaptureFrame.cxx:58
void from(std::span< uint32_t > data)
parse the header and then pass parsing onto the samples
Definition TrigPathCaptureFrame.cxx:33
logger get(const std::string &name)
Gets a logger with the input name for its channel.
Definition Logging.cxx:24