McNackFrame.h
Go to the documentation of this file.
00001 /* 
00002  * File:   McNackFrame.h
00003  * Author: cwioro
00004  *
00005  * Created on September 10, 2014, 11:37 AM
00006  */
00007 
00008 #ifndef MCNACKFRAME_H
00009 #define MCNACKFRAME_H
00010 
00011 struct mc_nack_header {
00012     uint8_t frame_type;
00013     uint32_t id;
00014     uint32_t packet_id;
00015     uint16_t frame_seq_num_size;
00016     uint32_t hostname_source_len;
00017     uint32_t mc_group_len;
00018 
00019 } __attribute__((packed));
00020 
00021 class McNackFrame : public EthernetFrame {
00022 public:
00023 
00024     McNackFrame(unsigned char* source, unsigned char* dest, std::string hostname_src, std::string group_n, uint32_t p_id, std::vector<uint32_t> seq_n);
00025     McNackFrame(unsigned char* buffer);
00026     virtual ~McNackFrame();
00027 
00028 
00029     struct mc_nack_header header_;
00030     std::string hostname_source_;
00031     std::string mc_group_;
00032     std::vector<uint32_t> req_seq_nums_;
00033 
00034 
00035 
00036     uint16_t buffer_str_len_;
00037 
00038     static uint32_t HEADER_FIXED_LEN;
00039     static uint32_t stat_id_count;
00040     bool correct_crc_;
00041 
00042     using EthernetFrame::GetCrc32;
00043     std::string getFrameAsNetworkString();
00044 
00045     void print_frame();
00046 
00047 private:
00048 
00049 };
00050 uint32_t McNackFrame::HEADER_FIXED_LEN = sizeof (eh_header) + sizeof (mc_nack_header);
00051 uint32_t McNackFrame::stat_id_count = 0;
00052 
00053 #endif  /* MCNACKFRAME_H */
00054 


adhoc_communication
Author(s): Guenter Cwioro , Torsten Andre
autogenerated on Thu Jun 6 2019 20:59:43