OverSim
I3Message_m.h
Go to the documentation of this file.
1 //
2 // Generated file, do not edit! Created by opp_msgc 4.2 from applications/i3/I3Message.msg.
3 //
4 
5 #ifndef _I3MESSAGE_M_H_
6 #define _I3MESSAGE_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 "I3Trigger.h"
18 #include "I3IdentifierStack.h"
19 #include "I3Identifier.h"
20 #include "I3IPAddress.h"
21 
22 #define I3TYPE_L 2
23 #define I3BOOL_L 1
24 #define I3TIME_L 32
25 #define INSERT_TRIGGER_L(msg) (I3TYPE_L + I3BOOL_L + msg->getTrigger().length() + msg->getSource().length())
26 #define QUERY_REPLY_L(msg) (I3TYPE_L + msg->getSource().length() + msg->getIdentifier().length() + I3TIME_L)
27 #define REMOVE_TRIGGER_L(msg) (I3TYPE_L + msg->getTrigger().length())
28 #define SEND_PACKET_L(msg) (I3TYPE_L + msg->getIdentifierStack().length() + msg->getMatchedTrigger().length())
29 // }}
30 
31 
32 
51 };
52 
62 class I3Message : public ::cPacket
63 {
64  protected:
65  int type_var;
66 
67  private:
68  void copy(const I3Message& other);
69 
70  protected:
71  // protected and unimplemented operator==(), to prevent accidental usage
72  bool operator==(const I3Message&);
73 
74  public:
75  I3Message(const char *name=NULL, int kind=0);
76  I3Message(const I3Message& other);
77  virtual ~I3Message();
78  I3Message& operator=(const I3Message& other);
79  virtual I3Message *dup() const {return new I3Message(*this);}
80  virtual void parsimPack(cCommBuffer *b);
81  virtual void parsimUnpack(cCommBuffer *b);
82 
83  // field getter/setter methods
84  virtual int getType() const;
85  virtual void setType(int type);
86 };
87 
88 inline void doPacking(cCommBuffer *b, I3Message& obj) {obj.parsimPack(b);}
89 inline void doUnpacking(cCommBuffer *b, I3Message& obj) {obj.parsimUnpack(b);}
90 
128 {
129  protected:
133 
134  private:
135  void copy(const I3InsertTriggerMessage_Base& other);
136 
137  protected:
138  // protected and unimplemented operator==(), to prevent accidental usage
140  // make constructors protected to avoid instantiation
141  I3InsertTriggerMessage_Base(const char *name=NULL, int kind=0);
143  // make assignment operator protected to force the user override it
145 
146  public:
148  virtual I3InsertTriggerMessage_Base *dup() const {throw cRuntimeError("You forgot to manually add a dup() function to class I3InsertTriggerMessage");}
149  virtual void parsimPack(cCommBuffer *b);
150  virtual void parsimUnpack(cCommBuffer *b);
151 
152  // field getter/setter methods
153  virtual bool getSendReply() const;
154  virtual void setSendReply(bool sendReply);
155  virtual I3Trigger& getTrigger();
156  virtual const I3Trigger& getTrigger() const {return const_cast<I3InsertTriggerMessage_Base*>(this)->getTrigger();}
157  virtual void setTrigger(const I3Trigger& trigger);
158  virtual I3IPAddress& getSource();
159  virtual const I3IPAddress& getSource() const {return const_cast<I3InsertTriggerMessage_Base*>(this)->getSource();}
160  virtual void setSource(const I3IPAddress& source);
161 };
162 
200 {
201  protected:
204  simtime_t sendingTime_var;
205 
206  private:
207  void copy(const I3QueryReplyMessage_Base& other);
208 
209  protected:
210  // protected and unimplemented operator==(), to prevent accidental usage
212  // make constructors protected to avoid instantiation
213  I3QueryReplyMessage_Base(const char *name=NULL, int kind=0);
215  // make assignment operator protected to force the user override it
217 
218  public:
219  virtual ~I3QueryReplyMessage_Base();
220  virtual I3QueryReplyMessage_Base *dup() const {throw cRuntimeError("You forgot to manually add a dup() function to class I3QueryReplyMessage");}
221  virtual void parsimPack(cCommBuffer *b);
222  virtual void parsimUnpack(cCommBuffer *b);
223 
224  // field getter/setter methods
225  virtual I3IPAddress& getSource();
226  virtual const I3IPAddress& getSource() const {return const_cast<I3QueryReplyMessage_Base*>(this)->getSource();}
227  virtual void setSource(const I3IPAddress& source);
228  virtual I3Identifier& getIdentifier();
229  virtual const I3Identifier& getIdentifier() const {return const_cast<I3QueryReplyMessage_Base*>(this)->getIdentifier();}
230  virtual void setIdentifier(const I3Identifier& identifier);
231  virtual simtime_t getSendingTime() const;
232  virtual void setSendingTime(simtime_t sendingTime);
233 };
234 
270 {
271  protected:
273 
274  private:
275  void copy(const I3RemoveTriggerMessage_Base& other);
276 
277  protected:
278  // protected and unimplemented operator==(), to prevent accidental usage
280  // make constructors protected to avoid instantiation
281  I3RemoveTriggerMessage_Base(const char *name=NULL, int kind=0);
283  // make assignment operator protected to force the user override it
285 
286  public:
288  virtual I3RemoveTriggerMessage_Base *dup() const {throw cRuntimeError("You forgot to manually add a dup() function to class I3RemoveTriggerMessage");}
289  virtual void parsimPack(cCommBuffer *b);
290  virtual void parsimUnpack(cCommBuffer *b);
291 
292  // field getter/setter methods
293  virtual I3Trigger& getTrigger();
294  virtual const I3Trigger& getTrigger() const {return const_cast<I3RemoveTriggerMessage_Base*>(this)->getTrigger();}
295  virtual void setTrigger(const I3Trigger& trigger);
296 };
297 
336 {
337  protected:
342 
343  private:
344  void copy(const I3SendPacketMessage_Base& other);
345 
346  protected:
347  // protected and unimplemented operator==(), to prevent accidental usage
349  // make constructors protected to avoid instantiation
350  I3SendPacketMessage_Base(const char *name=NULL, int kind=0);
352  // make assignment operator protected to force the user override it
354 
355  public:
356  virtual ~I3SendPacketMessage_Base();
357  virtual I3SendPacketMessage_Base *dup() const {throw cRuntimeError("You forgot to manually add a dup() function to class I3SendPacketMessage");}
358  virtual void parsimPack(cCommBuffer *b);
359  virtual void parsimUnpack(cCommBuffer *b);
360 
361  // field getter/setter methods
363  virtual const I3IdentifierStack& getIdentifierStack() const {return const_cast<I3SendPacketMessage_Base*>(this)->getIdentifierStack();}
364  virtual void setIdentifierStack(const I3IdentifierStack& identifierStack);
365  virtual I3Trigger& getMatchedTrigger();
366  virtual const I3Trigger& getMatchedTrigger() const {return const_cast<I3SendPacketMessage_Base*>(this)->getMatchedTrigger();}
367  virtual void setMatchedTrigger(const I3Trigger& matchedTrigger);
368  virtual bool getSendReply() const;
369  virtual void setSendReply(bool sendReply);
370  virtual I3IPAddress& getSource();
371  virtual const I3IPAddress& getSource() const {return const_cast<I3SendPacketMessage_Base*>(this)->getSource();}
372  virtual void setSource(const I3IPAddress& source);
373 };
374 
375 
376 #endif // _I3MESSAGE_M_H_