INET Framework for OMNeT++/OMNEST
|
Message that carries raw bytes. More...
#include <RawPacket.h>
Public Member Functions | |
RawPacket (const char *name=nullptr, int kind=0) | |
Constructor. More... | |
RawPacket (const RawPacket &other) | |
Copy constructor. More... | |
RawPacket & | operator= (const RawPacket &other) |
operator = More... | |
virtual RawPacket * | dup () const override |
Creates and returns an exact copy of this object. More... | |
virtual void | setDataFromBuffer (const void *ptr, unsigned int length) |
Set data from buffer. More... | |
virtual void | addDataFromBuffer (const void *ptr, unsigned int length) |
Add data from buffer to the end of existing content. More... | |
virtual unsigned int | copyDataToBuffer (void *ptr, unsigned int length) const |
Copy data content to buffer. More... | |
virtual void | removePrefix (unsigned int length) |
Truncate data content. More... | |
Public Member Functions inherited from inet::RawPacket_Base | |
virtual | ~RawPacket_Base () |
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) |
Additional Inherited Members | |
Protected Member Functions inherited from inet::RawPacket_Base | |
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 inherited from inet::RawPacket_Base | |
ByteArray | byteArray |
Message that carries raw bytes.
Used with emulation-related features.
|
inline |
Constructor.
|
inline |
Copy constructor.
|
virtual |
Add data from buffer to the end of existing content.
ptr | pointer to input buffer |
length | length of data |
|
virtual |
Copy data content to buffer.
ptr | pointer to output buffer |
length | length of buffer, maximum of copied bytes |
Referenced by inet::serializer::ByteArraySerializer::serialize().
|
inlineoverridevirtual |
Creates and returns an exact copy of this object.
Reimplemented from inet::RawPacket_Base.
operator =
|
virtual |
Truncate data content.
length | The number of bytes from the beginning of the content be removed Generate assert when not have enough bytes for truncation |
|
virtual |
Set data from buffer.
ptr | pointer to buffer |
length | length of data |
Referenced by inet::serializer::ByteArraySerializer::deserialize().