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

Class generated from inet/linklayer/common/SimpleLinkLayerControlInfo.msg:10 by nedtool. More...

#include <SimpleLinkLayerControlInfo_m.h>

Inheritance diagram for inet::SimpleLinkLayerControlInfo_Base:
inet::SimpleLinkLayerControlInfo

Public Member Functions

virtual ~SimpleLinkLayerControlInfo_Base ()
 
virtual SimpleLinkLayerControlInfo_Basedup () const override
 
virtual void parsimPack (omnetpp::cCommBuffer *b) const override
 
virtual void parsimUnpack (omnetpp::cCommBuffer *b) override
 
virtual MACAddressgetSrc ()
 
virtual const MACAddressgetSrc () const
 
virtual void setSrc (const MACAddress &src)
 
virtual MACAddressgetDest ()
 
virtual const MACAddressgetDest () const
 
virtual void setDest (const MACAddress &dest)
 
virtual int getInterfaceId () const
 
virtual void setInterfaceId (int interfaceId)
 

Protected Member Functions

bool operator== (const SimpleLinkLayerControlInfo_Base &)
 
 SimpleLinkLayerControlInfo_Base ()
 
 SimpleLinkLayerControlInfo_Base (const SimpleLinkLayerControlInfo_Base &other)
 
SimpleLinkLayerControlInfo_Baseoperator= (const SimpleLinkLayerControlInfo_Base &other)
 

Protected Attributes

MACAddress src
 
MACAddress dest
 
int interfaceId
 

Private Member Functions

void copy (const SimpleLinkLayerControlInfo_Base &other)
 

Detailed Description

Class generated from inet/linklayer/common/SimpleLinkLayerControlInfo.msg:10 by nedtool.

class SimpleLinkLayerControlInfo
{
    @customize(true);
    MACAddress src;  // can be left empty when sending
    MACAddress dest;
    int interfaceId;
}

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

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

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

Register_Class(SimpleLinkLayerControlInfo)

Constructor & Destructor Documentation

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

Member Function Documentation

void inet::SimpleLinkLayerControlInfo_Base::copy ( const SimpleLinkLayerControlInfo_Base other)
private
virtual SimpleLinkLayerControlInfo_Base* inet::SimpleLinkLayerControlInfo_Base::dup ( ) const
inlineoverridevirtual

Reimplemented in inet::SimpleLinkLayerControlInfo.

95 {throw omnetpp::cRuntimeError("You forgot to manually add a dup() function to class SimpleLinkLayerControlInfo");}
virtual MACAddress& inet::SimpleLinkLayerControlInfo_Base::getDest ( )
virtual
virtual const MACAddress& inet::SimpleLinkLayerControlInfo_Base::getDest ( ) const
inlinevirtual

Referenced by getDest().

104 {return const_cast<SimpleLinkLayerControlInfo_Base*>(this)->getDest();}
virtual int inet::SimpleLinkLayerControlInfo_Base::getInterfaceId ( ) const
virtual
virtual MACAddress& inet::SimpleLinkLayerControlInfo_Base::getSrc ( )
virtual
virtual const MACAddress& inet::SimpleLinkLayerControlInfo_Base::getSrc ( ) const
inlinevirtual

Referenced by getSrc().

101 {return const_cast<SimpleLinkLayerControlInfo_Base*>(this)->getSrc();}
SimpleLinkLayerControlInfo_Base& inet::SimpleLinkLayerControlInfo_Base::operator= ( const SimpleLinkLayerControlInfo_Base other)
protected
bool inet::SimpleLinkLayerControlInfo_Base::operator== ( const SimpleLinkLayerControlInfo_Base )
protected
virtual void inet::SimpleLinkLayerControlInfo_Base::parsimPack ( omnetpp::cCommBuffer *  b) const
overridevirtual
virtual void inet::SimpleLinkLayerControlInfo_Base::parsimUnpack ( omnetpp::cCommBuffer *  b)
overridevirtual
virtual void inet::SimpleLinkLayerControlInfo_Base::setDest ( const MACAddress dest)
virtual
virtual void inet::SimpleLinkLayerControlInfo_Base::setInterfaceId ( int  interfaceId)
virtual
virtual void inet::SimpleLinkLayerControlInfo_Base::setSrc ( const MACAddress src)
virtual

Member Data Documentation

MACAddress inet::SimpleLinkLayerControlInfo_Base::dest
protected
int inet::SimpleLinkLayerControlInfo_Base::interfaceId
protected
MACAddress inet::SimpleLinkLayerControlInfo_Base::src
protected

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