|
INET Framework for OMNeT++/OMNEST
|
Class generated from inet/linklayer/ethernet/EtherFrame.msg:69 by nedtool.
More...
#include <EtherFrame_m.h>
Public Member Functions | |
| virtual | ~EtherPhyFrame_Base () |
| virtual EtherPhyFrame_Base * | dup () const override |
| virtual void | parsimPack (omnetpp::cCommBuffer *b) const override |
| virtual void | parsimUnpack (omnetpp::cCommBuffer *b) override |
| virtual bool | getSrcMacFullDuplex () const |
| virtual void | setSrcMacFullDuplex (bool srcMacFullDuplex) |
Public Member Functions inherited from inet::EtherTraffic | |
| EtherTraffic (const char *name=nullptr, short kind=0) | |
| EtherTraffic (const EtherTraffic &other) | |
| virtual | ~EtherTraffic () |
| EtherTraffic & | operator= (const EtherTraffic &other) |
Protected Member Functions | |
| bool | operator== (const EtherPhyFrame_Base &) |
| EtherPhyFrame_Base (const char *name=nullptr, short kind=0) | |
| EtherPhyFrame_Base (const EtherPhyFrame_Base &other) | |
| EtherPhyFrame_Base & | operator= (const EtherPhyFrame_Base &other) |
Protected Member Functions inherited from inet::EtherTraffic | |
| bool | operator== (const EtherTraffic &) |
Protected Attributes | |
| bool | srcMacFullDuplex |
Private Member Functions | |
| void | copy (const EtherPhyFrame_Base &other) |
Class generated from inet/linklayer/ethernet/EtherFrame.msg:69 by nedtool.
// // Represents an Ethernet PHY frame. // // Contains: // - preamble: not stored (only contributes to length) // - SFD: not stored (only contributes to length) // - encapsulated EtherFrame with padding and FCS // packet EtherPhyFrame extends EtherTraffic { @customize(true); byteLength = PREAMBLE_BYTES + SFD_BYTES; bool srcMacFullDuplex; // meta-info, for detecting model misconfiguration }
EtherPhyFrame_Base is only useful if it gets subclassed, and EtherPhyFrame is derived from it. The minimum code to be written for EtherPhyFrame is the following:
class INET_API EtherPhyFrame : public EtherPhyFrame_Base { private: void copy(const EtherPhyFrame& other) { ... }
public:
EtherPhyFrame(const char *name=nullptr, short kind=0) : EtherPhyFrame_Base(name,kind) {}
EtherPhyFrame(const EtherPhyFrame& other) : EtherPhyFrame_Base(other) {copy(other);}
EtherPhyFrame& operator=(const EtherPhyFrame& other) {if (this==&other) return *this; EtherPhyFrame_Base::operator=(other); copy(other); return *this;}
virtual EtherPhyFrame *dup() const override {return new EtherPhyFrame(*this);}
// ADD CODE HERE to redefine and implement pure virtual functions from EtherPhyFrame_Base
};
The following should go into a .cc (.cpp) file:
Register_Class(EtherPhyFrame)
|
protected |
|
protected |
|
virtual |
|
private |
|
inlineoverridevirtual |
Reimplemented from inet::EtherTraffic.
Reimplemented in inet::EtherPhyFrame.
|
virtual |
Referenced by inet::EtherMACBase::decapsulate().
|
protected |
Referenced by inet::EtherPhyFrame::operator=().
|
protected |
|
overridevirtual |
Reimplemented from inet::EtherTraffic.
|
overridevirtual |
Reimplemented from inet::EtherTraffic.
|
virtual |
Referenced by inet::EtherMACBase::encapsulate().
|
protected |