INET Framework for OMNeT++/OMNEST
inet::GenericNetworkProtocolControlInfo_Base Class Reference

Class generated from inet/networklayer/contract/generic/GenericNetworkProtocolControlInfo.msg:33 by nedtool. More...

#include <GenericNetworkProtocolControlInfo_m.h>

Inheritance diagram for inet::GenericNetworkProtocolControlInfo_Base:
inet::GenericNetworkProtocolControlInfo

Public Member Functions

virtual ~GenericNetworkProtocolControlInfo_Base ()
 
virtual GenericNetworkProtocolControlInfo_Basedup () const override
 
virtual void parsimPack (omnetpp::cCommBuffer *b) const override
 
virtual void parsimUnpack (omnetpp::cCommBuffer *b) override
 
virtual L3Address_getDestinationAddress ()
 
virtual const L3Address_getDestinationAddress () const
 
virtual void setDestinationAddress (const L3Address &destinationAddress)
 
virtual L3Address_getSourceAddress ()
 
virtual const L3Address_getSourceAddress () const
 
virtual void setSourceAddress (const L3Address &sourceAddress)
 
virtual int getInterfaceId () const
 
virtual void setInterfaceId (int interfaceId)
 
virtual short getProtocol () const
 
virtual void setProtocol (short protocol)
 
virtual short getHopLimit () const
 
virtual void setHopLimit (short hopLimit)
 

Protected Member Functions

bool operator== (const GenericNetworkProtocolControlInfo_Base &)
 
 GenericNetworkProtocolControlInfo_Base ()
 
 GenericNetworkProtocolControlInfo_Base (const GenericNetworkProtocolControlInfo_Base &other)
 
GenericNetworkProtocolControlInfo_Baseoperator= (const GenericNetworkProtocolControlInfo_Base &other)
 

Protected Attributes

L3Address destinationAddress
 
L3Address sourceAddress
 
int interfaceId
 
short protocol
 
short hopLimit
 

Private Member Functions

void copy (const GenericNetworkProtocolControlInfo_Base &other)
 

Detailed Description

Class generated from inet/networklayer/contract/generic/GenericNetworkProtocolControlInfo.msg:33 by nedtool.

//
// Control information for sending/receiving packets over the generic network protocol.
//
class GenericNetworkProtocolControlInfo  //TODO rename!!!!
{
    @customize(true);
    L3Address destinationAddress @getter(_getDestinationAddress);   // destination address
    L3Address sourceAddress @getter(_getSourceAddress);    // source address
    int interfaceId = -1; // interface on which the datagram was received, or
                          // should be sent (see ~InterfaceTable)
    short protocol @enum(IPProtocolId);  // encapsulated protocol
    short hopLimit;     // maximum hop count
}

GenericNetworkProtocolControlInfo_Base is only useful if it gets subclassed, and GenericNetworkProtocolControlInfo is derived from it. The minimum code to be written for GenericNetworkProtocolControlInfo is the following:

class INET_API GenericNetworkProtocolControlInfo : public GenericNetworkProtocolControlInfo_Base
{
  private:
    void copy(const GenericNetworkProtocolControlInfo& other) { ... }
  public:
    GenericNetworkProtocolControlInfo() : GenericNetworkProtocolControlInfo_Base() {}
    GenericNetworkProtocolControlInfo(const GenericNetworkProtocolControlInfo& other) : GenericNetworkProtocolControlInfo_Base(other) {copy(other);}
    GenericNetworkProtocolControlInfo& operator=(const GenericNetworkProtocolControlInfo& other) {if (this==&other) return *this; GenericNetworkProtocolControlInfo_Base::operator=(other); copy(other); return *this;}
    virtual GenericNetworkProtocolControlInfo *dup() const override {return new GenericNetworkProtocolControlInfo(*this);}
    // ADD CODE HERE to redefine and implement pure virtual functions from GenericNetworkProtocolControlInfo_Base
};

The following should go into a .cc (.cpp) file:

Register_Class(GenericNetworkProtocolControlInfo)

Constructor & Destructor Documentation

inet::GenericNetworkProtocolControlInfo_Base::GenericNetworkProtocolControlInfo_Base ( )
protected
inet::GenericNetworkProtocolControlInfo_Base::GenericNetworkProtocolControlInfo_Base ( const GenericNetworkProtocolControlInfo_Base other)
protected
virtual inet::GenericNetworkProtocolControlInfo_Base::~GenericNetworkProtocolControlInfo_Base ( )
virtual

Member Function Documentation

virtual L3Address& inet::GenericNetworkProtocolControlInfo_Base::_getDestinationAddress ( )
virtual
virtual const L3Address& inet::GenericNetworkProtocolControlInfo_Base::_getDestinationAddress ( ) const
inlinevirtual
virtual L3Address& inet::GenericNetworkProtocolControlInfo_Base::_getSourceAddress ( )
virtual
virtual const L3Address& inet::GenericNetworkProtocolControlInfo_Base::_getSourceAddress ( ) const
inlinevirtual
void inet::GenericNetworkProtocolControlInfo_Base::copy ( const GenericNetworkProtocolControlInfo_Base other)
private
virtual GenericNetworkProtocolControlInfo_Base* inet::GenericNetworkProtocolControlInfo_Base::dup ( ) const
inlineoverridevirtual

Reimplemented in inet::GenericNetworkProtocolControlInfo.

103 {throw omnetpp::cRuntimeError("You forgot to manually add a dup() function to class GenericNetworkProtocolControlInfo");}
virtual short inet::GenericNetworkProtocolControlInfo_Base::getHopLimit ( ) const
virtual
virtual int inet::GenericNetworkProtocolControlInfo_Base::getInterfaceId ( ) const
virtual
virtual short inet::GenericNetworkProtocolControlInfo_Base::getProtocol ( ) const
virtual
GenericNetworkProtocolControlInfo_Base& inet::GenericNetworkProtocolControlInfo_Base::operator= ( const GenericNetworkProtocolControlInfo_Base other)
protected
bool inet::GenericNetworkProtocolControlInfo_Base::operator== ( const GenericNetworkProtocolControlInfo_Base )
protected
virtual void inet::GenericNetworkProtocolControlInfo_Base::parsimPack ( omnetpp::cCommBuffer *  b) const
overridevirtual
virtual void inet::GenericNetworkProtocolControlInfo_Base::parsimUnpack ( omnetpp::cCommBuffer *  b)
overridevirtual
virtual void inet::GenericNetworkProtocolControlInfo_Base::setDestinationAddress ( const L3Address destinationAddress)
virtual
virtual void inet::GenericNetworkProtocolControlInfo_Base::setHopLimit ( short  hopLimit)
virtual
virtual void inet::GenericNetworkProtocolControlInfo_Base::setInterfaceId ( int  interfaceId)
virtual
virtual void inet::GenericNetworkProtocolControlInfo_Base::setProtocol ( short  protocol)
virtual
virtual void inet::GenericNetworkProtocolControlInfo_Base::setSourceAddress ( const L3Address sourceAddress)
virtual

Member Data Documentation

L3Address inet::GenericNetworkProtocolControlInfo_Base::destinationAddress
protected
short inet::GenericNetworkProtocolControlInfo_Base::hopLimit
protected
int inet::GenericNetworkProtocolControlInfo_Base::interfaceId
protected
short inet::GenericNetworkProtocolControlInfo_Base::protocol
protected
L3Address inet::GenericNetworkProtocolControlInfo_Base::sourceAddress
protected

The documentation for this class was generated from the following file: