00001 // 00002 // Generated file, do not edit! Created by opp_msgc 4.1 from applications/tcpexampleapp/TCPExampleMessage.msg. 00003 // 00004 00005 #ifndef _TCPEXAMPLEMESSAGE_M_H_ 00006 #define _TCPEXAMPLEMESSAGE_M_H_ 00007 00008 #include <omnetpp.h> 00009 00010 // opp_msgc version check 00011 #define MSGC_VERSION 0x0401 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 <TransportAddress.h> 00018 // }} 00019 00020 00021 00032 enum MessageType { 00033 TCPEXMSG_PING = 1, 00034 TCPEXMSG_PONG = 2 00035 }; 00036 00047 class TCPExampleMessage : public ::cPacket 00048 { 00049 protected: 00050 int type_var; 00051 ::TransportAddress senderAddress_var; 00052 00053 // protected and unimplemented operator==(), to prevent accidental usage 00054 bool operator==(const TCPExampleMessage&); 00055 00056 public: 00057 TCPExampleMessage(const char *name=NULL, int kind=0); 00058 TCPExampleMessage(const TCPExampleMessage& other); 00059 virtual ~TCPExampleMessage(); 00060 TCPExampleMessage& operator=(const TCPExampleMessage& other); 00061 virtual TCPExampleMessage *dup() const {return new TCPExampleMessage(*this);} 00062 virtual void parsimPack(cCommBuffer *b); 00063 virtual void parsimUnpack(cCommBuffer *b); 00064 00065 // field getter/setter methods 00066 virtual int getType() const; 00067 virtual void setType(int type_var); 00068 virtual TransportAddress& getSenderAddress(); 00069 virtual const TransportAddress& getSenderAddress() const {return const_cast<TCPExampleMessage*>(this)->getSenderAddress();} 00070 virtual void setSenderAddress(const TransportAddress& senderAddress_var); 00071 }; 00072 00073 inline void doPacking(cCommBuffer *b, TCPExampleMessage& obj) {obj.parsimPack(b);} 00074 inline void doUnpacking(cCommBuffer *b, TCPExampleMessage& obj) {obj.parsimUnpack(b);} 00075 00076 00077 #endif // _TCPEXAMPLEMESSAGE_M_H_