DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq::fddetdataformats::ColdataHeader Struct Reference

COLDATA header struct. More...

#include <WIBFrame.hpp>

Public Member Functions

uint16_t get_checksum_a () const
 
uint16_t get_checksum_b () const
 
uint8_t get_hdr (const uint8_t i) const
 
void set_checksum_a (const uint16_t new_checksum_a)
 
void set_checksum_b (const uint16_t new_checksum_b)
 
void set_hdr (const uint8_t i, const uint8_t new_hdr)
 
std::ostream & print_hex (std::ostream &o) const
 
std::ostream & print_bits (std::ostream &o) const
 

Public Attributes

word_t s1_error: 4
 
word_t s2_error: 4
 
word_t reserved_1: 8
 
word_t checksum_a_1: 8
 
word_t checksum_b_1: 8
 
word_t checksum_a_2: 8
 
word_t checksum_b_2: 8
 
word_t coldata_convert_count: 16
 
word_t error_register: 16
 
word_t reserved_2: 16
 
word_t hdr_1: 4
 
word_t hdr_3: 4
 
word_t hdr_2: 4
 
word_t hdr_4: 4
 
word_t hdr_5: 4
 
word_t hdr_7: 4
 
word_t hdr_6: 4
 
word_t hdr_8: 4
 

Detailed Description

COLDATA header struct.

Definition at line 90 of file WIBFrame.hpp.

Member Function Documentation

◆ get_checksum_a()

uint16_t dunedaq::fddetdataformats::ColdataHeader::get_checksum_a ( ) const
inline

Definition at line 97 of file WIBFrame.hpp.

98 {
99 return static_cast<uint16_t>(checksum_a_1) | (checksum_a_2 << 8); // NOLINT(build/unsigned)
100 }

◆ get_checksum_b()

uint16_t dunedaq::fddetdataformats::ColdataHeader::get_checksum_b ( ) const
inline

Definition at line 101 of file WIBFrame.hpp.

102 {
103 return static_cast<uint16_t>(checksum_b_1) | (checksum_b_2 << 8); // NOLINT(build/unsigned)
104 }

◆ get_hdr()

uint8_t dunedaq::fddetdataformats::ColdataHeader::get_hdr ( const uint8_t i) const
inline

Definition at line 105 of file WIBFrame.hpp.

106 {
107 switch (i) {
108 case 1:
109 return hdr_1;
110 case 2:
111 return hdr_2;
112 case 3:
113 return hdr_3;
114 case 4:
115 return hdr_4;
116 case 5:
117 return hdr_5;
118 case 6:
119 return hdr_6;
120 case 7:
121 return hdr_7;
122 case 8:
123 return hdr_8;
124 }
125 return 0;
126 }

◆ print_bits()

std::ostream & dunedaq::fddetdataformats::ColdataHeader::print_bits ( std::ostream & o) const
inline

Definition at line 178 of file WIBFrame.hpp.

179 {
180 o << "s1_error:" << std::bitset<4>(s1_error) << " s2_error:" << std::bitset<4>(s2_error)
181 << " checksum_a1:" << std::bitset<8>(checksum_a_1) << " checksum_b1:" << std::bitset<8>(checksum_b_1)
182 << " checksum_a2:" << std::bitset<8>(checksum_a_2) << " checksum_b2:" << std::bitset<8>(checksum_b_2)
183 << " coldata_convert_count:" << std::bitset<16>(coldata_convert_count)
184 << " error_register:" << std::bitset<16>(error_register) << " hdr_1:" << std::bitset<8>(hdr_1)
185 << " hdr_2:" << std::bitset<8>(hdr_2) << " hdr_3:" << std::bitset<8>(hdr_3) << " hdr_4:" << std::bitset<8>(hdr_4)
186 << " hdr_5:" << std::bitset<8>(hdr_5) << " hdr_6:" << std::bitset<8>(hdr_6) << " hdr_7:" << std::bitset<8>(hdr_7)
187 << " hdr_8:" << std::bitset<8>(hdr_8);
188 return o << '\n';
189 }

◆ print_hex()

std::ostream & dunedaq::fddetdataformats::ColdataHeader::print_hex ( std::ostream & o) const
inline

Definition at line 169 of file WIBFrame.hpp.

170 {
171 o << std::hex << "s1_error:" << s1_error << " s2_error:" << s2_error << " checksum_a1:" << checksum_a_1
172 << " checksum_b1:" << checksum_b_1 << " checksum_a2:" << checksum_a_2 << " checksum_b1:" << checksum_b_2
173 << " coldata_convert_count:" << coldata_convert_count << " error_register:" << error_register
174 << " hdr_1:" << hdr_1 << " hdr_2:" << hdr_2 << " hdr_3:" << hdr_3 << " hdr_4:" << hdr_4 << " hdr_5:" << hdr_5
175 << " hdr_6:" << hdr_6 << " hdr_7:" << hdr_7 << " hdr_8:" << hdr_8;
176 return o << '\n';
177 }

