McRouteActivationFrame.h
Go to the documentation of this file.
00001 /* 
00002  * File:   McRouteActivationFrame.h
00003  * Author: cwioro
00004  *
00005  * Created on August 27, 2014, 12:20 PM
00006  */
00007 
00008 #ifndef MCROUTEACTIVATIONFRAME_H
00009 #define MCROUTEACTIVATIONFRAME_H
00010 
00011 #include "EthernetFrame.h"
00012 
00013 struct mc_act_header {
00014     uint8_t frame_type;
00015     uint32_t id;
00016     uint32_t route_id;
00017     unsigned char mac_destination[6];
00018     uint32_t mc_group_name_len;
00019     uint32_t hostname_source_len;
00020 
00021 
00022 } __attribute__((packed));
00023 
00024 class McRouteActivationFrame : public EthernetFrame {
00025 public:
00026 
00033     McRouteActivationFrame(unsigned char* next_hop, std::string mc_g, uint32_t route_id, std::string source);
00034 
00038     McRouteActivationFrame(unsigned char* buffer);
00039 
00040 
00041     using EthernetFrame::GetCrc32;
00042 
00048     std::string getFrameAsNetworkString(unsigned char source[6]);
00049 
00050     virtual ~McRouteActivationFrame();
00051 
00052     struct mc_act_header header_; 
00053 
00054     std::string mc_group_; 
00055     std::string hostname_source_; 
00056 
00057     uint16_t buffer_str_len_;
00058 
00059    // bool correct_crc_; ///< Indicates if the checksum of the frame is correct
00060 
00061     static uint32_t HEADER_FIXED_LEN; 
00062     static uint32_t stat_id_count;
00063 
00064 
00065 };
00066 uint32_t McRouteActivationFrame::HEADER_FIXED_LEN = sizeof (eh_header) + sizeof (mc_act_header);
00067 uint32_t McRouteActivationFrame::stat_id_count = 0;
00068 #endif  /* MCROUTEACTIVATIONFRAME_H */
00069 


adhoc_communication
Author(s): Guenter Cwioro , Torsten Andre
autogenerated on Thu Aug 27 2015 11:56:40