![]() |
Project
|
SampaHeader is the 50-bits header word used in Sampa data transmission protocol. More...
#include <SampaHeader.h>
Public Member Functions | |
SampaHeader (uint64_t value=0) | |
SampaHeader (uint8_t hamming, bool p, SampaPacketType pkt, uint16_t numWords, uint8_t h, SampaChannelAddress ch, uint32_t bx, bool dp) | |
bool | operator== (const SampaHeader &rhs) const |
bool | operator!= (const SampaHeader &rhs) const |
bool | operator< (const SampaHeader &rhs) const |
bool | operator<= (const SampaHeader &rhs) const |
bool | operator> (const SampaHeader &rhs) const |
bool | operator>= (const SampaHeader &rhs) const |
bool | hasError () const |
whether the header has error (according to hamming and/or parity) | |
bool | hasHammingError () const |
bool | hasParityError () const |
constexpr uint64_t | uint64 () const |
return the header as a 64-bits integer | |
void | uint64 (uint64_t value) |
bool | isHeartbeat () const |
Getters | |
uint8_t | hammingCode () const |
bool | headerParity () const |
SampaPacketType | packetType () const |
uint16_t | nof10BitWords () const |
uint8_t | chipAddress () const |
SampaChannelAddress | channelAddress () const |
uint32_t | bunchCrossingCounter () const |
bool | payloadParity () const |
Setters | |
Each setter throws if the value does not fit in the expected number of bits. | |
void | hammingCode (uint8_t hamming) |
void | headerParity (bool p) |
void | packetType (SampaPacketType pkt) |
void | nof10BitWords (uint16_t nofwords) |
void | chipAddress (uint8_t h) |
void | channelAddress (SampaChannelAddress ch) |
void | bunchCrossingCounter (uint32_t bx) |
void | payloadParity (bool dp) |
SampaHeader is the 50-bits header word used in Sampa data transmission protocol.
Definition at line 50 of file SampaHeader.h.
|
explicit |
Definition at line 190 of file SampaHeader.cxx.
|
explicit |
Constructor.
hamming | 6 bits |
p | 1 bit |
pkt | 3 bits |
numWords | 10 bits |
h | 4 bits |
ch | 5 bits |
bx | 20 bits |
dp | 1 bit |
if any of the parameter is not in its expected range, the ctor throws an exception
Definition at line 216 of file SampaHeader.cxx.
uint32_t o2::mch::raw::SampaHeader::bunchCrossingCounter | ( | ) | const |
Definition at line 352 of file SampaHeader.cxx.
void o2::mch::raw::SampaHeader::bunchCrossingCounter | ( | uint32_t | bx | ) |
Definition at line 259 of file SampaHeader.cxx.
uint8_t o2::mch::raw::SampaHeader::channelAddress | ( | ) | const |
Definition at line 346 of file SampaHeader.cxx.
void o2::mch::raw::SampaHeader::channelAddress | ( | SampaChannelAddress | ch | ) |
Definition at line 253 of file SampaHeader.cxx.
uint8_t o2::mch::raw::SampaHeader::chipAddress | ( | ) | const |
Definition at line 340 of file SampaHeader.cxx.
void o2::mch::raw::SampaHeader::chipAddress | ( | uint8_t | h | ) |
Definition at line 247 of file SampaHeader.cxx.
uint8_t o2::mch::raw::SampaHeader::hammingCode | ( | ) | const |
Definition at line 317 of file SampaHeader.cxx.
void o2::mch::raw::SampaHeader::hammingCode | ( | uint8_t | hamming | ) |
Definition at line 265 of file SampaHeader.cxx.
bool o2::mch::raw::SampaHeader::hasError | ( | ) | const |
whether the header has error (according to hamming and/or parity)
Definition at line 200 of file SampaHeader.cxx.
bool o2::mch::raw::SampaHeader::hasHammingError | ( | ) | const |
Definition at line 195 of file SampaHeader.cxx.
bool o2::mch::raw::SampaHeader::hasParityError | ( | ) | const |
Definition at line 205 of file SampaHeader.cxx.
bool o2::mch::raw::SampaHeader::headerParity | ( | ) | const |
Definition at line 323 of file SampaHeader.cxx.
void o2::mch::raw::SampaHeader::headerParity | ( | bool | p | ) |
Definition at line 235 of file SampaHeader.cxx.
bool o2::mch::raw::SampaHeader::isHeartbeat | ( | ) | const |
Definition at line 313 of file SampaHeader.cxx.
uint16_t o2::mch::raw::SampaHeader::nof10BitWords | ( | ) | const |
Definition at line 334 of file SampaHeader.cxx.
void o2::mch::raw::SampaHeader::nof10BitWords | ( | uint16_t | nofwords | ) |
Definition at line 271 of file SampaHeader.cxx.
bool o2::mch::raw::SampaHeader::operator!= | ( | const SampaHeader & | rhs | ) | const |
Definition at line 308 of file SampaHeader.cxx.
bool o2::mch::raw::SampaHeader::operator< | ( | const SampaHeader & | rhs | ) | const |
Definition at line 283 of file SampaHeader.cxx.
bool o2::mch::raw::SampaHeader::operator<= | ( | const SampaHeader & | rhs | ) | const |
Definition at line 293 of file SampaHeader.cxx.
bool o2::mch::raw::SampaHeader::operator== | ( | const SampaHeader & | rhs | ) | const |
Definition at line 303 of file SampaHeader.cxx.
bool o2::mch::raw::SampaHeader::operator> | ( | const SampaHeader & | rhs | ) | const |
Definition at line 288 of file SampaHeader.cxx.
bool o2::mch::raw::SampaHeader::operator>= | ( | const SampaHeader & | rhs | ) | const |
Definition at line 298 of file SampaHeader.cxx.
SampaPacketType o2::mch::raw::SampaHeader::packetType | ( | ) | const |
Definition at line 328 of file SampaHeader.cxx.
void o2::mch::raw::SampaHeader::packetType | ( | SampaPacketType | pkt | ) |
Definition at line 277 of file SampaHeader.cxx.
bool o2::mch::raw::SampaHeader::payloadParity | ( | ) | const |
Definition at line 358 of file SampaHeader.cxx.
void o2::mch::raw::SampaHeader::payloadParity | ( | bool | dp | ) |
Definition at line 241 of file SampaHeader.cxx.
|
inlineconstexpr |
return the header as a 64-bits integer
Definition at line 116 of file SampaHeader.h.
void o2::mch::raw::SampaHeader::uint64 | ( | uint64_t | value | ) |
sets the value from a 64-bits integer. if the value does not fit within 50 bits an exception is thrown.
Definition at line 210 of file SampaHeader.cxx.