Packet.h
Go to the documentation of this file.
00001 
00009 #ifndef PACKET_H_
00010 #define PACKET_H_
00011 
00018 class Packet {
00019 public:
00028         Packet(RoutedFrame frame);//(uint32_t packet_id,uint32_t packet_size, uint8_t payload_data_type,std::string source,std::string topic, string mc_group);
00029         Packet();
00030         virtual ~Packet();
00031 
00032         bool frameAlreadyExsits(RoutedFrame f);
00033         void refreshLists();
00034         void sortFrameList();
00035         unsigned long getSize();
00036     
00037         void requestMissingFrames();
00038         void refreshMissingFramesList();
00039 
00047         bool addFrame(RoutedFrame frame);
00048         bool isMcFrame();
00049         bool isNack();
00050 
00055         std::string getPayload();
00056 
00057         uint32_t id_;                           
00058         uint32_t highest_seq;
00059         uint32_t size_;                         
00060         uint8_t data_type_;                     
00061        
00062         bool wrong_sequence_;
00063         std::string hostname_source_;           
00064         std::string mc_group_;          
00065         std::string topic_;                     
00066         std::list<RoutedFrame> frames_l_;       
00067         std::list<uint32_t> missed_sequences_l_; 
00068         //ecl::TimeStamp time_stamp_;           ///< Time stamp when \todo What does the time stamp mean? 
00069         unsigned long ts_;
00070         unsigned long ts_last_frame_request;
00071        
00072         
00073         static int NACK_THRESHOLD;
00074 };
00075 int Packet::NACK_THRESHOLD = 10;
00076 #endif /* PACKET_H_ */


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