|
INET Framework for OMNeT++/OMNEST
|
00001 // 00002 // Generated file, do not edit! Created by opp_msgc 4.2 from transport/udp/UDPPacket.msg. 00003 // 00004 00005 #ifndef _UDPPACKET_M_H_ 00006 #define _UDPPACKET_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 "INETDefs.h" 00018 // }} 00019 00020 00021 00032 class UDPPacket : public ::cPacket 00033 { 00034 protected: 00035 unsigned short sourcePort_var; 00036 unsigned short destinationPort_var; 00037 00038 private: 00039 void copy(const UDPPacket& other); 00040 00041 protected: 00042 // protected and unimplemented operator==(), to prevent accidental usage 00043 bool operator==(const UDPPacket&); 00044 00045 public: 00046 UDPPacket(const char *name=NULL, int kind=0); 00047 UDPPacket(const UDPPacket& other); 00048 virtual ~UDPPacket(); 00049 UDPPacket& operator=(const UDPPacket& other); 00050 virtual UDPPacket *dup() const {return new UDPPacket(*this);} 00051 virtual void parsimPack(cCommBuffer *b); 00052 virtual void parsimUnpack(cCommBuffer *b); 00053 00054 // field getter/setter methods 00055 virtual unsigned short getSourcePort() const; 00056 virtual void setSourcePort(unsigned short sourcePort); 00057 virtual unsigned short getDestinationPort() const; 00058 virtual void setDestinationPort(unsigned short destinationPort); 00059 }; 00060 00061 inline void doPacking(cCommBuffer *b, UDPPacket& obj) {obj.parsimPack(b);} 00062 inline void doUnpacking(cCommBuffer *b, UDPPacket& obj) {obj.parsimUnpack(b);} 00063 00064 00065 #endif // _UDPPACKET_M_H_