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

Class generated from inet/linklayer/common/Ieee802Ctrl.msg:77 by nedtool. More...

#include <Ieee802Ctrl_m.h>

Inheritance diagram for inet::Ieee802Ctrl_Base:
inet::Ieee802Ctrl

Public Member Functions

virtual ~Ieee802Ctrl_Base ()
 
virtual Ieee802Ctrl_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 getEtherType () const
 
virtual void setEtherType (int etherType)
 
virtual int getInterfaceId () const
 
virtual void setInterfaceId (int interfaceId)
 
virtual int getSwitchPort () const
 
virtual void setSwitchPort (int switchPort)
 
virtual int getUserPriority () const
 
virtual void setUserPriority (int userPriority)
 
virtual int getSsap () const
 
virtual void setSsap (int ssap)
 
virtual int getDsap () const
 
virtual void setDsap (int dsap)
 
virtual int getPauseUnits () const
 
virtual void setPauseUnits (int pauseUnits)
 

Protected Member Functions

bool operator== (const Ieee802Ctrl_Base &)
 
 Ieee802Ctrl_Base ()
 
 Ieee802Ctrl_Base (const Ieee802Ctrl_Base &other)
 
Ieee802Ctrl_Baseoperator= (const Ieee802Ctrl_Base &other)
 

Protected Attributes

MACAddress src
 
MACAddress dest
 
int etherType
 
int interfaceId
 
int switchPort
 
int userPriority
 
int ssap
 
int dsap
 
int pauseUnits
 

Private Member Functions

void copy (const Ieee802Ctrl_Base &other)
 

Detailed Description

Class generated from inet/linklayer/common/Ieee802Ctrl.msg:77 by nedtool.

//
// Control structure for communication between LLC and higher layers
//
class Ieee802Ctrl
{
    @customize(true);
    MACAddress src;  // src MAC address (can be left empty when sending)
    MACAddress dest; // dest MAC address
    int etherType @enum(EtherType);   // used with ~EthernetIIFrame
    int interfaceId; // incoming or outgoing interface (not needed everywhere)
    int switchPort = -1; // swich port index (only in swiches)
    int userPriority = -1; // 802.1d User Priority (UP), 0..7. Note: In 802.11, UP corresponds to 0..7 TID values, and there's a standard static mapping from TID to AC (Access Category)
    int ssap;        // used with IEEE 802 LLC (see ~EtherFrameWithLLC)
    int dsap;        // used with IEEE 802 LLC (see ~EtherFrameWithLLC)
    int pauseUnits;  // used with IEEE802CTRL_SENDPAUSE
}

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

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

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

Register_Class(Ieee802Ctrl)

Constructor & Destructor Documentation

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

Member Function Documentation

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

Reimplemented in inet::Ieee802Ctrl.

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

Referenced by getDest().

208 {return const_cast<Ieee802Ctrl_Base*>(this)->getDest();}
virtual MACAddress & getDest()
virtual int inet::Ieee802Ctrl_Base::getDsap ( ) const
virtual
virtual int inet::Ieee802Ctrl_Base::getInterfaceId ( ) const
virtual

Reimplemented in inet::Ieee802Ctrl.

Referenced by inet::Ieee802Ctrl::getInterfaceId().

virtual int inet::Ieee802Ctrl_Base::getPauseUnits ( ) const
virtual
virtual const MACAddress& inet::Ieee802Ctrl_Base::getSrc ( ) const
inlinevirtual

Referenced by getSrc().

205 {return const_cast<Ieee802Ctrl_Base*>(this)->getSrc();}
virtual MACAddress & getSrc()
virtual int inet::Ieee802Ctrl_Base::getSsap ( ) const
virtual
virtual int inet::Ieee802Ctrl_Base::getSwitchPort ( ) const
virtual
Ieee802Ctrl_Base& inet::Ieee802Ctrl_Base::operator= ( const Ieee802Ctrl_Base other)
protected
bool inet::Ieee802Ctrl_Base::operator== ( const Ieee802Ctrl_Base )
protected
virtual void inet::Ieee802Ctrl_Base::parsimPack ( omnetpp::cCommBuffer *  b) const
overridevirtual
virtual void inet::Ieee802Ctrl_Base::parsimUnpack ( omnetpp::cCommBuffer *  b)
overridevirtual
virtual void inet::Ieee802Ctrl_Base::setInterfaceId ( int  interfaceId)
virtual

Reimplemented in inet::Ieee802Ctrl.

Referenced by inet::Ieee802Ctrl::setInterfaceId().

virtual void inet::Ieee802Ctrl_Base::setPauseUnits ( int  pauseUnits)
virtual
virtual void inet::Ieee802Ctrl_Base::setSsap ( int  ssap)
virtual
virtual void inet::Ieee802Ctrl_Base::setSwitchPort ( int  switchPort)
virtual

Member Data Documentation

MACAddress inet::Ieee802Ctrl_Base::dest
protected
int inet::Ieee802Ctrl_Base::dsap
protected
int inet::Ieee802Ctrl_Base::etherType
protected
int inet::Ieee802Ctrl_Base::interfaceId
protected
int inet::Ieee802Ctrl_Base::pauseUnits
protected
MACAddress inet::Ieee802Ctrl_Base::src
protected
int inet::Ieee802Ctrl_Base::ssap
protected
int inet::Ieee802Ctrl_Base::switchPort
protected
int inet::Ieee802Ctrl_Base::userPriority
protected

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