INET Framework for OMNeT++/OMNEST
|
Class generated from inet/networklayer/generic/GenericDatagram.msg:47
by nedtool.
More...
#include <GenericDatagram_m.h>
Public Member Functions | |
virtual | ~GenericDatagram_Base () |
virtual GenericDatagram_Base * | dup () const override |
virtual void | parsimPack (omnetpp::cCommBuffer *b) const override |
virtual void | parsimUnpack (omnetpp::cCommBuffer *b) override |
virtual L3Address & | _getSrcAddr () |
virtual const L3Address & | _getSrcAddr () const |
virtual void | setSourceAddress (const L3Address &sourceAddress) |
virtual L3Address & | _getDestAddr () |
virtual const L3Address & | _getDestAddr () const |
virtual void | setDestinationAddress (const L3Address &destinationAddress) |
virtual int | getTransportProtocol () const |
virtual void | setTransportProtocol (int transportProtocol) |
virtual short | getHopLimit () const |
virtual void | setHopLimit (short hopLimit) |
virtual TLVOptions & | getTlvOptions () |
virtual const TLVOptions & | getTlvOptions () const |
virtual void | setTlvOptions (const TLVOptions &tlvOptions) |
Protected Member Functions | |
bool | operator== (const GenericDatagram_Base &) |
GenericDatagram_Base (const char *name=nullptr, short kind=0) | |
GenericDatagram_Base (const GenericDatagram_Base &other) | |
GenericDatagram_Base & | operator= (const GenericDatagram_Base &other) |
Protected Attributes | |
L3Address | sourceAddress |
L3Address | destinationAddress |
int | transportProtocol |
short | hopLimit |
TLVOptions | tlvOptions |
Private Member Functions | |
void | copy (const GenericDatagram_Base &other) |
Class generated from inet/networklayer/generic/GenericDatagram.msg:47
by nedtool.
// // Represents a generic network datagram with generic network addresses. // packet GenericDatagram { @customize(true); L3Address sourceAddress @getter(_getSrcAddr); L3Address destinationAddress @getter(_getDestAddr); int transportProtocol @enum(IPProtocolId) = IP_PROT_NONE; short hopLimit; TLVOptions tlvOptions; }
GenericDatagram_Base is only useful if it gets subclassed, and GenericDatagram is derived from it. The minimum code to be written for GenericDatagram is the following:
class INET_API GenericDatagram : public GenericDatagram_Base { private: void copy(const GenericDatagram& other) { ... }
public: GenericDatagram(const char *name=nullptr, short kind=0) : GenericDatagram_Base(name,kind) {} GenericDatagram(const GenericDatagram& other) : GenericDatagram_Base(other) {copy(other);} GenericDatagram& operator=(const GenericDatagram& other) {if (this==&other) return *this; GenericDatagram_Base::operator=(other); copy(other); return *this;} virtual GenericDatagram *dup() const override {return new GenericDatagram(*this);} // ADD CODE HERE to redefine and implement pure virtual functions from GenericDatagram_Base };
The following should go into a .cc (.cpp) file:
Register_Class(GenericDatagram)
|
protected |
|
protected |
|
virtual |
|
virtual |
Referenced by inet::GenericDatagram::getDestinationAddress().
|
inlinevirtual |
Referenced by _getDestAddr().
|
virtual |
Referenced by inet::GenericDatagram::getSourceAddress().
|
inlinevirtual |
Referenced by _getSrcAddr().
|
private |
|
inlineoverridevirtual |
Reimplemented in inet::GenericDatagram.
|
virtual |
|
virtual |
|
inlinevirtual |
Referenced by getTlvOptions().
|
virtual |
Reimplemented in inet::GenericDatagram.
Referenced by inet::GenericDatagram::getTransportProtocol().
|
protected |
Referenced by inet::GenericDatagram::operator=().
|
protected |
|
overridevirtual |
|
overridevirtual |
|
virtual |
Reimplemented in inet::GenericDatagram.
Referenced by inet::GenericDatagram::setDestinationAddress().
|
virtual |
Referenced by inet::GenericNetworkProtocol::handlePacketFromNetwork().
|
virtual |
Reimplemented in inet::GenericDatagram.
Referenced by inet::GenericDatagram::setSourceAddress().
|
virtual |
|
virtual |
Reimplemented in inet::GenericDatagram.
Referenced by inet::GenericDatagram::setTransportProtocol().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |