42 bool l_bHasPayload =
false;
43 std::stringstream l_Output;
46 l_Output <<
"HDLC frame, Addr=0x" << std::hex << (int)
GetAddress() << std::dec <<
", ";
47 l_Output <<
"I-Frame, PF=" <<
IsPF() <<
", SSeq=" << (int)
GetSSeq() <<
", RSeq=" << (int)
GetRSeq();
49 l_Output <<
"HDLC frame, Addr=0x" << std::hex << (int)
GetAddress() << std::dec <<
", S-Frame: ";
72 l_Output <<
", PF=" <<
IsPF() <<
", RSeq=" << (int)
GetRSeq();
74 l_Output <<
"HDLC frame, Addr=0x" << std::hex << (int)
GetAddress() << std::dec <<
", U-Frame: ";
110 l_bHasPayload =
true;
111 l_Output <<
"FRMR/CMDR";
115 l_bHasPayload =
true;
120 l_bHasPayload =
true;
129 l_Output <<
", PF=" <<
IsPF();
131 l_Output <<
"Unparseable HDLC frame";
135 l_Output <<
", with " << m_Payload.size() <<
" bytes payload:";
136 for (
auto it = m_Payload.begin(); it != m_Payload.end(); ++it) {
137 l_Output <<
" " << std::hex << std::setw(2) << std::setfill(
'0') << int(*it);
141 std::vector<unsigned char> l_DissectedFrame;
142 std::string l_String(l_Output.str());
143 l_DissectedFrame.insert(l_DissectedFrame.begin(), l_String.data(), (l_String.data() + l_String.size()));
144 return l_DissectedFrame;
const std::vector< unsigned char > Dissect() const
E_HDLC_FRAMETYPE GetHDLCFrameType() const
Copyright (c) 2016, Florian Evers, florian-evers@gmx.de All rights reserved.
unsigned char GetSSeq() const
unsigned char GetRSeq() const
unsigned char GetAddress() const