◆ set_checksum_a()

void dunedaq::fddetdataformats::ColdataHeader::set_checksum_a ( const uint16_t new_checksum_a)
inline

Definition at line 128 of file WIBFrame.hpp.

129 {
130 checksum_a_1 = new_checksum_a;
131 checksum_a_2 = new_checksum_a >> 8;
132 }

◆ set_checksum_b()

void dunedaq::fddetdataformats::ColdataHeader::set_checksum_b ( const uint16_t new_checksum_b)
inline

Definition at line 133 of file WIBFrame.hpp.

134 {
135 checksum_b_1 = new_checksum_b;
136 checksum_b_2 = new_checksum_b >> 8;
137 }

◆ set_hdr()

void dunedaq::fddetdataformats::ColdataHeader::set_hdr ( const uint8_t i,
const uint8_t new_hdr )
inline

Definition at line 138 of file WIBFrame.hpp.

139 {
140 switch (i) {
141 case 1:
142 hdr_1 = new_hdr;
143 break;
144 case 2:
145 hdr_2 = new_hdr;
146 break;
147 case 3:
148 hdr_3 = new_hdr;
149 break;
150 case 4:
151 hdr_4 = new_hdr;
152 break;
153 case 5:
154 hdr_5 = new_hdr;
155 break;
156 case 6:
157 hdr_6 = new_hdr;
158 break;
159 case 7:
160 hdr_7 = new_hdr;
161 break;
162 case 8:
163 hdr_8 = new_hdr;
164 break;
165 }
166 }

Member Data Documentation

◆ checksum_a_1

word_t dunedaq::fddetdataformats::ColdataHeader::checksum_a_1

Definition at line 92 of file WIBFrame.hpp.

◆ checksum_a_2

word_t dunedaq::fddetdataformats::ColdataHeader::checksum_a_2

Definition at line 93 of file WIBFrame.hpp.

◆ checksum_b_1

word_t dunedaq::fddetdataformats::ColdataHeader::checksum_b_1

Definition at line 92 of file WIBFrame.hpp.

◆ checksum_b_2

word_t dunedaq::fddetdataformats::ColdataHeader::checksum_b_2

Definition at line 93 of file WIBFrame.hpp.

◆ coldata_convert_count

word_t dunedaq::fddetdataformats::ColdataHeader::coldata_convert_count

Definition at line 93 of file WIBFrame.hpp.

◆ error_register

word_t dunedaq::fddetdataformats::ColdataHeader::error_register

Definition at line 94 of file WIBFrame.hpp.

◆ hdr_1

word_t dunedaq::fddetdataformats::ColdataHeader::hdr_1

Definition at line 95 of file WIBFrame.hpp.

◆ hdr_2

word_t dunedaq::fddetdataformats::ColdataHeader::hdr_2

Definition at line 95 of file WIBFrame.hpp.

◆ hdr_3

word_t dunedaq::fddetdataformats::ColdataHeader::hdr_3

Definition at line 95 of file WIBFrame.hpp.

◆ hdr_4

word_t dunedaq::fddetdataformats::ColdataHeader::hdr_4

Definition at line 95 of file WIBFrame.hpp.

◆ hdr_5

word_t dunedaq::fddetdataformats::ColdataHeader::hdr_5

Definition at line 95 of file WIBFrame.hpp.

◆ hdr_6

word_t dunedaq::fddetdataformats::ColdataHeader::hdr_6

Definition at line 95 of file WIBFrame.hpp.

◆ hdr_7

word_t dunedaq::fddetdataformats::ColdataHeader::hdr_7

Definition at line 95 of file WIBFrame.hpp.

◆ hdr_8

word_t dunedaq::fddetdataformats::ColdataHeader::hdr_8

Definition at line 95 of file WIBFrame.hpp.

◆ reserved_1

word_t dunedaq::fddetdataformats::ColdataHeader::reserved_1

Definition at line 92 of file WIBFrame.hpp.

◆ reserved_2

word_t dunedaq::fddetdataformats::ColdataHeader::reserved_2

Definition at line 94 of file WIBFrame.hpp.

◆ s1_error

word_t dunedaq::fddetdataformats::ColdataHeader::s1_error

Definition at line 92 of file WIBFrame.hpp.

◆ s2_error

word_t dunedaq::fddetdataformats::ColdataHeader::s2_error

Definition at line 92 of file WIBFrame.hpp.


The documentation for this struct was generated from the following file: