-
Notifications
You must be signed in to change notification settings - Fork 2
/
message_m.h
89 lines (69 loc) · 2.17 KB
/
message_m.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//
// Generated file, do not edit! Created by opp_msgtool 6.0 from message.msg.
//
#ifndef __MESSAGE_M_H
#define __MESSAGE_M_H
#if defined(__clang__)
# pragma clang diagnostic ignored "-Wreserved-id-macro"
#endif
#include <omnetpp.h>
// opp_msgtool version check
#define MSGC_VERSION 0x0600
#if (MSGC_VERSION!=OMNETPP_VERSION)
# error Version mismatch! Probably this file was generated by an earlier version of opp_msgtool: 'make clean' should help.
#endif
class Message;
/**
* Class generated from <tt>message.msg:1</tt> by opp_msgtool.
* <pre>
* packet Message
* {
* int status;
* int seq;
* int version;
* int key;
* string value;
* int receiver = -1;
* }
* </pre>
*/
class Message : public ::omnetpp::cPacket
{
protected:
int status = 0;
int seq = 0;
int version = 0;
int key = 0;
omnetpp::opp_string value;
int receiver = -1;
private:
void copy(const Message& other);
protected:
bool operator==(const Message&) = delete;
public:
Message(const char *name=nullptr, short kind=0);
Message(const Message& other);
virtual ~Message();
Message& operator=(const Message& other);
virtual Message *dup() const override {return new Message(*this);}
virtual void parsimPack(omnetpp::cCommBuffer *b) const override;
virtual void parsimUnpack(omnetpp::cCommBuffer *b) override;
virtual int getStatus() const;
virtual void setStatus(int status);
virtual int getSeq() const;
virtual void setSeq(int seq);
virtual int getVersion() const;
virtual void setVersion(int version);
virtual int getKey() const;
virtual void setKey(int key);
virtual const char * getValue() const;
virtual void setValue(const char * value);
virtual int getReceiver() const;
virtual void setReceiver(int receiver);
};
inline void doParsimPacking(omnetpp::cCommBuffer *b, const Message& obj) {obj.parsimPack(b);}
inline void doParsimUnpacking(omnetpp::cCommBuffer *b, Message& obj) {obj.parsimUnpack(b);}
namespace omnetpp {
template<> inline Message *fromAnyPtr(any_ptr ptr) { return check_and_cast<Message*>(ptr.get<cObject>()); }
} // namespace omnetpp
#endif // ifndef __MESSAGE_M_H