QuonP_m.h

Go to the documentation of this file.
00001 //
00002 // Generated file, do not edit! Created by opp_msgc 4.0 from overlay/quon/QuonP.msg.
00003 //
00004 
00005 #ifndef _QUONP_M_H_
00006 #define _QUONP_M_H_
00007 
00008 #include <omnetpp.h>
00009 
00010 // opp_msgc version check
00011 #define MSGC_VERSION 0x0400
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 {{ ... }} section:
00017 
00018 #include <NodeHandle.h>
00019 #include <QuonDefs.h>
00020 #include <QuonPRDefs.h>
00021 #include <CommonMessages_m.h>
00022 
00023 
00024 static const int QUONPCOMMAND_L = 8;
00025 static const int QUONPPOSITION_L = 128;
00026 static const int QUONPAOI_L = 64;
00027 static const int QUONPENTRYCOUNT_L = 32;
00028 static const int QUONPFLAG_L = 1;
00029 
00030 #define QUONP_L(msg) (QUONPCOMMAND_L + NODEHANDLE_L + KEY_L + QUONPPOSITION_L + QUONPAOI_L)
00031 #define QUONPLIST_L(msg) (QUONP_L(msg) + QUONPENTRYCOUNT_L + msg->getNeighborHandleArraySize() * (NODEHANDLE_L + QUONPPOSITION_L))
00032 #define QUONPMOVE_L(msg) (QUONP_L(msg) + (msg->getNeighborHandle(0).isUnspecified() ? 0 : (NODEHANDLE_L + QUONPPOSITION_L)) + (msg->getNeighborHandle(1).isUnspecified() ? 0 : (NODEHANDLE_L + QUONPPOSITION_L)) + (msg->getNeighborHandle(2).isUnspecified() ? 0 : (NODEHANDLE_L + QUONPPOSITION_L)) + (msg->getNeighborHandle(3).isUnspecified() ? 0 : (NODEHANDLE_L + QUONPPOSITION_L)) + QUONPPOSITION_L + QUONPFLAG_L)
00033 // end cplusplus
00034 
00035 
00036 
00051 enum QUONPCommand {
00052     JOIN_REQUEST = 0,
00053     JOIN_ACKNOWLEDGE = 1,
00054     NODE_MOVE = 2,
00055     NEW_NEIGHBORS = 3,
00056     NODE_LEAVE = 4,
00057     QUON_EVENT = 5
00058 };
00059 
00069 class QuonPSelfMessage : public cMessage
00070 {
00071   protected:
00072     OverlayKey key_var;
00073 
00074     // protected and unimplemented operator==(), to prevent accidental usage
00075     bool operator==(const QuonPSelfMessage&);
00076 
00077   public:
00078     QuonPSelfMessage(const char *name=NULL, int kind=0);
00079     QuonPSelfMessage(const QuonPSelfMessage& other);
00080     virtual ~QuonPSelfMessage();
00081     QuonPSelfMessage& operator=(const QuonPSelfMessage& other);
00082     virtual QuonPSelfMessage *dup() const {return new QuonPSelfMessage(*this);}
00083     virtual void parsimPack(cCommBuffer *b);
00084     virtual void parsimUnpack(cCommBuffer *b);
00085 
00086     // field getter/setter methods
00087     virtual OverlayKey& getKey();
00088     virtual const OverlayKey& getKey() const {return const_cast<QuonPSelfMessage*>(this)->getKey();}
00089     virtual void setKey(const OverlayKey& key_var);
00090 };
00091 
00092 inline void doPacking(cCommBuffer *b, QuonPSelfMessage& obj) {obj.parsimPack(b);}
00093 inline void doUnpacking(cCommBuffer *b, QuonPSelfMessage& obj) {obj.parsimUnpack(b);}
00094 
00107 class QuonPMessage : public BaseOverlayMessage
00108 {
00109   protected:
00110     int command_var;
00111     NodeHandle sender_var;
00112     Vector2D position_var;
00113     double AOIsize_var;
00114 
00115     // protected and unimplemented operator==(), to prevent accidental usage
00116     bool operator==(const QuonPMessage&);
00117 
00118   public:
00119     QuonPMessage(const char *name=NULL, int kind=0);
00120     QuonPMessage(const QuonPMessage& other);
00121     virtual ~QuonPMessage();
00122     QuonPMessage& operator=(const QuonPMessage& other);
00123     virtual QuonPMessage *dup() const {return new QuonPMessage(*this);}
00124     virtual void parsimPack(cCommBuffer *b);
00125     virtual void parsimUnpack(cCommBuffer *b);
00126 
00127     // field getter/setter methods
00128     virtual int getCommand() const;
00129     virtual void setCommand(int command_var);
00130     virtual NodeHandle& getSender();
00131     virtual const NodeHandle& getSender() const {return const_cast<QuonPMessage*>(this)->getSender();}
00132     virtual void setSender(const NodeHandle& sender_var);
00133     virtual Vector2D& getPosition();
00134     virtual const Vector2D& getPosition() const {return const_cast<QuonPMessage*>(this)->getPosition();}
00135     virtual void setPosition(const Vector2D& position_var);
00136     virtual double getAOIsize() const;
00137     virtual void setAOIsize(double AOIsize_var);
00138 };
00139 
00140 inline void doPacking(cCommBuffer *b, QuonPMessage& obj) {obj.parsimPack(b);}
00141 inline void doUnpacking(cCommBuffer *b, QuonPMessage& obj) {obj.parsimUnpack(b);}
00142 
00153 class QuonPListMessage : public QuonPMessage
00154 {
00155   protected:
00156     NodeHandle *neighborHandle_var; // array ptr
00157     unsigned int neighborHandle_arraysize;
00158     Vector2D *neighborPosition_var; // array ptr
00159     unsigned int neighborPosition_arraysize;
00160 
00161     // protected and unimplemented operator==(), to prevent accidental usage
00162     bool operator==(const QuonPListMessage&);
00163 
00164   public:
00165     QuonPListMessage(const char *name=NULL, int kind=0);
00166     QuonPListMessage(const QuonPListMessage& other);
00167     virtual ~QuonPListMessage();
00168     QuonPListMessage& operator=(const QuonPListMessage& other);
00169     virtual QuonPListMessage *dup() const {return new QuonPListMessage(*this);}
00170     virtual void parsimPack(cCommBuffer *b);
00171     virtual void parsimUnpack(cCommBuffer *b);
00172 
00173     // field getter/setter methods
00174     virtual void setNeighborHandleArraySize(unsigned int size);
00175     virtual unsigned int getNeighborHandleArraySize() const;
00176     virtual NodeHandle& getNeighborHandle(unsigned int k);
00177     virtual const NodeHandle& getNeighborHandle(unsigned int k) const {return const_cast<QuonPListMessage*>(this)->getNeighborHandle(k);}
00178     virtual void setNeighborHandle(unsigned int k, const NodeHandle& neighborHandle_var);
00179     virtual void setNeighborPositionArraySize(unsigned int size);
00180     virtual unsigned int getNeighborPositionArraySize() const;
00181     virtual Vector2D& getNeighborPosition(unsigned int k);
00182     virtual const Vector2D& getNeighborPosition(unsigned int k) const {return const_cast<QuonPListMessage*>(this)->getNeighborPosition(k);}
00183     virtual void setNeighborPosition(unsigned int k, const Vector2D& neighborPosition_var);
00184 };
00185 
00186 inline void doPacking(cCommBuffer *b, QuonPListMessage& obj) {obj.parsimPack(b);}
00187 inline void doUnpacking(cCommBuffer *b, QuonPListMessage& obj) {obj.parsimUnpack(b);}
00188 
00201 class QuonPMoveMessage : public QuonPMessage
00202 {
00203   protected:
00204     Vector2D newPosition_var;
00205     bool isBinding_var;
00206     NodeHandle neighborHandle_var[4];
00207     Vector2D neighborPosition_var[4];
00208 
00209     // protected and unimplemented operator==(), to prevent accidental usage
00210     bool operator==(const QuonPMoveMessage&);
00211 
00212   public:
00213     QuonPMoveMessage(const char *name=NULL, int kind=0);
00214     QuonPMoveMessage(const QuonPMoveMessage& other);
00215     virtual ~QuonPMoveMessage();
00216     QuonPMoveMessage& operator=(const QuonPMoveMessage& other);
00217     virtual QuonPMoveMessage *dup() const {return new QuonPMoveMessage(*this);}
00218     virtual void parsimPack(cCommBuffer *b);
00219     virtual void parsimUnpack(cCommBuffer *b);
00220 
00221     // field getter/setter methods
00222     virtual Vector2D& getNewPosition();
00223     virtual const Vector2D& getNewPosition() const {return const_cast<QuonPMoveMessage*>(this)->getNewPosition();}
00224     virtual void setNewPosition(const Vector2D& newPosition_var);
00225     virtual bool getIsBinding() const;
00226     virtual void setIsBinding(bool isBinding_var);
00227     virtual unsigned int getNeighborHandleArraySize() const;
00228     virtual NodeHandle& getNeighborHandle(unsigned int k);
00229     virtual const NodeHandle& getNeighborHandle(unsigned int k) const {return const_cast<QuonPMoveMessage*>(this)->getNeighborHandle(k);}
00230     virtual void setNeighborHandle(unsigned int k, const NodeHandle& neighborHandle_var);
00231     virtual unsigned int getNeighborPositionArraySize() const;
00232     virtual Vector2D& getNeighborPosition(unsigned int k);
00233     virtual const Vector2D& getNeighborPosition(unsigned int k) const {return const_cast<QuonPMoveMessage*>(this)->getNeighborPosition(k);}
00234     virtual void setNeighborPosition(unsigned int k, const Vector2D& neighborPosition_var);
00235 };
00236 
00237 inline void doPacking(cCommBuffer *b, QuonPMoveMessage& obj) {obj.parsimPack(b);}
00238 inline void doUnpacking(cCommBuffer *b, QuonPMoveMessage& obj) {obj.parsimUnpack(b);}
00239 
00248 class QuonPEventMessage : public QuonPMessage
00249 {
00250   protected:
00251 
00252     // protected and unimplemented operator==(), to prevent accidental usage
00253     bool operator==(const QuonPEventMessage&);
00254 
00255   public:
00256     QuonPEventMessage(const char *name=NULL, int kind=0);
00257     QuonPEventMessage(const QuonPEventMessage& other);
00258     virtual ~QuonPEventMessage();
00259     QuonPEventMessage& operator=(const QuonPEventMessage& other);
00260     virtual QuonPEventMessage *dup() const {return new QuonPEventMessage(*this);}
00261     virtual void parsimPack(cCommBuffer *b);
00262     virtual void parsimUnpack(cCommBuffer *b);
00263 
00264     // field getter/setter methods
00265 };
00266 
00267 inline void doPacking(cCommBuffer *b, QuonPEventMessage& obj) {obj.parsimPack(b);}
00268 inline void doUnpacking(cCommBuffer *b, QuonPEventMessage& obj) {obj.parsimUnpack(b);}
00269 
00270 
00271 #endif // _QUONP_M_H_

Generated on Fri Mar 20 18:40:26 2009 for OverSim by  doxygen 1.5.5