INET Framework for OMNeT++/OMNEST
|
Class generated from inet/common/RawPacket.msg:31
by nedtool.
More...
#include <RawPacket_m.h>
Public Member Functions | |
virtual | ~RawPacket_Base () |
virtual RawPacket_Base * | dup () const override |
virtual void | parsimPack (omnetpp::cCommBuffer *b) const override |
virtual void | parsimUnpack (omnetpp::cCommBuffer *b) override |
virtual ByteArray & | getByteArray () |
virtual const ByteArray & | getByteArray () const |
virtual void | setByteArray (const ByteArray &byteArray) |
Protected Member Functions | |
bool | operator== (const RawPacket_Base &) |
RawPacket_Base (const char *name=nullptr, short kind=0) | |
RawPacket_Base (const RawPacket_Base &other) | |
RawPacket_Base & | operator= (const RawPacket_Base &other) |
Protected Attributes | |
ByteArray | byteArray |
Private Member Functions | |
void | copy (const RawPacket_Base &other) |
Class generated from inet/common/RawPacket.msg:31
by nedtool.
// // Packet that carries raw network bytes. // Used with emulation-related features. // packet RawPacket { @customize(true); ByteArray byteArray; }
RawPacket_Base is only useful if it gets subclassed, and RawPacket is derived from it. The minimum code to be written for RawPacket is the following:
class INET_API RawPacket : public RawPacket_Base { private: void copy(const RawPacket& other) { ... }
public: RawPacket(const char *name=nullptr, short kind=0) : RawPacket_Base(name,kind) {} RawPacket(const RawPacket& other) : RawPacket_Base(other) {copy(other);} RawPacket& operator=(const RawPacket& other) {if (this==&other) return *this; RawPacket_Base::operator=(other); copy(other); return *this;} virtual RawPacket *dup() const override {return new RawPacket(*this);} // ADD CODE HERE to redefine and implement pure virtual functions from RawPacket_Base };
The following should go into a .cc (.cpp) file:
Register_Class(RawPacket)
|
protected |
|
protected |
|
virtual |
|
private |
|
inlineoverridevirtual |
Reimplemented in inet::RawPacket.
|
virtual |
Referenced by inet::IPv4FragBuf::addFragment(), inet::TCPSessionApp::createDataPacket(), inet::tcp::TCP_NSC_ByteStreamSendQueue::enqueueAppData(), inet::tcp::TcpLwipByteStreamSendQueue::enqueueAppData(), inet::tcp::TCPByteStreamSendQueue::enqueueAppData(), inet::tcp::TCP_NSC_ByteStreamReceiveQueue::extractBytesUpTo(), inet::tcp::TcpLwipByteStreamReceiveQueue::extractBytesUpTo(), and inet::TCPEchoApp::handleMessage().
|
inlinevirtual |
Referenced by getByteArray().
|
protected |
Referenced by inet::RawPacket::operator=().
|
protected |
|
overridevirtual |
|
overridevirtual |
|
virtual |
|
protected |