DHTMessage_m.h

Go to the documentation of this file.
00001 //
00002 // Generated file, do not edit! Created by opp_msgc 4.0 from applications/dht/DHTMessage.msg.
00003 //
00004 
00005 #ifndef _DHTMESSAGE_M_H_
00006 #define _DHTMESSAGE_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 <OverlayKey.h>
00019 #include <IPvXAddress.h>
00020 #include <BinaryValue.h>
00021 #include <NodeHandle.h>
00022 #include <CommonMessages_m.h>
00023 
00024 #define RESULT_L(msg) (resultValuesBitLength(msg) + msg->getResultArraySize() * (KEY_L + 2 * sizeof(uint32_t) + sizeof(int) + 2 * sizeof(bool) + NODEHANDLE_L))
00025 #define PUTCALL_L(msg) (BASECALL_L(msg) + KEY_L + msg->getValue().size() * sizeof(char) + sizeof(int) + sizeof(int32_t) + sizeof(int32_t) + sizeof(bool) * 2 + NODEHANDLE_L)
00026 #define GETCALL_L(msg) (BASECALL_L(msg) + sizeof(bool))
00027 #define PUTRESPONSE_L(msg) (BASERESPONSE_L(msg) + KEY_L + msg->getValue().size() * sizeof(char))
00028 #define GETRESPONSE_L(msg) (BASERESPONSE_L(msg) + KEY_L + msg->getHashValue().size() * sizeof(char) \
00029                             + RESULT_L(msg) + sizeof(bool))
00030 // end cplusplus
00031 
00032 
00033 
00050 class DHTPutCall : public BaseCallMessage
00051 {
00052   protected:
00053     OverlayKey key_var;
00054     BinaryValue value_var;
00055     uint32_t kind_var;
00056     uint32_t id_var;
00057     int ttl_var;
00058     bool isModifiable_var;
00059     bool maintenance_var;
00060     NodeHandle ownerNode_var;
00061 
00062     // protected and unimplemented operator==(), to prevent accidental usage
00063     bool operator==(const DHTPutCall&);
00064 
00065   public:
00066     DHTPutCall(const char *name=NULL, int kind=0);
00067     DHTPutCall(const DHTPutCall& other);
00068     virtual ~DHTPutCall();
00069     DHTPutCall& operator=(const DHTPutCall& other);
00070     virtual DHTPutCall *dup() const {return new DHTPutCall(*this);}
00071     virtual void parsimPack(cCommBuffer *b);
00072     virtual void parsimUnpack(cCommBuffer *b);
00073 
00074     // field getter/setter methods
00075     virtual OverlayKey& getKey();
00076     virtual const OverlayKey& getKey() const {return const_cast<DHTPutCall*>(this)->getKey();}
00077     virtual void setKey(const OverlayKey& key_var);
00078     virtual BinaryValue& getValue();
00079     virtual const BinaryValue& getValue() const {return const_cast<DHTPutCall*>(this)->getValue();}
00080     virtual void setValue(const BinaryValue& value_var);
00081     virtual uint32_t getKind() const;
00082     virtual void setKind(uint32_t kind_var);
00083     virtual uint32_t getId() const;
00084     virtual void setId(uint32_t id_var);
00085     virtual int getTtl() const;
00086     virtual void setTtl(int ttl_var);
00087     virtual bool getIsModifiable() const;
00088     virtual void setIsModifiable(bool isModifiable_var);
00089     virtual bool getMaintenance() const;
00090     virtual void setMaintenance(bool maintenance_var);
00091     virtual NodeHandle& getOwnerNode();
00092     virtual const NodeHandle& getOwnerNode() const {return const_cast<DHTPutCall*>(this)->getOwnerNode();}
00093     virtual void setOwnerNode(const NodeHandle& ownerNode_var);
00094 };
00095 
00096 inline void doPacking(cCommBuffer *b, DHTPutCall& obj) {obj.parsimPack(b);}
00097 inline void doUnpacking(cCommBuffer *b, DHTPutCall& obj) {obj.parsimUnpack(b);}
00098 
00111 class DHTGetCall : public BaseCallMessage
00112 {
00113   protected:
00114     OverlayKey key_var;
00115     uint32_t kind_var;
00116     uint32_t id_var;
00117     bool isHash_var;
00118 
00119     // protected and unimplemented operator==(), to prevent accidental usage
00120     bool operator==(const DHTGetCall&);
00121 
00122   public:
00123     DHTGetCall(const char *name=NULL, int kind=0);
00124     DHTGetCall(const DHTGetCall& other);
00125     virtual ~DHTGetCall();
00126     DHTGetCall& operator=(const DHTGetCall& other);
00127     virtual DHTGetCall *dup() const {return new DHTGetCall(*this);}
00128     virtual void parsimPack(cCommBuffer *b);
00129     virtual void parsimUnpack(cCommBuffer *b);
00130 
00131     // field getter/setter methods
00132     virtual OverlayKey& getKey();
00133     virtual const OverlayKey& getKey() const {return const_cast<DHTGetCall*>(this)->getKey();}
00134     virtual void setKey(const OverlayKey& key_var);
00135     virtual uint32_t getKind() const;
00136     virtual void setKind(uint32_t kind_var);
00137     virtual uint32_t getId() const;
00138     virtual void setId(uint32_t id_var);
00139     virtual bool getIsHash() const;
00140     virtual void setIsHash(bool isHash_var);
00141 };
00142 
00143 inline void doPacking(cCommBuffer *b, DHTGetCall& obj) {obj.parsimPack(b);}
00144 inline void doUnpacking(cCommBuffer *b, DHTGetCall& obj) {obj.parsimUnpack(b);}
00145 
00156 class DHTPutResponse : public BaseResponseMessage
00157 {
00158   protected:
00159     OverlayKey key_var;
00160     BinaryValue value_var;
00161 
00162     // protected and unimplemented operator==(), to prevent accidental usage
00163     bool operator==(const DHTPutResponse&);
00164 
00165   public:
00166     DHTPutResponse(const char *name=NULL, int kind=0);
00167     DHTPutResponse(const DHTPutResponse& other);
00168     virtual ~DHTPutResponse();
00169     DHTPutResponse& operator=(const DHTPutResponse& other);
00170     virtual DHTPutResponse *dup() const {return new DHTPutResponse(*this);}
00171     virtual void parsimPack(cCommBuffer *b);
00172     virtual void parsimUnpack(cCommBuffer *b);
00173 
00174     // field getter/setter methods
00175     virtual OverlayKey& getKey();
00176     virtual const OverlayKey& getKey() const {return const_cast<DHTPutResponse*>(this)->getKey();}
00177     virtual void setKey(const OverlayKey& key_var);
00178     virtual BinaryValue& getValue();
00179     virtual const BinaryValue& getValue() const {return const_cast<DHTPutResponse*>(this)->getValue();}
00180     virtual void setValue(const BinaryValue& value_var);
00181 };
00182 
00183 inline void doPacking(cCommBuffer *b, DHTPutResponse& obj) {obj.parsimPack(b);}
00184 inline void doUnpacking(cCommBuffer *b, DHTPutResponse& obj) {obj.parsimUnpack(b);}
00185 
00198 class DHTGetResponse : public BaseResponseMessage
00199 {
00200   protected:
00201     OverlayKey key_var;
00202     BinaryValue hashValue_var;
00203     bool isHash_var;
00204     DhtDumpEntry *result_var; // array ptr
00205     unsigned int result_arraysize;
00206 
00207     // protected and unimplemented operator==(), to prevent accidental usage
00208     bool operator==(const DHTGetResponse&);
00209 
00210   public:
00211     DHTGetResponse(const char *name=NULL, int kind=0);
00212     DHTGetResponse(const DHTGetResponse& other);
00213     virtual ~DHTGetResponse();
00214     DHTGetResponse& operator=(const DHTGetResponse& other);
00215     virtual DHTGetResponse *dup() const {return new DHTGetResponse(*this);}
00216     virtual void parsimPack(cCommBuffer *b);
00217     virtual void parsimUnpack(cCommBuffer *b);
00218 
00219     // field getter/setter methods
00220     virtual OverlayKey& getKey();
00221     virtual const OverlayKey& getKey() const {return const_cast<DHTGetResponse*>(this)->getKey();}
00222     virtual void setKey(const OverlayKey& key_var);
00223     virtual BinaryValue& getHashValue();
00224     virtual const BinaryValue& getHashValue() const {return const_cast<DHTGetResponse*>(this)->getHashValue();}
00225     virtual void setHashValue(const BinaryValue& hashValue_var);
00226     virtual bool getIsHash() const;
00227     virtual void setIsHash(bool isHash_var);
00228     virtual void setResultArraySize(unsigned int size);
00229     virtual unsigned int getResultArraySize() const;
00230     virtual DhtDumpEntry& getResult(unsigned int k);
00231     virtual const DhtDumpEntry& getResult(unsigned int k) const {return const_cast<DHTGetResponse*>(this)->getResult(k);}
00232     virtual void setResult(unsigned int k, const DhtDumpEntry& result_var);
00233 };
00234 
00235 inline void doPacking(cCommBuffer *b, DHTGetResponse& obj) {obj.parsimPack(b);}
00236 inline void doUnpacking(cCommBuffer *b, DHTGetResponse& obj) {obj.parsimUnpack(b);}
00237 
00249 class DHTTtlTimer : public cMessage
00250 {
00251   protected:
00252     OverlayKey key_var;
00253     uint32_t kind_var;
00254     uint32_t id_var;
00255 
00256     // protected and unimplemented operator==(), to prevent accidental usage
00257     bool operator==(const DHTTtlTimer&);
00258 
00259   public:
00260     DHTTtlTimer(const char *name=NULL, int kind=0);
00261     DHTTtlTimer(const DHTTtlTimer& other);
00262     virtual ~DHTTtlTimer();
00263     DHTTtlTimer& operator=(const DHTTtlTimer& other);
00264     virtual DHTTtlTimer *dup() const {return new DHTTtlTimer(*this);}
00265     virtual void parsimPack(cCommBuffer *b);
00266     virtual void parsimUnpack(cCommBuffer *b);
00267 
00268     // field getter/setter methods
00269     virtual OverlayKey& getKey();
00270     virtual const OverlayKey& getKey() const {return const_cast<DHTTtlTimer*>(this)->getKey();}
00271     virtual void setKey(const OverlayKey& key_var);
00272     virtual uint32_t getKind() const;
00273     virtual void setKind(uint32_t kind_var);
00274     virtual uint32_t getId() const;
00275     virtual void setId(uint32_t id_var);
00276 };
00277 
00278 inline void doPacking(cCommBuffer *b, DHTTtlTimer& obj) {obj.parsimPack(b);}
00279 inline void doUnpacking(cCommBuffer *b, DHTTtlTimer& obj) {obj.parsimUnpack(b);}
00280 
00281 
00282 #endif // _DHTMESSAGE_M_H_

Generated on Tue Sep 8 17:26:52 2009 for OverSim by  doxygen 1.5.8