Public Member Functions | Public Attributes | List of all members
dune::ColdataHeader Struct Reference

#include <FelixFormat.hh>

Public Member Functions

uint16_t checksum_a () const
 
uint16_t checksum_b () const
 
uint8_t 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)
 
void print () const
 
void printHex () const
 
void printBits () 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

Definition at line 87 of file FelixFormat.hh.

Member Function Documentation

uint16_t dune::ColdataHeader::checksum_a ( ) const
inline

Definition at line 95 of file FelixFormat.hh.

95  {
96  return (uint16_t)checksum_a_1 | (checksum_a_2 << 8);
97  }
uint16_t dune::ColdataHeader::checksum_b ( ) const
inline

Definition at line 98 of file FelixFormat.hh.

98  {
99  return (uint16_t)checksum_b_1 | (checksum_b_2 << 8);
100  }
uint8_t dune::ColdataHeader::hdr ( const uint8_t  i) const
inline

Definition at line 101 of file FelixFormat.hh.

101  {
102  switch(i) {
103  case 1: return hdr_1;
104  case 2: return hdr_2;
105  case 3: return hdr_3;
106  case 4: return hdr_4;
107  case 5: return hdr_5;
108  case 6: return hdr_6;
109  case 7: return hdr_7;
110  case 8: return hdr_8;
111  }
112  return 0;
113  }
void dune::ColdataHeader::print ( ) const
inline

Definition at line 137 of file FelixFormat.hh.

137  {
138  std::cout << "s1_error:" << unsigned(s1_error)
139  << " s2_error:" << unsigned(s2_error)
140  << " checksum_a1:" << unsigned(checksum_a_1)
141  << " checksum_b1:" << unsigned(checksum_b_1)
142  << " checksum_a2:" << unsigned(checksum_a_2)
143  << " checksum_b1:" << unsigned(checksum_b_2)
144  << " coldata_convert_count:" << unsigned(coldata_convert_count)
145  << " error_register:" << unsigned(error_register)
146  << " hdr_1:" << unsigned(hdr_1) << " hdr_2:" << unsigned(hdr_2)
147  << " hdr_3:" << unsigned(hdr_3) << " hdr_4:" << unsigned(hdr_4)
148  << " hdr_5:" << unsigned(hdr_5) << " hdr_6:" << unsigned(hdr_6)
149  << " hdr_7:" << unsigned(hdr_7) << " hdr_8:" << unsigned(hdr_8);
150  std::cout << '\n';
151  }
word_t coldata_convert_count
Definition: FelixFormat.hh:90
void dune::ColdataHeader::printBits ( ) const
inline

Definition at line 165 of file FelixFormat.hh.

165  {
166  std::cout << "s1_error:" << std::bitset<4>(s1_error)
167  << " s2_error:" << std::bitset<4>(s2_error)
168  << " checksum_a1:" << std::bitset<8>(checksum_a_1)
169  << " checksum_b1:" << std::bitset<8>(checksum_b_1)
170  << " checksum_a2:" << std::bitset<8>(checksum_a_2)
171  << " checksum_b2:" << std::bitset<8>(checksum_b_2)
172  << " coldata_convert_count:"
173  << std::bitset<16>(coldata_convert_count)
174  << " error_register:" << std::bitset<16>(error_register)
175  << " hdr_1:" << std::bitset<8>(hdr_1)
176  << " hdr_2:" << std::bitset<8>(hdr_2)
177  << " hdr_3:" << std::bitset<8>(hdr_3)
178  << " hdr_4:" << std::bitset<8>(hdr_4)
179  << " hdr_5:" << std::bitset<8>(hdr_5)
180  << " hdr_6:" << std::bitset<8>(hdr_6)
181  << " hdr_7:" << std::bitset<8>(hdr_7)
182  << " hdr_8:" << std::bitset<8>(hdr_8);
183  std::cout << '\n';
184  }
word_t coldata_convert_count
Definition: FelixFormat.hh:90
void dune::ColdataHeader::printHex ( ) const
inline

Definition at line 152 of file FelixFormat.hh.

