16 #ifndef __OMNETPP_CPACKET_H 17 #define __OMNETPP_CPACKET_H 56 FL_ISRECEPTIONSTART = 8,
63 unsigned short shareCount;
70 void copy(
const cPacket& packet);
74 void setDuration(
simtime_t d) {duration = d;}
77 void setReceptionStart(
bool b) {setFlag(FL_ISRECEPTIONSTART, b);}
81 long getEncapsulationId()
const;
85 long getEncapsulationTreeId()
const;
87 cPacket *_getEncapMsg() {
return encapsulatedPacket; }
96 void _detachEncapMsg();
99 void _deleteEncapMsg();
102 int getShareCount()
const {
return shareCount;}
116 explicit cPacket(
const char *name=
nullptr,
short kind=0, int64_t bitLength=0);
143 virtual std::string str()
const override;
149 virtual void forEachChild(
cVisitor *v)
override;
156 virtual void parsimPack(
cCommBuffer *buffer)
const override;
163 virtual void parsimUnpack(
cCommBuffer *buffer)
override;
168 virtual bool isPacket()
const override {
return true;}
174 virtual const char *getDisplayString()
const override;
184 virtual void setBitLength(int64_t l);
203 virtual void addBitLength(int64_t delta);
251 virtual void encapsulate(
cPacket *packet);
260 virtual cPacket *decapsulate();
269 virtual cPacket *getEncapsulatedPacket()
const;
277 virtual bool hasEncapsulatedPacket()
const;
The message class in OMNeT++. cMessage objects may represent events, messages, jobs or other entities...
Definition: cmessage.h:95
int64_t getByteLength() const
Definition: cpacket.h:222
int64_t-based, base-10 fixed-point simulation time.
Definition: simtime.h:66
virtual int64_t getBitLength() const
Definition: cpacket.h:216
void setByteLength(int64_t l)
Definition: cpacket.h:191
bool isReceptionStart() const
Definition: cpacket.h:298
A subclass of cMessage to represent packets, frames, datagrams, application messages, and similar data.
Definition: cpacket.h:52
virtual bool isPacket() const override
Definition: cpacket.h:168
simtime_t_cref getDuration() const
Definition: cpacket.h:288
Buffer for the communications layer of parallel simulation.
Definition: ccommbuffer.h:41
virtual void setBitError(bool e)
Definition: cpacket.h:227
Enables traversing the tree of (cObject-rooted) simulation objects.
Definition: cvisitor.h:56
Definition: cabstracthistogram.h:21
virtual cPacket * dup() const override
Definition: cpacket.h:137
virtual bool hasBitError() const
Definition: cpacket.h:232
void addByteLength(int64_t delta)
Definition: cpacket.h:211