-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDynaPacket_m.h
136 lines (111 loc) · 3.94 KB
/
DynaPacket_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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
//
// Generated file, do not edit! Created by opp_msgtool 6.0 from DynaPacket.msg.
//
#ifndef __DYNAPACKET_M_H
#define __DYNAPACKET_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 DynaPacket;
class DynaDataPacket;
/**
* Enum generated from <tt>DynaPacket.msg:12</tt> by opp_msgtool.
* <pre>
* enum DynaPacketType
* {
* DYNA_CONN_REQ = 0;
* DYNA_CONN_ACK = 1;
* DYNA_DISC_REQ = 2;
* DYNA_DISC_ACK = 3;
* DYNA_DATA = 4;
* }
* </pre>
*/
enum DynaPacketType {
DYNA_CONN_REQ = 0,
DYNA_CONN_ACK = 1,
DYNA_DISC_REQ = 2,
DYNA_DISC_ACK = 3,
DYNA_DATA = 4
};
inline void doParsimPacking(omnetpp::cCommBuffer *b, const DynaPacketType& e) { b->pack(static_cast<int>(e)); }
inline void doParsimUnpacking(omnetpp::cCommBuffer *b, DynaPacketType& e) { int n; b->unpack(n); e = static_cast<DynaPacketType>(n); }
/**
* Class generated from <tt>DynaPacket.msg:21</tt> by opp_msgtool.
* <pre>
* packet DynaPacket
* {
* int srcAddress;
* int destAddress;
* int serverProcId;
* }
* </pre>
*/
class DynaPacket : public ::omnetpp::cPacket
{
protected:
int srcAddress = 0;
int destAddress = 0;
int serverProcId = 0;
private:
void copy(const DynaPacket& other);
protected:
bool operator==(const DynaPacket&) = delete;
public:
DynaPacket(const char *name=nullptr, short kind=0);
DynaPacket(const DynaPacket& other);
virtual ~DynaPacket();
DynaPacket& operator=(const DynaPacket& other);
virtual DynaPacket *dup() const override {return new DynaPacket(*this);}
virtual void parsimPack(omnetpp::cCommBuffer *b) const override;
virtual void parsimUnpack(omnetpp::cCommBuffer *b) override;
virtual int getSrcAddress() const;
virtual void setSrcAddress(int srcAddress);
virtual int getDestAddress() const;
virtual void setDestAddress(int destAddress);
virtual int getServerProcId() const;
virtual void setServerProcId(int serverProcId);
};
inline void doParsimPacking(omnetpp::cCommBuffer *b, const DynaPacket& obj) {obj.parsimPack(b);}
inline void doParsimUnpacking(omnetpp::cCommBuffer *b, DynaPacket& obj) {obj.parsimUnpack(b);}
/**
* Class generated from <tt>DynaPacket.msg:28</tt> by opp_msgtool.
* <pre>
* packet DynaDataPacket extends DynaPacket
* {
* string payload;
* }
* </pre>
*/
class DynaDataPacket : public ::DynaPacket
{
protected:
omnetpp::opp_string payload;
private:
void copy(const DynaDataPacket& other);
protected:
bool operator==(const DynaDataPacket&) = delete;
public:
DynaDataPacket(const char *name=nullptr, short kind=0);
DynaDataPacket(const DynaDataPacket& other);
virtual ~DynaDataPacket();
DynaDataPacket& operator=(const DynaDataPacket& other);
virtual DynaDataPacket *dup() const override {return new DynaDataPacket(*this);}
virtual void parsimPack(omnetpp::cCommBuffer *b) const override;
virtual void parsimUnpack(omnetpp::cCommBuffer *b) override;
virtual const char * getPayload() const;
virtual void setPayload(const char * payload);
};
inline void doParsimPacking(omnetpp::cCommBuffer *b, const DynaDataPacket& obj) {obj.parsimPack(b);}
inline void doParsimUnpacking(omnetpp::cCommBuffer *b, DynaDataPacket& obj) {obj.parsimUnpack(b);}
namespace omnetpp {
template<> inline DynaPacket *fromAnyPtr(any_ptr ptr) { return check_and_cast<DynaPacket*>(ptr.get<cObject>()); }
template<> inline DynaDataPacket *fromAnyPtr(any_ptr ptr) { return check_and_cast<DynaDataPacket*>(ptr.get<cObject>()); }
} // namespace omnetpp
#endif // ifndef __DYNAPACKET_M_H