152  {
153  std::cout << std::hex << "s1_error:" << s1_error << " s2_error:" << s2_error
154  << " checksum_a1:" << checksum_a_1
155  << " checksum_b1:" << checksum_b_1
156  << " checksum_a2:" << checksum_a_2
157  << " checksum_b1:" << checksum_b_2
158  << " coldata_convert_count:" << coldata_convert_count
159  << " error_register:" << error_register << " hdr_1:" << hdr_1
160  << " hdr_2:" << hdr_2 << " hdr_3:" << hdr_3 << " hdr_4:" << hdr_4
161  << " hdr_5:" << hdr_5 << " hdr_6:" << hdr_6 << " hdr_7:" << hdr_7
162  << " hdr_8:" << hdr_8;
163  std::cout << '\n';
164  }
QTextStream & hex(QTextStream &s)
word_t coldata_convert_count
Definition: FelixFormat.hh:90
void dune::ColdataHeader::set_checksum_a ( const uint16_t  new_checksum_a)
inline

Definition at line 115 of file FelixFormat.hh.

115  {
116  checksum_a_1 = new_checksum_a;
117  checksum_a_2 = new_checksum_a >> 8;
118  }
void dune::ColdataHeader::set_checksum_b ( const uint16_t  new_checksum_b)
inline

Definition at line 119 of file FelixFormat.hh.

119  {
120  checksum_b_1 = new_checksum_b;
121  checksum_b_2 = new_checksum_b >> 8;
122  }
void dune::ColdataHeader::set_hdr ( const uint8_t  i,
const uint8_t  new_hdr 
)
inline

Definition at line 123 of file FelixFormat.hh.

123  {
124  switch(i) {
125  case 1: hdr_1 = new_hdr; break;
126  case 2: hdr_2 = new_hdr; break;
127  case 3: hdr_3 = new_hdr; break;
128  case 4: hdr_4 = new_hdr; break;
129  case 5: hdr_5 = new_hdr; break;
130  case 6: hdr_6 = new_hdr; break;
131  case 7: hdr_7 = new_hdr; break;
132  case 8: hdr_8 = new_hdr; break;
133  }
134  }

Member Data Documentation

word_t dune::ColdataHeader::checksum_a_1

Definition at line 88 of file FelixFormat.hh.

word_t dune::ColdataHeader::checksum_a_2

Definition at line 90 of file FelixFormat.hh.

word_t dune::ColdataHeader::checksum_b_1

Definition at line 88 of file FelixFormat.hh.

word_t dune::ColdataHeader::checksum_b_2

Definition at line 90 of file FelixFormat.hh.

word_t dune::ColdataHeader::coldata_convert_count

Definition at line 90 of file FelixFormat.hh.

word_t dune::ColdataHeader::error_register

Definition at line 91 of file FelixFormat.hh.

word_t dune::ColdataHeader::hdr_1

Definition at line 92 of file FelixFormat.hh.

word_t dune::ColdataHeader::hdr_2

Definition at line 92 of file FelixFormat.hh.

word_t dune::ColdataHeader::hdr_3

Definition at line 92 of file FelixFormat.hh.

word_t dune::ColdataHeader::hdr_4

Definition at line 92 of file FelixFormat.hh.

word_t dune::ColdataHeader::hdr_5

Definition at line 92 of file FelixFormat.hh.

word_t dune::ColdataHeader::hdr_6

Definition at line 92 of file FelixFormat.hh.

word_t dune::ColdataHeader::hdr_7

Definition at line 92 of file FelixFormat.hh.

word_t dune::ColdataHeader::hdr_8

Definition at line 92 of file FelixFormat.hh.

word_t dune::ColdataHeader::reserved_1

Definition at line 88 of file FelixFormat.hh.

word_t dune::ColdataHeader::reserved_2

Definition at line 91 of file FelixFormat.hh.

word_t dune::ColdataHeader::s1_error

Definition at line 88 of file FelixFormat.hh.

word_t dune::ColdataHeader::s2_error

Definition at line 88 of file FelixFormat.hh.


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