INET Framework for OMNeT++/OMNEST
IGMPMessage_m.h
Go to the documentation of this file.
00001 //
00002 // Generated file, do not edit! Created by opp_msgc 4.2 from ansa/igmp/IGMPMessage.msg.
00003 //
00004 
00005 #ifndef _IGMPMESSAGE_M_H_
00006 #define _IGMPMESSAGE_M_H_
00007 
00008 #include <omnetpp.h>
00009 
00010 // opp_msgc version check
00011 #define MSGC_VERSION 0x0402
00012 #if (MSGC_VERSION!=OMNETPP_VERSION)
00013 #    error Version mismatch! Probably this file was generated by an earlier version of opp_msgc: 'make clean' should help.
00014 #endif
00015 
00016 // cplusplus {{
00017 #include "IPAddress.h"
00018 // }}
00019 
00020 
00021 
00035 enum IGMPType {
00036     IGMP_MEMBERSHIP_QUERY = 0x11,
00037     IGMP_MEMBERSHIP_REPORT_V1 = 0x12,
00038     IGMP_MEMBERSHIP_REPORT_V2 = 0x16,
00039     IGMP_LEAVE_GROUP = 0x17
00040 };
00041 
00053 class IGMPMessage : public ::cPacket
00054 {
00055   protected:
00056     short type_var;
00057     short maxRespTime_var;
00058     IPAddress groupAddress_var;
00059 
00060   private:
00061     void copy(const IGMPMessage& other);
00062 
00063   protected:
00064     // protected and unimplemented operator==(), to prevent accidental usage
00065     bool operator==(const IGMPMessage&);
00066 
00067   public:
00068     IGMPMessage(const char *name=NULL, int kind=0);
00069     IGMPMessage(const IGMPMessage& other);
00070     virtual ~IGMPMessage();
00071     IGMPMessage& operator=(const IGMPMessage& other);
00072     virtual IGMPMessage *dup() const {return new IGMPMessage(*this);}
00073     virtual void parsimPack(cCommBuffer *b);
00074     virtual void parsimUnpack(cCommBuffer *b);
00075 
00076     // field getter/setter methods
00077     virtual short getType() const;
00078     virtual void setType(short type);
00079     virtual short getMaxRespTime() const;
00080     virtual void setMaxRespTime(short maxRespTime);
00081     virtual IPAddress& getGroupAddress();
00082     virtual const IPAddress& getGroupAddress() const {return const_cast<IGMPMessage*>(this)->getGroupAddress();}
00083     virtual void setGroupAddress(const IPAddress& groupAddress);
00084 };
00085 
00086 inline void doPacking(cCommBuffer *b, IGMPMessage& obj) {obj.parsimPack(b);}
00087 inline void doUnpacking(cCommBuffer *b, IGMPMessage& obj) {obj.parsimUnpack(b);}
00088 
00089 
00090 #endif // _IGMPMESSAGE_M_H_