BrooseMessage_m.h

Go to the documentation of this file.
00001 //
00002 // Generated file, do not edit! Created by opp_msgc 4.1 from overlay/broose/BrooseMessage.msg.
00003 //
00004 
00005 #ifndef _BROOSEMESSAGE_M_H_
00006 #define _BROOSEMESSAGE_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 <IPvXAddress.h>
00018 #include <NodeHandle.h>
00019 #include <CommonMessages_m.h>
00020 #include <OverlayKey.h>
00021 
00022 
00023 static const int INDEX_L = 8;
00024 static const int BUCKETTYPE_L = 2;
00025 static const int PROTOSTATE_L = 2;
00026 static const int STEP_L = 8;
00027 static const int RIGHTSHIFTING_L = 1;
00028 static const int NODENUM_L = 8;
00029 
00030 #define BUCKETCALL_L(msg) (BASECALL_L(msg) + INDEX_L + BUCKETTYPE_L + PROTOSTATE_L)
00031 #define BUCKETRESPONSE_L(msg) (BASERESPONSE_L(msg) + NODENUM_L \
00032                                + msg->getNodesArraySize() * NODEHANDLE_L)
00033 #define BROOSEFINDNODEEXTMESSAGE_L (KEY_L + STEP_L + RIGHTSHIFTING_L + NODEHANDLE_L)
00034 // }}
00035 
00036 
00037 
00050 enum BucketType {
00051     RIGHT = 0,
00052     LEFT = 1,
00053     BROTHER = 2
00054 };
00055 
00069 enum ProState {
00070     PINIT = 0,
00071     PRSET = 1,
00072     PBSET = 2,
00073     PREADY = 3
00074 };
00075 
00087 class BucketCall : public ::BaseCallMessage
00088 {
00089   protected:
00090     int bucketType_var;
00091     int bucketIndex_var;
00092     int proState_var;
00093 
00094     // protected and unimplemented operator==(), to prevent accidental usage
00095     bool operator==(const BucketCall&);
00096 
00097   public:
00098     BucketCall(const char *name=NULL, int kind=0);
00099     BucketCall(const BucketCall& other);
00100     virtual ~BucketCall();
00101     BucketCall& operator=(const BucketCall& other);
00102     virtual BucketCall *dup() const {return new BucketCall(*this);}
00103     virtual void parsimPack(cCommBuffer *b);
00104     virtual void parsimUnpack(cCommBuffer *b);
00105 
00106     // field getter/setter methods
00107     virtual int getBucketType() const;
00108     virtual void setBucketType(int bucketType_var);
00109     virtual int getBucketIndex() const;
00110     virtual void setBucketIndex(int bucketIndex_var);
00111     virtual int getProState() const;
00112     virtual void setProState(int proState_var);
00113 };
00114 
00115 inline void doPacking(cCommBuffer *b, BucketCall& obj) {obj.parsimPack(b);}
00116 inline void doUnpacking(cCommBuffer *b, BucketCall& obj) {obj.parsimUnpack(b);}
00117 
00127 class BucketResponse : public ::BaseResponseMessage
00128 {
00129   protected:
00130     ::NodeHandle *nodes_var; // array ptr
00131     unsigned int nodes_arraysize;
00132 
00133     // protected and unimplemented operator==(), to prevent accidental usage
00134     bool operator==(const BucketResponse&);
00135 
00136   public:
00137     BucketResponse(const char *name=NULL, int kind=0);
00138     BucketResponse(const BucketResponse& other);
00139     virtual ~BucketResponse();
00140     BucketResponse& operator=(const BucketResponse& other);
00141     virtual BucketResponse *dup() const {return new BucketResponse(*this);}
00142     virtual void parsimPack(cCommBuffer *b);
00143     virtual void parsimUnpack(cCommBuffer *b);
00144 
00145     // field getter/setter methods
00146     virtual void setNodesArraySize(unsigned int size);
00147     virtual unsigned int getNodesArraySize() const;
00148     virtual NodeHandle& getNodes(unsigned int k);
00149     virtual const NodeHandle& getNodes(unsigned int k) const {return const_cast<BucketResponse*>(this)->getNodes(k);}
00150     virtual void setNodes(unsigned int k, const NodeHandle& nodes_var);
00151 };
00152 
00153 inline void doPacking(cCommBuffer *b, BucketResponse& obj) {obj.parsimPack(b);}
00154 inline void doUnpacking(cCommBuffer *b, BucketResponse& obj) {obj.parsimUnpack(b);}
00155 
00169 class BrooseFindNodeExtMessage : public ::cPacket
00170 {
00171   protected:
00172     ::OverlayKey routeKey_var;
00173     int step_var;
00174     int maxDistance_var;
00175     bool rightShifting_var;
00176     ::NodeHandle lastNode_var;
00177 
00178     // protected and unimplemented operator==(), to prevent accidental usage
00179     bool operator==(const BrooseFindNodeExtMessage&);
00180 
00181   public:
00182     BrooseFindNodeExtMessage(const char *name=NULL, int kind=0);
00183     BrooseFindNodeExtMessage(const BrooseFindNodeExtMessage& other);
00184     virtual ~BrooseFindNodeExtMessage();
00185     BrooseFindNodeExtMessage& operator=(const BrooseFindNodeExtMessage& other);
00186     virtual BrooseFindNodeExtMessage *dup() const {return new BrooseFindNodeExtMessage(*this);}
00187     virtual void parsimPack(cCommBuffer *b);
00188     virtual void parsimUnpack(cCommBuffer *b);
00189 
00190     // field getter/setter methods
00191     virtual OverlayKey& getRouteKey();
00192     virtual const OverlayKey& getRouteKey() const {return const_cast<BrooseFindNodeExtMessage*>(this)->getRouteKey();}
00193     virtual void setRouteKey(const OverlayKey& routeKey_var);
00194     virtual int getStep() const;
00195     virtual void setStep(int step_var);
00196     virtual int getMaxDistance() const;
00197     virtual void setMaxDistance(int maxDistance_var);
00198     virtual bool getRightShifting() const;
00199     virtual void setRightShifting(bool rightShifting_var);
00200     virtual NodeHandle& getLastNode();
00201     virtual const NodeHandle& getLastNode() const {return const_cast<BrooseFindNodeExtMessage*>(this)->getLastNode();}
00202     virtual void setLastNode(const NodeHandle& lastNode_var);
00203 };
00204 
00205 inline void doPacking(cCommBuffer *b, BrooseFindNodeExtMessage& obj) {obj.parsimPack(b);}
00206 inline void doUnpacking(cCommBuffer *b, BrooseFindNodeExtMessage& obj) {obj.parsimUnpack(b);}
00207 
00208 
00209 #endif // _BROOSEMESSAGE_M_H_