INET Framework for OMNeT++/OMNEST
|
Base class for STP and RSTP. More...
#include <STPBase.h>
Public Member Functions | |
STPBase () | |
virtual bool | handleOperationStage (LifecycleOperation *operation, int stage, IDoneCallback *doneCallback) override |
Perform one stage of a lifecycle operation. More... | |
virtual void | receiveSignal (cComponent *source, simsignal_t signalID, cObject *obj, cObject *details) override |
Public Member Functions inherited from inet::ILifecycle | |
virtual | ~ILifecycle () |
Protected Member Functions | |
virtual int | numInitStages () const override |
virtual void | initialize (int stage) override |
virtual void | start () |
virtual void | stop () |
virtual void | colorLink (unsigned int i, bool forwarding) const |
Adds effects to be represented by Tkenv. More... | |
virtual void | refreshDisplay () const override |
Adds effects to be represented by Tkenv. More... | |
virtual int | getRootIndex () const |
Obtains the root gate index. More... | |
Ieee8021dInterfaceData * | getPortInterfaceData (unsigned int portNum) |
Gets Ieee8021dInterfaceData for port number. More... | |
const Ieee8021dInterfaceData * | getPortInterfaceData (unsigned int portNum) const |
InterfaceEntry * | getPortInterfaceEntry (unsigned int portNum) |
Gets InterfaceEntry for port number. More... | |
virtual InterfaceEntry * | chooseInterface () |
Protected Attributes | |
bool | visualize = false |
bool | isOperational = false |
unsigned int | numPorts = 0 |
unsigned int | bridgePriority = 0 |
MACAddress | bridgeAddress |
simtime_t | maxAge |
simtime_t | helloTime |
simtime_t | forwardDelay |
cModule * | switchModule = nullptr |
IMACAddressTable * | macTable = nullptr |
IInterfaceTable * | ifTable = nullptr |
InterfaceEntry * | ie = nullptr |
|
protectedvirtual |
Referenced by start().
|
protectedvirtual |
Adds effects to be represented by Tkenv.
Colors the link black if forwarding parameter is true and the port to which the link is connected to is also forwarding, otherwise colors the link gray.
Referenced by refreshDisplay().
|
protected |
Gets Ieee8021dInterfaceData for port number.
Referenced by inet::STP::checkRootEligibility(), inet::RSTP::checkTC(), inet::STP::checkTimers(), inet::RSTP::compareInterfacedata(), inet::RSTP::contestInterfacedata(), inet::RSTP::flushOtherPorts(), inet::STP::generateBPDU(), inet::STP::generateTCN(), inet::RSTP::getBestAlternate(), getRootIndex(), inet::RSTP::handleBackup(), inet::STP::handleBPDU(), inet::RSTP::handleHelloTime(), inet::STP::handleTick(), inet::RSTP::handleUpgrade(), inet::RSTP::initInterfacedata(), inet::STP::initInterfacedata(), inet::RSTP::initPorts(), inet::STP::isSuperiorBPDU(), inet::operator<<(), inet::RSTP::printState(), inet::RSTP::processBetterSource(), inet::RSTP::processBPDU(), inet::RSTP::processSameSource(), inet::RSTP::receiveSignal(), refreshDisplay(), inet::RSTP::scheduleNextUpgrade(), inet::STP::selectDesignatedPorts(), inet::STP::selectRootPort(), inet::RSTP::sendBPDU(), inet::RSTP::sendBPDUs(), inet::RSTP::sendTCNtoRoot(), inet::STP::setAllDesignated(), inet::STP::setSuperiorBPDU(), and inet::RSTP::updateInterfacedata().
|
inlineprotected |
Referenced by getPortInterfaceData().
|
protected |
Gets InterfaceEntry for port number.
Referenced by getPortInterfaceData(), inet::RSTP::handleUpgrade(), inet::RSTP::receiveSignal(), and inet::RSTP::scheduleNextUpgrade().
|
protectedvirtual |
Obtains the root gate index.
Referenced by inet::RSTP::contestInterfacedata(), inet::RSTP::printState(), inet::RSTP::processBetterSource(), refreshDisplay(), inet::RSTP::sendBPDU(), and inet::RSTP::sendTCNtoRoot().
|
overridevirtual |
Perform one stage of a lifecycle operation.
Processing may be done entirely within this method, or may be a longer process that involves nonzero simulation time or several events, and is triggered by this method call.
Return value: true = "done"; false = "not yet done, will invoke doneCallback when done"
Implements inet::ILifecycle.
|
overrideprotectedvirtual |
Reimplemented in inet::STP, and inet::RSTP.
Referenced by inet::RSTP::initialize(), and inet::STP::initialize().
|
inlineoverrideprotectedvirtual |
Reimplemented in inet::STP, and inet::RSTP.
|
inlineoverridevirtual |
Reimplemented in inet::RSTP.
|
overrideprotectedvirtual |
Adds effects to be represented by Tkenv.
Inactive links are colored grey. Shows port role, state. Marks root switch.
|
protectedvirtual |
Reimplemented in inet::STP, and inet::RSTP.
Referenced by handleOperationStage(), initialize(), inet::RSTP::start(), and inet::STP::start().
|
protectedvirtual |
Reimplemented in inet::STP, and inet::RSTP.
Referenced by handleOperationStage(), inet::RSTP::stop(), and inet::STP::stop().
|
protected |
Referenced by inet::STP::checkRootEligibility(), inet::RSTP::contestInterfacedata(), inet::STP::generateBPDU(), inet::RSTP::handleIncomingFrame(), inet::STP::initialize(), inet::RSTP::initInterfacedata(), inet::STP::initInterfacedata(), inet::operator<<(), inet::RSTP::printState(), inet::RSTP::processBPDU(), inet::STP::reset(), inet::STP::selectDesignatedPorts(), inet::RSTP::sendBPDU(), inet::RSTP::sendTCNtoRoot(), start(), inet::STP::start(), and inet::STP::tryRoot().
|
protected |
Referenced by inet::STP::checkParametersChange(), inet::STP::checkRootEligibility(), inet::RSTP::contestInterfacedata(), inet::STP::generateBPDU(), initialize(), inet::RSTP::initInterfacedata(), inet::STP::initInterfacedata(), inet::operator<<(), inet::RSTP::printState(), inet::STP::reset(), inet::STP::selectDesignatedPorts(), inet::RSTP::sendBPDU(), inet::RSTP::sendTCNtoRoot(), inet::STP::start(), and inet::STP::tryRoot().
|
protected |
Referenced by inet::STP::checkParametersChange(), inet::RSTP::handleHelloTime(), inet::RSTP::handleUpgrade(), initialize(), inet::operator<<(), inet::RSTP::processBetterSource(), inet::RSTP::processSameSource(), inet::RSTP::receiveSignal(), inet::STP::reset(), inet::RSTP::sendBPDU(), inet::RSTP::sendTCNtoRoot(), inet::STP::start(), and inet::STP::tryRoot().
|
protected |
Referenced by inet::RSTP::handleHelloTime(), initialize(), inet::RSTP::sendBPDU(), and inet::RSTP::sendTCNtoRoot().
|
protected |
|
protected |
Referenced by getPortInterfaceEntry(), and initialize().
|
protected |
Referenced by inet::STP::handleMessage(), inet::RSTP::handleMessage(), initialize(), refreshDisplay(), start(), and stop().
|
protected |
|
protected |
|
protected |
Referenced by inet::STP::checkRootEligibility(), inet::RSTP::checkTC(), inet::STP::checkTimers(), inet::RSTP::flushOtherPorts(), inet::STP::generateHelloBDPUs(), inet::RSTP::getBestAlternate(), getRootIndex(), inet::RSTP::handleHelloTime(), inet::STP::handleTick(), inet::RSTP::handleUpgrade(), initialize(), inet::RSTP::initPorts(), inet::STP::initPortTable(), inet::operator<<(), inet::RSTP::printState(), inet::RSTP::processBetterSource(), inet::RSTP::processSameSource(), inet::RSTP::receiveSignal(), refreshDisplay(), inet::RSTP::scheduleNextUpgrade(), inet::STP::selectDesignatedPorts(), inet::STP::selectRootPort(), inet::RSTP::sendBPDUs(), inet::RSTP::sendTCNtoRoot(), and inet::STP::setAllDesignated().
|
protected |
Referenced by colorLink(), getPortInterfaceEntry(), initialize(), and refreshDisplay().
|
protected |
Referenced by colorLink(), initialize(), and refreshDisplay().