HDLCd-Tools
FramePrinter.h
Go to the documentation of this file.
1 
22 #ifndef FRAME_PRINTER_H
23 #define FRAME_PRINTER_H
24 
25 #include <iostream>
26 #include <string>
27 
28 void PrintDissectedFrame(bool a_bWasSent, const std::vector<unsigned char> &a_Buffer) {
29  // Print dissected HDLC frame
30  std::string l_DissectedHDLCFrame;
31  if (a_bWasSent) {
32  l_DissectedHDLCFrame = "<<< Sent ";
33  } else {
34  l_DissectedHDLCFrame = ">>> Rcvd ";
35  } // else
36 
37  l_DissectedHDLCFrame.append((const char*)a_Buffer.data(), a_Buffer.size());
38  std::cout << l_DissectedHDLCFrame << std::endl;
39 }
40 
41 #endif // FRAME_PRINTER_H
void PrintDissectedFrame(bool a_bWasSent, const std::vector< unsigned char > &a_Buffer)
Definition: FramePrinter.h:28