OverSim
NiceMessage_m.h
Go to the documentation of this file.
1 //
2 // Generated file, do not edit! Created by opp_msgc 4.2 from overlay/nice/NiceMessage.msg.
3 //
4 
5 #ifndef _NICEMESSAGE_M_H_
6 #define _NICEMESSAGE_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 <CommonMessages_m.h>
18 #include <NodeHandle.h>
19 
20 #define TRANSPORTADDRESS_L (IPADDR_L + UDPPORT_L)
21 
22 static const int NICECOMMAND_L = 8;
23 static const int LAYER_L = 16;
24 static const int INT_L = 32;
25 static const int SIMTIME_L = 32;
26 static const int BOOL_L = 8;
27 static const int DOUBLE_L = 64;
28 static const int SHORT_L = 16;
29 
30 #define NICEMESSAGE_L(msg) (BASEOVERLAY_L(msg) + NICECOMMAND_L + TRANSPORTADDRESS_L + LAYER_L)
31 #define NICEMEMBERMESSAGE_L(msg) (NICEMESSAGE_L(msg) + (msg->getMembersArraySize() * TRANSPORTADDRESS_L))
32 #define NICECLUSTERMERGE_L(msg) (NICEMEMBERMESSAGE_L(msg) + TRANSPORTADDRESS_L)
33 #define NICEHEARTBEAT_L(msg) (NICEMEMBERMESSAGE_L(msg) + (msg->getDistancesArraySize() * SIMTIME_L) + INT_L + INT_L + SIMTIME_L + INT_L)
34 #define NICELEADERHEARTBEAT_L(msg) (NICEHEARTBEAT_L(msg) + TRANSPORTADDRESS_L + (msg->getSupercluster_membersArraySize() * TRANSPORTADDRESS_L) + INT_L)
35 #define NICEMULTICAST_L(msg) (NICEMESSAGE_L(msg) + TRANSPORTADDRESS_L + DOUBLE_L + INT_L + INT_L)
36 // }}
37 
38 
39 
85 };
86 
99 {
100  protected:
103  short layer_var;
104 
105  private:
106  void copy(const NiceMessage& other);
107 
108  protected:
109  // protected and unimplemented operator==(), to prevent accidental usage
110  bool operator==(const NiceMessage&);
111 
112  public:
113  NiceMessage(const char *name=NULL, int kind=0);
114  NiceMessage(const NiceMessage& other);
115  virtual ~NiceMessage();
116  NiceMessage& operator=(const NiceMessage& other);
117  virtual NiceMessage *dup() const {return new NiceMessage(*this);}
118  virtual void parsimPack(cCommBuffer *b);
119  virtual void parsimUnpack(cCommBuffer *b);
120 
121  // field getter/setter methods
122  virtual int getCommand() const;
123  virtual void setCommand(int command);
124  virtual TransportAddress& getSrcNode();
125  virtual const TransportAddress& getSrcNode() const {return const_cast<NiceMessage*>(this)->getSrcNode();}
126  virtual void setSrcNode(const TransportAddress& srcNode);
127  virtual short getLayer() const;
128  virtual void setLayer(short layer);
129 };
130 
131 inline void doPacking(cCommBuffer *b, NiceMessage& obj) {obj.parsimPack(b);}
132 inline void doUnpacking(cCommBuffer *b, NiceMessage& obj) {obj.parsimUnpack(b);}
133 
144 {
145  protected:
147  unsigned int members_arraysize;
148 
149  private:
150  void copy(const NiceMemberMessage& other);
151 
152  protected:
153  // protected and unimplemented operator==(), to prevent accidental usage
154  bool operator==(const NiceMemberMessage&);
155 
156  public:
157  NiceMemberMessage(const char *name=NULL, int kind=0);
158  NiceMemberMessage(const NiceMemberMessage& other);
159  virtual ~NiceMemberMessage();
161  virtual NiceMemberMessage *dup() const {return new NiceMemberMessage(*this);}
162  virtual void parsimPack(cCommBuffer *b);
163  virtual void parsimUnpack(cCommBuffer *b);
164 
165  // field getter/setter methods
166  virtual void setMembersArraySize(unsigned int size);
167  virtual unsigned int getMembersArraySize() const;
168  virtual TransportAddress& getMembers(unsigned int k);
169  virtual const TransportAddress& getMembers(unsigned int k) const {return const_cast<NiceMemberMessage*>(this)->getMembers(k);}
170  virtual void setMembers(unsigned int k, const TransportAddress& members);
171 };
172 
173 inline void doPacking(cCommBuffer *b, NiceMemberMessage& obj) {obj.parsimPack(b);}
174 inline void doUnpacking(cCommBuffer *b, NiceMemberMessage& obj) {obj.parsimUnpack(b);}
175 
186 {
187  protected:
189 
190  private:
191  void copy(const NiceClusterMerge& other);
192 
193  protected:
194  // protected and unimplemented operator==(), to prevent accidental usage
195  bool operator==(const NiceClusterMerge&);
196 
197  public:
198  NiceClusterMerge(const char *name=NULL, int kind=0);
199  NiceClusterMerge(const NiceClusterMerge& other);
200  virtual ~NiceClusterMerge();
202  virtual NiceClusterMerge *dup() const {return new NiceClusterMerge(*this);}
203  virtual void parsimPack(cCommBuffer *b);
204  virtual void parsimUnpack(cCommBuffer *b);
205 
206  // field getter/setter methods
208  virtual const TransportAddress& getNewClusterLeader() const {return const_cast<NiceClusterMerge*>(this)->getNewClusterLeader();}
209  virtual void setNewClusterLeader(const TransportAddress& newClusterLeader);
210 };
211 
212 inline void doPacking(cCommBuffer *b, NiceClusterMerge& obj) {obj.parsimPack(b);}
213 inline void doUnpacking(cCommBuffer *b, NiceClusterMerge& obj) {obj.parsimUnpack(b);}
214 
230 {
231  protected:
232  unsigned int seqNo_var;
233  unsigned int seqRspNo_var;
234  double hb_delay_var;
235  double *distances_var; // array ptr
236  unsigned int distances_arraysize;
238  unsigned int sublayermembers_var;
239 
240  private:
241  void copy(const NiceHeartbeat& other);
242 
243  protected:
244  // protected and unimplemented operator==(), to prevent accidental usage
245  bool operator==(const NiceHeartbeat&);
246 
247  public:
248  NiceHeartbeat(const char *name=NULL, int kind=0);
249  NiceHeartbeat(const NiceHeartbeat& other);
250  virtual ~NiceHeartbeat();
251  NiceHeartbeat& operator=(const NiceHeartbeat& other);
252  virtual NiceHeartbeat *dup() const {return new NiceHeartbeat(*this);}
253  virtual void parsimPack(cCommBuffer *b);
254  virtual void parsimUnpack(cCommBuffer *b);
255 
256  // field getter/setter methods
257  virtual unsigned int getSeqNo() const;
258  virtual void setSeqNo(unsigned int seqNo);
259  virtual unsigned int getSeqRspNo() const;
260  virtual void setSeqRspNo(unsigned int seqRspNo);
261  virtual double getHb_delay() const;
262  virtual void setHb_delay(double hb_delay);
263  virtual void setDistancesArraySize(unsigned int size);
264  virtual unsigned int getDistancesArraySize() const;
265  virtual double getDistances(unsigned int k) const;
266  virtual void setDistances(unsigned int k, double distances);
267  virtual double getOne_hop_distance() const;
268  virtual void setOne_hop_distance(double one_hop_distance);
269  virtual unsigned int getSublayermembers() const;
270  virtual void setSublayermembers(unsigned int sublayermembers);
271 };
272 
273 inline void doPacking(cCommBuffer *b, NiceHeartbeat& obj) {obj.parsimPack(b);}
274 inline void doUnpacking(cCommBuffer *b, NiceHeartbeat& obj) {obj.parsimUnpack(b);}
275 
289 {
290  protected:
294  unsigned int k_var;
295  unsigned int sc_tolerance_var;
296 
297  private:
298  void copy(const NiceLeaderHeartbeat& other);
299 
300  protected:
301  // protected and unimplemented operator==(), to prevent accidental usage
302  bool operator==(const NiceLeaderHeartbeat&);
303 
304  public:
305  NiceLeaderHeartbeat(const char *name=NULL, int kind=0);
307  virtual ~NiceLeaderHeartbeat();
309  virtual NiceLeaderHeartbeat *dup() const {return new NiceLeaderHeartbeat(*this);}
310  virtual void parsimPack(cCommBuffer *b);
311  virtual void parsimUnpack(cCommBuffer *b);
312 
313  // field getter/setter methods
315  virtual const TransportAddress& getSupercluster_leader() const {return const_cast<NiceLeaderHeartbeat*>(this)->getSupercluster_leader();}
316  virtual void setSupercluster_leader(const TransportAddress& supercluster_leader);
317  virtual void setSupercluster_membersArraySize(unsigned int size);
318  virtual unsigned int getSupercluster_membersArraySize() const;
319  virtual TransportAddress& getSupercluster_members(unsigned int k);
320  virtual const TransportAddress& getSupercluster_members(unsigned int k) const {return const_cast<NiceLeaderHeartbeat*>(this)->getSupercluster_members(k);}
321  virtual void setSupercluster_members(unsigned int k, const TransportAddress& supercluster_members);
322  virtual unsigned int getK() const;
323  virtual void setK(unsigned int k);
324  virtual unsigned int getSc_tolerance() const;
325  virtual void setSc_tolerance(unsigned int sc_tolerance);
326 };
327 
328 inline void doPacking(cCommBuffer *b, NiceLeaderHeartbeat& obj) {obj.parsimPack(b);}
329 inline void doUnpacking(cCommBuffer *b, NiceLeaderHeartbeat& obj) {obj.parsimUnpack(b);}
330 
344 {
345  protected:
347  double sendTime_var;
348  unsigned int seqNo_var;
349  unsigned int hopCount_var;
350 
351  private:
352  void copy(const NiceMulticastMessage& other);
353 
354  protected:
355  // protected and unimplemented operator==(), to prevent accidental usage
356  bool operator==(const NiceMulticastMessage&);
357 
358  public:
359  NiceMulticastMessage(const char *name=NULL, int kind=0);
361  virtual ~NiceMulticastMessage();
363  virtual NiceMulticastMessage *dup() const {return new NiceMulticastMessage(*this);}
364  virtual void parsimPack(cCommBuffer *b);
365  virtual void parsimUnpack(cCommBuffer *b);
366 
367  // field getter/setter methods
368  virtual TransportAddress& getLastHop();
369  virtual const TransportAddress& getLastHop() const {return const_cast<NiceMulticastMessage*>(this)->getLastHop();}
370  virtual void setLastHop(const TransportAddress& lastHop);
371  virtual double getSendTime() const;
372  virtual void setSendTime(double sendTime);
373  virtual unsigned int getSeqNo() const;
374  virtual void setSeqNo(unsigned int seqNo);
375  virtual unsigned int getHopCount() const;
376  virtual void setHopCount(unsigned int hopCount);
377 };
378 
379 inline void doPacking(cCommBuffer *b, NiceMulticastMessage& obj) {obj.parsimPack(b);}
380 inline void doUnpacking(cCommBuffer *b, NiceMulticastMessage& obj) {obj.parsimUnpack(b);}
381 
382 
383 #endif // _NICEMESSAGE_M_H_