OverSim
GiaMessage_m.h
Go to the documentation of this file.
1 //
2 // Generated file, do not edit! Created by opp_msgc 4.2 from overlay/gia/GiaMessage.msg.
3 //
4 
5 #ifndef _GIAMESSAGE_M_H_
6 #define _GIAMESSAGE_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 <IPvXAddress.h>
18 #include <OverlayKey.h>
19 #include <GiaNode.h>
20 #include <NodeHandle.h>
21 #include <CommonMessages_m.h>
22 
23 
24 static const int GIACOMMAND_L = 8;
25 static const int CAPACITY_L = 32;
26 static const int DEGREE_L = 16;
27 static const int TOKENNR_L = 16;
28 static const int MAXRESPONSES_L = 16;
29 #define GIANODE_L (CAPACITY_L + DEGREE_L + NODEHANDLE_L + 2 * TOKENNR_L)
30 
31 #define GIA_L(msg) (BASEOVERLAY_L(msg) + NODEHANDLE_L + HOPCOUNT_L + \
32  GIACOMMAND_L + CAPACITY_L + DEGREE_L)
33 #define GIANEIGHBOR_L(msg) (GIA_L(msg) + msg->getNeighborsArraySize() * GIANODE_L)
34 #define TOKEN_L(msg) (GIA_L(msg) + 2 * TOKENNR_L)
35 #define GIAID_L(msg) (GIA_L(msg) + KEY_L)
36 #define GIAROUTE_L(msg) (GIAID_L(msg) + KEY_L + IPADDR_L + UDPPORT_L)
37 #define KEYLIST_L(msg) (GIA_L(msg) + (msg->getKeysArraySize() * KEY_L))
38 #define SEARCH_L(msg) (GIAID_L(msg) + KEY_L + MAXRESPONSES_L + \
39  msg->getReversePathArraySize() * KEY_L + \
40  msg->getFoundNodeArraySize() * KEY_L)
41 #define SEARCHRESPONSE_L(msg) (GIAID_L(msg) + KEY_L + msg->getReversePathArraySize() * KEY_L + \
42  GIANODE_L + HOPCOUNT_L)
43 // }}
44 
45 
46 
66 enum GIACommand {
69  JOIN_ACK = 2,
70  JOIN_DENY = 3,
72  ROUTE = 5,
73  SEARCH = 6,
74  ANSWER = 7,
75  UPDATE = 8,
76  TOKEN = 9,
77  KEYLIST = 10
78 };
79 
94 {
95  protected:
101 
102  private:
103  void copy(const GiaMessage& other);
104 
105  protected:
106  // protected and unimplemented operator==(), to prevent accidental usage
107  bool operator==(const GiaMessage&);
108 
109  public:
110  GiaMessage(const char *name=NULL, int kind=0);
111  GiaMessage(const GiaMessage& other);
112  virtual ~GiaMessage();
113  GiaMessage& operator=(const GiaMessage& other);
114  virtual GiaMessage *dup() const {return new GiaMessage(*this);}
115  virtual void parsimPack(cCommBuffer *b);
116  virtual void parsimUnpack(cCommBuffer *b);
117 
118  // field getter/setter methods
119  virtual NodeHandle& getSrcNode();
120  virtual const NodeHandle& getSrcNode() const {return const_cast<GiaMessage*>(this)->getSrcNode();}
121  virtual void setSrcNode(const NodeHandle& srcNode);
122  virtual int getHopCount() const;
123  virtual void setHopCount(int hopCount);
124  virtual int getCommand() const;
125  virtual void setCommand(int command);
126  virtual double getSrcCapacity() const;
127  virtual void setSrcCapacity(double srcCapacity);
128  virtual int getSrcDegree() const;
129  virtual void setSrcDegree(int srcDegree);
130 };
131 
132 inline void doPacking(cCommBuffer *b, GiaMessage& obj) {obj.parsimPack(b);}
133 inline void doUnpacking(cCommBuffer *b, GiaMessage& obj) {obj.parsimUnpack(b);}
134 
145 {
146  protected:
147  GiaNode *neighbors_var; // array ptr
148  unsigned int neighbors_arraysize;
149 
150  private:
151  void copy(const GiaNeighborMessage& other);
152 
153  protected:
154  // protected and unimplemented operator==(), to prevent accidental usage
155  bool operator==(const GiaNeighborMessage&);
156 
157  public:
158  GiaNeighborMessage(const char *name=NULL, int kind=0);
160  virtual ~GiaNeighborMessage();
162  virtual GiaNeighborMessage *dup() const {return new GiaNeighborMessage(*this);}
163  virtual void parsimPack(cCommBuffer *b);
164  virtual void parsimUnpack(cCommBuffer *b);
165 
166  // field getter/setter methods
167  virtual void setNeighborsArraySize(unsigned int size);
168  virtual unsigned int getNeighborsArraySize() const;
169  virtual GiaNode& getNeighbors(unsigned int k);
170  virtual const GiaNode& getNeighbors(unsigned int k) const {return const_cast<GiaNeighborMessage*>(this)->getNeighbors(k);}
171  virtual void setNeighbors(unsigned int k, const GiaNode& neighbors);
172 };
173 
174 inline void doPacking(cCommBuffer *b, GiaNeighborMessage& obj) {obj.parsimPack(b);}
175 inline void doUnpacking(cCommBuffer *b, GiaNeighborMessage& obj) {obj.parsimUnpack(b);}
176 
188 {
189  protected:
192 
193  private:
194  void copy(const TokenMessage& other);
195 
196  protected:
197  // protected and unimplemented operator==(), to prevent accidental usage
198  bool operator==(const TokenMessage&);
199 
200  public:
201  TokenMessage(const char *name=NULL, int kind=0);
202  TokenMessage(const TokenMessage& other);
203  virtual ~TokenMessage();
204  TokenMessage& operator=(const TokenMessage& other);
205  virtual TokenMessage *dup() const {return new TokenMessage(*this);}
206  virtual void parsimPack(cCommBuffer *b);
207  virtual void parsimUnpack(cCommBuffer *b);
208 
209  // field getter/setter methods
210  virtual int getSrcTokenNr() const;
211  virtual void setSrcTokenNr(int srcTokenNr);
212  virtual int getDstTokenNr() const;
213  virtual void setDstTokenNr(int dstTokenNr);
214 };
215 
216 inline void doPacking(cCommBuffer *b, TokenMessage& obj) {obj.parsimPack(b);}
217 inline void doUnpacking(cCommBuffer *b, TokenMessage& obj) {obj.parsimUnpack(b);}
218 
230 {
231  protected:
234 
235  private:
236  void copy(const GiaIDMessage& other);
237 
238  protected:
239  // protected and unimplemented operator==(), to prevent accidental usage
240  bool operator==(const GiaIDMessage&);
241 
242  public:
243  GiaIDMessage(const char *name=NULL, int kind=0);
244  GiaIDMessage(const GiaIDMessage& other);
245  virtual ~GiaIDMessage();
246  GiaIDMessage& operator=(const GiaIDMessage& other);
247  virtual GiaIDMessage *dup() const {return new GiaIDMessage(*this);}
248  virtual void parsimPack(cCommBuffer *b);
249  virtual void parsimUnpack(cCommBuffer *b);
250 
251  // field getter/setter methods
252  virtual OverlayKey& getDestKey();
253  virtual const OverlayKey& getDestKey() const {return const_cast<GiaIDMessage*>(this)->getDestKey();}
254  virtual void setDestKey(const OverlayKey& destKey);
255  virtual OverlayKey& getID();
256  virtual const OverlayKey& getID() const {return const_cast<GiaIDMessage*>(this)->getID();}
257  virtual void setID(const OverlayKey& ID);
258 };
259 
260 inline void doPacking(cCommBuffer *b, GiaIDMessage& obj) {obj.parsimPack(b);}
261 inline void doUnpacking(cCommBuffer *b, GiaIDMessage& obj) {obj.parsimUnpack(b);}
262 
275 {
276  protected:
278  IPvXAddress originatorIP_var;
280 
281  private:
282  void copy(const GiaRouteMessage& other);
283 
284  protected:
285  // protected and unimplemented operator==(), to prevent accidental usage
286  bool operator==(const GiaRouteMessage&);
287 
288  public:
289  GiaRouteMessage(const char *name=NULL, int kind=0);
290  GiaRouteMessage(const GiaRouteMessage& other);
291  virtual ~GiaRouteMessage();
293  virtual GiaRouteMessage *dup() const {return new GiaRouteMessage(*this);}
294  virtual void parsimPack(cCommBuffer *b);
295  virtual void parsimUnpack(cCommBuffer *b);
296 
297  // field getter/setter methods
298  virtual OverlayKey& getOriginatorKey();
299  virtual const OverlayKey& getOriginatorKey() const {return const_cast<GiaRouteMessage*>(this)->getOriginatorKey();}
300  virtual void setOriginatorKey(const OverlayKey& originatorKey);
301  virtual IPvXAddress& getOriginatorIP();
302  virtual const IPvXAddress& getOriginatorIP() const {return const_cast<GiaRouteMessage*>(this)->getOriginatorIP();}
303  virtual void setOriginatorIP(const IPvXAddress& originatorIP);
304  virtual int getOriginatorPort() const;
305  virtual void setOriginatorPort(int originatorPort);
306 };
307 
308 inline void doPacking(cCommBuffer *b, GiaRouteMessage& obj) {obj.parsimPack(b);}
309 inline void doUnpacking(cCommBuffer *b, GiaRouteMessage& obj) {obj.parsimUnpack(b);}
310 
321 {
322  protected:
323  OverlayKey *keys_var; // array ptr
324  unsigned int keys_arraysize;
325 
326  private:
327  void copy(const KeyListMessage& other);
328 
329  protected:
330  // protected and unimplemented operator==(), to prevent accidental usage
331  bool operator==(const KeyListMessage&);
332 
333  public:
334  KeyListMessage(const char *name=NULL, int kind=0);
335  KeyListMessage(const KeyListMessage& other);
336  virtual ~KeyListMessage();
337  KeyListMessage& operator=(const KeyListMessage& other);
338  virtual KeyListMessage *dup() const {return new KeyListMessage(*this);}
339  virtual void parsimPack(cCommBuffer *b);
340  virtual void parsimUnpack(cCommBuffer *b);
341 
342  // field getter/setter methods
343  virtual void setKeysArraySize(unsigned int size);
344  virtual unsigned int getKeysArraySize() const;
345  virtual OverlayKey& getKeys(unsigned int k);
346  virtual const OverlayKey& getKeys(unsigned int k) const {return const_cast<KeyListMessage*>(this)->getKeys(k);}
347  virtual void setKeys(unsigned int k, const OverlayKey& keys);
348 };
349 
350 inline void doPacking(cCommBuffer *b, KeyListMessage& obj) {obj.parsimPack(b);}
351 inline void doUnpacking(cCommBuffer *b, KeyListMessage& obj) {obj.parsimUnpack(b);}
352 
366 {
367  protected:
371  unsigned int reversePath_arraysize;
372  OverlayKey *foundNode_var; // array ptr
373  unsigned int foundNode_arraysize;
374 
375  private:
376  void copy(const SearchMessage& other);
377 
378  protected:
379  // protected and unimplemented operator==(), to prevent accidental usage
380  bool operator==(const SearchMessage&);
381 
382  public:
383  SearchMessage(const char *name=NULL, int kind=0);
384  SearchMessage(const SearchMessage& other);
385  virtual ~SearchMessage();
386  SearchMessage& operator=(const SearchMessage& other);
387  virtual SearchMessage *dup() const {return new SearchMessage(*this);}
388  virtual void parsimPack(cCommBuffer *b);
389  virtual void parsimUnpack(cCommBuffer *b);
390 
391  // field getter/setter methods
392  virtual OverlayKey& getSearchKey();
393  virtual const OverlayKey& getSearchKey() const {return const_cast<SearchMessage*>(this)->getSearchKey();}
394  virtual void setSearchKey(const OverlayKey& searchKey);
395  virtual int getMaxResponses() const;
396  virtual void setMaxResponses(int maxResponses);
397  virtual void setReversePathArraySize(unsigned int size);
398  virtual unsigned int getReversePathArraySize() const;
399  virtual OverlayKey& getReversePath(unsigned int k);
400  virtual const OverlayKey& getReversePath(unsigned int k) const {return const_cast<SearchMessage*>(this)->getReversePath(k);}
401  virtual void setReversePath(unsigned int k, const OverlayKey& reversePath);
402  virtual void setFoundNodeArraySize(unsigned int size);
403  virtual unsigned int getFoundNodeArraySize() const;
404  virtual OverlayKey& getFoundNode(unsigned int k);
405  virtual const OverlayKey& getFoundNode(unsigned int k) const {return const_cast<SearchMessage*>(this)->getFoundNode(k);}
406  virtual void setFoundNode(unsigned int k, const OverlayKey& foundNode);
407 };
408 
409 inline void doPacking(cCommBuffer *b, SearchMessage& obj) {obj.parsimPack(b);}
410 inline void doUnpacking(cCommBuffer *b, SearchMessage& obj) {obj.parsimUnpack(b);}
411 
425 {
426  protected:
429  unsigned int reversePath_arraysize;
432 
433  private:
434  void copy(const SearchResponseMessage& other);
435 
436  protected:
437  // protected and unimplemented operator==(), to prevent accidental usage
438  bool operator==(const SearchResponseMessage&);
439 
440  public:
441  SearchResponseMessage(const char *name=NULL, int kind=0);
443  virtual ~SearchResponseMessage();
445  virtual SearchResponseMessage *dup() const {return new SearchResponseMessage(*this);}
446  virtual void parsimPack(cCommBuffer *b);
447  virtual void parsimUnpack(cCommBuffer *b);
448 
449  // field getter/setter methods
450  virtual OverlayKey& getSearchKey();
451  virtual const OverlayKey& getSearchKey() const {return const_cast<SearchResponseMessage*>(this)->getSearchKey();}
452  virtual void setSearchKey(const OverlayKey& searchKey);
453  virtual void setReversePathArraySize(unsigned int size);
454  virtual unsigned int getReversePathArraySize() const;
455  virtual OverlayKey& getReversePath(unsigned int k);
456  virtual const OverlayKey& getReversePath(unsigned int k) const {return const_cast<SearchResponseMessage*>(this)->getReversePath(k);}
457  virtual void setReversePath(unsigned int k, const OverlayKey& reversePath);
458  virtual GiaNode& getFoundNode();
459  virtual const GiaNode& getFoundNode() const {return const_cast<SearchResponseMessage*>(this)->getFoundNode();}
460  virtual void setFoundNode(const GiaNode& foundNode);
461  virtual int getSearchHopCount() const;
462  virtual void setSearchHopCount(int searchHopCount);
463 };
464 
465 inline void doPacking(cCommBuffer *b, SearchResponseMessage& obj) {obj.parsimPack(b);}
466 inline void doUnpacking(cCommBuffer *b, SearchResponseMessage& obj) {obj.parsimUnpack(b);}
467 
468 
469 #endif // _GIAMESSAGE_M_H_