49#define BARR_ELBITS (CHAR_BIT * sizeof(BARR_ELTYPE))
51#define BARR_ELNUM(N) ((N) / BARR_ELBITS)
53#define BARR_BITNUM(N) ((N) % BARR_ELBITS)
55#define BARR_SET(barr, N) \
56 (((BARR_ELTYPE *) (barr))[BARR_ELNUM(N)] |= (BARR_ELTYPE) 1 \
59#define BARR_TEST(barr, N) \
60 (((BARR_ELTYPE *) (barr))[BARR_ELNUM(N)] & \
61 ((BARR_ELTYPE) 1 << BARR_BITNUM(N)))
88 std::stringstream sstr(
"");
89 sstr <<
"srcID_:" << (int)
srcID_ <<
",pktID_:" <<
pktID_;
115 std::stringstream sstr;
118 <<
"binPayloadCheck_:"
151 char *frame,
size_t offset,
size_t length,
int tot_length,
double time)
155 cout <<
"ERROR in RxFrameSet::UpdateRxFrameSet, offset: " << offset
156 <<
", length:" << length <<
", but MAX_BIN_PAYLOAD_ARRAY_LENGTH:"
162 cout <<
"ERROR in RxFrameSet::UpdateRxFrameSet, tot_length: "
163 <<
tot_length <<
", but MAX_BIN_PAYLOAD_ARRAY_LENGTH:"
169 cout <<
"WARNING in RxFrameSet::UpdateRxFrameSet, duplicated or "
170 "overlapping frame has been received."
175 for (
int i = offset; i < offset + length; i++) {
bool operator<(RxFrameSetKey) const
RxFrameSetKey(uint8_t, unsigned int)
uint8_t srcID() const
Return the srcID_ variable.
unsigned int pktID_
ID of the packet.
uint8_t srcID_
ID of the packet's source node.
std::string displayKey() const
unsigned int pktID() const
Return the pktID_ variable.
char binPayloadCheck_[MAX_BIN_PAYLOAD_CHECK_ARRAY_LENGTH]
array to count already received frames.
size_t curr_length() const
Reference to the curr_length_ variable.
char binPayload_[MAX_BIN_PAYLOAD_ARRAY_LENGTH]
array to store binary data received as frames.
std::string binPayload() const
Return the content of the binPayload_ from 0 until tot_length_ array.
void UpdateRxFrameSet(char *, size_t, size_t, int, double)
int tot_length() const
Reference to the tot_length_ variable.
double t_last_rx_frame() const
Reference to the pktID_ variable.
static std::string hexdump_nice(std::string)
Function used for log and debug purposes (in order to print binary strings, even if they contain spec...
static std::string bindump(std::string)
#define BARR_SET(barr, N)
unsigned char BARR_ELTYPE
#define BARR_TEST(barr, N)
Header of the classes defining the frame elements (key and set) exploited by Uwal objects to reassebl...
#define MAX_BIN_PAYLOAD_ARRAY_LENGTH
#define MAX_BIN_PAYLOAD_CHECK_ARRAY_LENGTH
Header of the class responsible to map an NS-Miracle packet into a bit stream, and vice-versa.