23 #if NAMESPACE == ANTARES
53 if (bit < 0 || bit > 31) {
77 void set(
int& mask)
const
100 void set(
int& mask,
const bool value)
const
117 return (value <<
bit) &
get();
129 return (mask &
get()) >>
bit;
139 bool has(
const int mask)
const
141 return (mask &
get()) != 0;
172 if (lsb < 0 || lsb > 31 ||
173 msb < lsb || msb > 31) {
188 static const unsigned int mask[] = { 0x00000001,
240 return (value <<
lsb) &
get();
252 return (mask &
get()) >>
lsb;
262 bool has(
const int mask)
const
264 return (
get() & mask) != 0;
static const JBits DAQ_UDP_RECEIVED_PACKETS(0, 15)
Mask of UDP received packets.
void set(int &mask) const
Set bit in given bit mask.
int write(const int value) const
Write given value as bit mask.
JBit(int __bit)
Constructor.
int read(const int mask) const
Read given bit mask as value.
int write(const int value) const
Write given value as bit mask.
static const JBits DAQ_FIFO(0, 30)
FIFO almost full bits.
int msb
most significant bit
void set(int &mask, const bool value) const
Set bit in given bit mask.
JBits(int __lsb, int __msb)
Constructor.
int get() const
Get bit mask.
Auxiliary data structure for range of bits.
bool has(const int mask) const
Test bit mask.
int read(const int mask) const
Read given bit mask as value.
static const JBit DAQ_UDP_TRAILER(31)
UDP trailer.
bool has(const int mask) const
Test bit.
Auxiliary data structure for single bit.
JBit()
Default constructor.
static const JBit DAQ_WHITE_RABBIT(31)
White Rabbit status.
void unset(int &mask) const
Unset bit in given bit mask.
static const JBits DAQ_UDP_SEQUENCE_NUMBER(16, 31)
Mask of UDP sequence number.
int lsb
least significant bit
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
static const JBits DAQ_TDC(0, 30)
TDC high-rate veto status.
JBits()
Default constructor.