OverSim
DHTMessage_m.h
Go to the documentation of this file.
1 //
2 // Generated file, do not edit! Created by opp_msgc 4.2 from applications/dht/DHTMessage.msg.
3 //
4 
5 #ifndef _DHTMESSAGE_M_H_
6 #define _DHTMESSAGE_M_H_
7 
8 #include <omnetpp.h>
9 
10 // opp_msgc version check
11 #define MSGC_VERSION 0x0402
12 #if (MSGC_VERSION!=OMNETPP_VERSION)
13 # error Version mismatch! Probably this file was generated by an earlier version of opp_msgc: 'make clean' should help.
14 #endif
15 
16 // cplusplus {{
17 #include <OverlayKey.h>
18 #include <IPvXAddress.h>
19 #include <BinaryValue.h>
20 #include <NodeHandle.h>
21 #include <CommonMessages_m.h>
22 
23 #define SUCCESS_L 8
24 #define KIND_L 32
25 #define ID_L 32
26 #define SEQNO_L 32
27 #define TTL_L 32
28 
29 #define RESULT_L(msg) (resultValuesBitLength(msg) + msg->getResultArraySize() * (KEY_L + KIND_L + ID_L + SEQNO_L + TTL_L + KEY_L + PUBKEY_L))
30 #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))
31 #define GETCALL_L(msg) (BASECALL_L(msg) + KEY_L + KIND_L + ID_L + sizeof(bool))
32 #define PUTRESPONSE_L(msg) (BASERESPONSE_L(msg) + SUCCESS_L)
33 #define GETRESPONSE_L(msg) (BASERESPONSE_L(msg) + KEY_L + msg->getHashValue().size() * sizeof(char) \
34  + RESULT_L(msg))
35 // }}
36 
37 
38 
56 {
57  protected:
60  uint32_t kind_var;
61  uint32_t id_var;
62  int ttl_var;
66 
67  private:
68  void copy(const DHTPutCall& other);
69 
70  protected:
71  // protected and unimplemented operator==(), to prevent accidental usage
72  bool operator==(const DHTPutCall&);
73 
74  public:
75  DHTPutCall(const char *name=NULL, int kind=0);
76  DHTPutCall(const DHTPutCall& other);
77  virtual ~DHTPutCall();
78  DHTPutCall& operator=(const DHTPutCall& other);
79  virtual DHTPutCall *dup() const {return new DHTPutCall(*this);}
80  virtual void parsimPack(cCommBuffer *b);
81  virtual void parsimUnpack(cCommBuffer *b);
82 
83  // field getter/setter methods
84  virtual OverlayKey& getKey();
85  virtual const OverlayKey& getKey() const {return const_cast<DHTPutCall*>(this)->getKey();}
86  virtual void setKey(const OverlayKey& key);
87  virtual BinaryValue& getValue();
88  virtual const BinaryValue& getValue() const {return const_cast<DHTPutCall*>(this)->getValue();}
89  virtual void setValue(const BinaryValue& value);
90  virtual uint32_t getKind() const;
91  virtual void setKind(uint32_t kind);
92  virtual uint32_t getId() const;
93  virtual void setId(uint32_t id);
94  virtual int getTtl() const;
95  virtual void setTtl(int ttl);
96  virtual bool getIsModifiable() const;
97  virtual void setIsModifiable(bool isModifiable);
98  virtual bool getMaintenance() const;
99  virtual void setMaintenance(bool maintenance);
100  virtual NodeHandle& getOwnerNode();
101  virtual const NodeHandle& getOwnerNode() const {return const_cast<DHTPutCall*>(this)->getOwnerNode();}
102  virtual void setOwnerNode(const NodeHandle& ownerNode);
103 };
104 
105 inline void doPacking(cCommBuffer *b, DHTPutCall& obj) {obj.parsimPack(b);}
106 inline void doUnpacking(cCommBuffer *b, DHTPutCall& obj) {obj.parsimUnpack(b);}
107 
121 {
122  protected:
124  uint32_t kind_var;
125  uint32_t id_var;
127 
128  private:
129  void copy(const DHTGetCall& other);
130 
131  protected:
132  // protected and unimplemented operator==(), to prevent accidental usage
133  bool operator==(const DHTGetCall&);
134 
135  public:
136  DHTGetCall(const char *name=NULL, int kind=0);
137  DHTGetCall(const DHTGetCall& other);
138  virtual ~DHTGetCall();
139  DHTGetCall& operator=(const DHTGetCall& other);
140  virtual DHTGetCall *dup() const {return new DHTGetCall(*this);}
141  virtual void parsimPack(cCommBuffer *b);
142  virtual void parsimUnpack(cCommBuffer *b);
143 
144  // field getter/setter methods
145  virtual OverlayKey& getKey();
146  virtual const OverlayKey& getKey() const {return const_cast<DHTGetCall*>(this)->getKey();}
147  virtual void setKey(const OverlayKey& key);
148  virtual uint32_t getKind() const;
149  virtual void setKind(uint32_t kind);
150  virtual uint32_t getId() const;
151  virtual void setId(uint32_t id);
152  virtual bool getIsHash() const;
153  virtual void setIsHash(bool isHash);
154 };
155 
156 inline void doPacking(cCommBuffer *b, DHTGetCall& obj) {obj.parsimPack(b);}
157 inline void doUnpacking(cCommBuffer *b, DHTGetCall& obj) {obj.parsimUnpack(b);}
158 
169 {
170  protected:
172 
173  private:
174  void copy(const DHTPutResponse& other);
175 
176  protected:
177  // protected and unimplemented operator==(), to prevent accidental usage
178  bool operator==(const DHTPutResponse&);
179 
180  public:
181  DHTPutResponse(const char *name=NULL, int kind=0);
182  DHTPutResponse(const DHTPutResponse& other);
183  virtual ~DHTPutResponse();
184  DHTPutResponse& operator=(const DHTPutResponse& other);
185  virtual DHTPutResponse *dup() const {return new DHTPutResponse(*this);}
186  virtual void parsimPack(cCommBuffer *b);
187  virtual void parsimUnpack(cCommBuffer *b);
188 
189  // field getter/setter methods
190  virtual bool getSuccess() const;
191  virtual void setSuccess(bool success);
192 };
193 
194 inline void doPacking(cCommBuffer *b, DHTPutResponse& obj) {obj.parsimPack(b);}
195 inline void doUnpacking(cCommBuffer *b, DHTPutResponse& obj) {obj.parsimUnpack(b);}
196 
210 {
211  protected:
215  DhtDumpEntry *result_var; // array ptr
216  unsigned int result_arraysize;
217 
218  private:
219  void copy(const DHTGetResponse& other);
220 
221  protected:
222  // protected and unimplemented operator==(), to prevent accidental usage
223  bool operator==(const DHTGetResponse&);
224 
225  public:
226  DHTGetResponse(const char *name=NULL, int kind=0);
227  DHTGetResponse(const DHTGetResponse& other);
228  virtual ~DHTGetResponse();
229  DHTGetResponse& operator=(const DHTGetResponse& other);
230  virtual DHTGetResponse *dup() const {return new DHTGetResponse(*this);}
231  virtual void parsimPack(cCommBuffer *b);
232  virtual void parsimUnpack(cCommBuffer *b);
233 
234  // field getter/setter methods
235  virtual OverlayKey& getKey();
236  virtual const OverlayKey& getKey() const {return const_cast<DHTGetResponse*>(this)->getKey();}
237  virtual void setKey(const OverlayKey& key);
238  virtual BinaryValue& getHashValue();
239  virtual const BinaryValue& getHashValue() const {return const_cast<DHTGetResponse*>(this)->getHashValue();}
240  virtual void setHashValue(const BinaryValue& hashValue);
241  virtual bool getIsHash() const;
242  virtual void setIsHash(bool isHash);
243  virtual void setResultArraySize(unsigned int size);
244  virtual unsigned int getResultArraySize() const;
245  virtual DhtDumpEntry& getResult(unsigned int k);
246  virtual const DhtDumpEntry& getResult(unsigned int k) const {return const_cast<DHTGetResponse*>(this)->getResult(k);}
247  virtual void setResult(unsigned int k, const DhtDumpEntry& result);
248 };
249 
250 inline void doPacking(cCommBuffer *b, DHTGetResponse& obj) {obj.parsimPack(b);}
251 inline void doUnpacking(cCommBuffer *b, DHTGetResponse& obj) {obj.parsimUnpack(b);}
252 
264 class DHTTtlTimer : public ::cMessage
265 {
266  protected:
268  uint32_t kind_var;
269  uint32_t id_var;
270 
271  private:
272  void copy(const DHTTtlTimer& other);
273 
274  protected:
275  // protected and unimplemented operator==(), to prevent accidental usage
276  bool operator==(const DHTTtlTimer&);
277 
278  public:
279  DHTTtlTimer(const char *name=NULL, int kind=0);
280  DHTTtlTimer(const DHTTtlTimer& other);
281  virtual ~DHTTtlTimer();
282  DHTTtlTimer& operator=(const DHTTtlTimer& other);
283  virtual DHTTtlTimer *dup() const {return new DHTTtlTimer(*this);}
284  virtual void parsimPack(cCommBuffer *b);
285  virtual void parsimUnpack(cCommBuffer *b);
286 
287  // field getter/setter methods
288  virtual OverlayKey& getKey();
289  virtual const OverlayKey& getKey() const {return const_cast<DHTTtlTimer*>(this)->getKey();}
290  virtual void setKey(const OverlayKey& key);
291  virtual uint32_t getKind() const;
292  virtual void setKind(uint32_t kind);
293  virtual uint32_t getId() const;
294  virtual void setId(uint32_t id);
295 };
296 
297 inline void doPacking(cCommBuffer *b, DHTTtlTimer& obj) {obj.parsimPack(b);}
298 inline void doUnpacking(cCommBuffer *b, DHTTtlTimer& obj) {obj.parsimUnpack(b);}
299 
300 
301 #endif // _DHTMESSAGE_M_H_