-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathponPacket_m.h
101 lines (79 loc) · 2.96 KB
/
ponPacket_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
//
// Generated file, do not edit! Created by opp_msgtool 6.0 from ponPacket.msg.
//
#ifndef __PONPACKET_M_H
#define __PONPACKET_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 ponPacket;
/**
* Class generated from <tt>ponPacket.msg:17</tt> by opp_msgtool.
* <pre>
* packet ponPacket extends cPacket
* {
* simtime_t GenerationTime;
* simtime_t OnuArrivalTime;
* simtime_t OnuDepartureTime;
*
* int OnuId; // intended receipient ONU
* bool IsGrant = false;
* double Grant = 0;
*
* bool IsRequest = false;
* double Request = 0;
* }
* </pre>
*/
class ponPacket : public ::omnetpp::cPacket
{
protected:
omnetpp::simtime_t GenerationTime = SIMTIME_ZERO;
omnetpp::simtime_t OnuArrivalTime = SIMTIME_ZERO;
omnetpp::simtime_t OnuDepartureTime = SIMTIME_ZERO;
int OnuId = 0;
bool IsGrant = false;
double Grant = 0;
bool IsRequest = false;
double Request = 0;
private:
void copy(const ponPacket& other);
protected:
bool operator==(const ponPacket&) = delete;
public:
ponPacket(const char *name=nullptr, short kind=0);
ponPacket(const ponPacket& other);
virtual ~ponPacket();
ponPacket& operator=(const ponPacket& other);
virtual ponPacket *dup() const override {return new ponPacket(*this);}
virtual void parsimPack(omnetpp::cCommBuffer *b) const override;
virtual void parsimUnpack(omnetpp::cCommBuffer *b) override;
virtual omnetpp::simtime_t getGenerationTime() const;
virtual void setGenerationTime(omnetpp::simtime_t GenerationTime);
virtual omnetpp::simtime_t getOnuArrivalTime() const;
virtual void setOnuArrivalTime(omnetpp::simtime_t OnuArrivalTime);
virtual omnetpp::simtime_t getOnuDepartureTime() const;
virtual void setOnuDepartureTime(omnetpp::simtime_t OnuDepartureTime);
virtual int getOnuId() const;
virtual void setOnuId(int OnuId);
virtual bool getIsGrant() const;
virtual void setIsGrant(bool IsGrant);
virtual double getGrant() const;
virtual void setGrant(double Grant);
virtual bool getIsRequest() const;
virtual void setIsRequest(bool IsRequest);
virtual double getRequest() const;
virtual void setRequest(double Request);
};
inline void doParsimPacking(omnetpp::cCommBuffer *b, const ponPacket& obj) {obj.parsimPack(b);}
inline void doParsimUnpacking(omnetpp::cCommBuffer *b, ponPacket& obj) {obj.parsimUnpack(b);}
namespace omnetpp {
template<> inline ponPacket *fromAnyPtr(any_ptr ptr) { return check_and_cast<ponPacket*>(ptr.get<cObject>()); }
} // namespace omnetpp
#endif // ifndef __PONPACKET_M_H