DHTMessage_m.h

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