The class of a routed frame. More...
#include <RoutedFrame.h>
Public Member Functions | |
std::string | getFrameAsNetworkString (routing_entry rou, unsigned char source[6]) |
std::string | getFrameAsNetworkString (uint32_t route_id, unsigned char next_hop[6], string source_host, unsigned char source[6]) |
stc_frame | getFrameStruct () |
unsigned long | getSize () |
RoutedFrame (std::string topic_to_publish, std::string data, uint8_t payload_type_field, uint32_t pack_id, uint32_t pack_sequence_num, uint32_t frames_in_pack) | |
RoutedFrame (unsigned char *buffer) | |
RoutedFrame () | |
virtual | ~RoutedFrame () |
Public Attributes | |
uint16_t | buffer_str_len_ |
bool | cr_flag |
struct rf_header | header_ |
std::string | hostname_source_ |
bool | mc_flag |
std::string | mc_g_name_ |
bool | negative_ack_type |
std::string | payload_ |
bool | resend_flag |
std::string | topic_ |
Static Public Attributes | |
static bool | enable_cooperative_relaying = false |
static uint32_t | frame_count_stat = 0 |
static uint32_t | HEADER_FIXED_LEN = sizeof(eh_header) + sizeof(rf_header) |
The class of a routed frame.
The class contains all needed frame fields and the functions to serialize a frame or desizalied it from a buffer
HEADER OF A ROUTED FRAME: HEADER FIELDS:
Definition at line 82 of file RoutedFrame.h.
RoutedFrame::RoutedFrame | ( | std::string | topic_to_publish, |
std::string | data, | ||
uint8_t | payload_type_field, | ||
uint32_t | pack_id, | ||
uint32_t | pack_sequence_num, | ||
uint32_t | frames_in_pack | ||
) |
Definition at line 58 of file RoutedFrame.cpp.
RoutedFrame::RoutedFrame | ( | unsigned char * | buffer | ) |
Definition at line 96 of file RoutedFrame.cpp.
Definition at line 83 of file RoutedFrame.cpp.
RoutedFrame::~RoutedFrame | ( | ) | [virtual] |
Definition at line 165 of file RoutedFrame.cpp.
std::string RoutedFrame::getFrameAsNetworkString | ( | routing_entry | rou, |
unsigned char | source[6] | ||
) |
Definition at line 251 of file RoutedFrame.cpp.
std::string RoutedFrame::getFrameAsNetworkString | ( | uint32_t | route_id, |
unsigned char | next_hop[6], | ||
string | source_host, | ||
unsigned char | source[6] | ||
) |
Definition at line 170 of file RoutedFrame.cpp.
Definition at line 256 of file RoutedFrame.cpp.
unsigned long RoutedFrame::getSize | ( | ) |
Definition at line 88 of file RoutedFrame.cpp.
uint16_t RoutedFrame::buffer_str_len_ |
Definition at line 104 of file RoutedFrame.h.
bool RoutedFrame::cr_flag |
Definition at line 99 of file RoutedFrame.h.
bool RoutedFrame::enable_cooperative_relaying = false [static] |
Definition at line 109 of file RoutedFrame.h.
uint32_t RoutedFrame::frame_count_stat = 0 [static] |
Definition at line 107 of file RoutedFrame.h.
struct rf_header RoutedFrame::header_ |
Definition at line 91 of file RoutedFrame.h.
uint32_t RoutedFrame::HEADER_FIXED_LEN = sizeof(eh_header) + sizeof(rf_header) [static] |
Definition at line 108 of file RoutedFrame.h.
std::string RoutedFrame::hostname_source_ |
Definition at line 92 of file RoutedFrame.h.
bool RoutedFrame::mc_flag |
Definition at line 100 of file RoutedFrame.h.
std::string RoutedFrame::mc_g_name_ |
Definition at line 93 of file RoutedFrame.h.
Definition at line 101 of file RoutedFrame.h.
std::string RoutedFrame::payload_ |
Definition at line 95 of file RoutedFrame.h.
Definition at line 102 of file RoutedFrame.h.
std::string RoutedFrame::topic_ |
Definition at line 94 of file RoutedFrame.h.