I3SessionMessage_m.h

Go to the documentation of this file.
00001 //
00002 // Generated file, do not edit! Created by opp_msgc 4.1 from applications/i3/i3Apps/I3SessionMessage.msg.
00003 //
00004 
00005 #ifndef _I3SESSIONMESSAGE_M_H_
00006 #define _I3SESSIONMESSAGE_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 "I3Identifier.h"
00018 // }}
00019 
00020 
00021 
00034 enum SessionMsgType {
00035     PAYLOAD = 0,
00036     CHANGE_SESSION = 1,
00037     TRIGGER_CONFIRMATION = 2
00038 };
00039 
00051 class SessionMsg : public ::cPacket
00052 {
00053   protected:
00054     int type_var;
00055     double value_var;
00056     ::I3Identifier source_var;
00057 
00058     // protected and unimplemented operator==(), to prevent accidental usage
00059     bool operator==(const SessionMsg&);
00060 
00061   public:
00062     SessionMsg(const char *name=NULL, int kind=0);
00063     SessionMsg(const SessionMsg& other);
00064     virtual ~SessionMsg();
00065     SessionMsg& operator=(const SessionMsg& other);
00066     virtual SessionMsg *dup() const {return new SessionMsg(*this);}
00067     virtual void parsimPack(cCommBuffer *b);
00068     virtual void parsimUnpack(cCommBuffer *b);
00069 
00070     // field getter/setter methods
00071     virtual int getType() const;
00072     virtual void setType(int type_var);
00073     virtual double getValue() const;
00074     virtual void setValue(double value_var);
00075     virtual I3Identifier& getSource();
00076     virtual const I3Identifier& getSource() const {return const_cast<SessionMsg*>(this)->getSource();}
00077     virtual void setSource(const I3Identifier& source_var);
00078 };
00079 
00080 inline void doPacking(cCommBuffer *b, SessionMsg& obj) {obj.parsimPack(b);}
00081 inline void doUnpacking(cCommBuffer *b, SessionMsg& obj) {obj.parsimUnpack(b);}
00082 
00083 
00084 #endif // _I3SESSIONMESSAGE_M_H_