#include <OperationalBase.h>
inet::OperationalBase::OperationalBase |
( |
| ) |
|
bool isOperational
Definition: OperationalBase.h:28
void inet::OperationalBase::handleMessage |
( |
cMessage * |
msg | ) |
|
|
overrideprotectedvirtual |
bool isOperational
Definition: OperationalBase.h:28
virtual void handleMessageWhenUp(cMessage *msg)=0
virtual void handleMessageWhenDown(cMessage *msg)
Definition: OperationalBase.cc:50
void inet::OperationalBase::handleMessageWhenDown |
( |
cMessage * |
msg | ) |
|
|
protectedvirtual |
Reimplemented in inet::physicallayer::Radio.
Referenced by handleMessage(), and inet::physicallayer::Radio::handleMessageWhenDown().
52 if (message->isSelfMessage())
53 throw cRuntimeError(
"Self message '%s' received when %s is down", message->getName(), getComponentType()->getName());
55 EV_WARN << getComponentType()->getName() <<
" is down, dropping '" << message->getName() <<
"' message\n";
57 throw cRuntimeError(
"Message '%s' received when %s is down", message->getName(), getComponentType()->getName());
simtime_t lastChange
Definition: OperationalBase.h:29
virtual void inet::OperationalBase::handleMessageWhenUp |
( |
cMessage * |
msg | ) |
|
|
protectedpure virtual |
void inet::OperationalBase::handleNodeCrash |
( |
| ) |
|
|
protectedvirtual |
Reimplemented in inet::PIMDM, inet::PIMSM, inet::PIMBase, inet::physicallayer::Radio, inet::UDPBasicBurst, inet::ieee80211::Ieee80211Mac, inet::UDPVideoStreamSvr, inet::UDPBasicApp, inet::UDPSink, inet::UDPVideoStreamCli, and inet::UDPEchoApp.
Referenced by inet::physicallayer::Radio::handleNodeCrash(), and handleOperationStage().
bool inet::OperationalBase::handleNodeShutdown |
( |
IDoneCallback * |
doneCallback | ) |
|
|
protectedvirtual |
Reimplemented in inet::PIMDM, inet::PIMSM, inet::PIMBase, inet::physicallayer::Radio, inet::UDPBasicBurst, inet::ieee80211::Ieee80211Mac, inet::UDPVideoStreamSvr, inet::UDPBasicApp, inet::UDPSink, inet::UDPVideoStreamCli, and inet::UDPEchoApp.
Referenced by inet::physicallayer::Radio::handleNodeShutdown(), and handleOperationStage().
bool inet::OperationalBase::handleNodeStart |
( |
IDoneCallback * |
doneCallback | ) |
|
|
protectedvirtual |
Reimplemented in inet::PIMDM, inet::PIMSM, inet::PIMBase, inet::physicallayer::Radio, inet::UDPBasicBurst, inet::ieee80211::Ieee80211Mac, inet::UDPVideoStreamSvr, inet::UDPBasicApp, inet::UDPSink, inet::UDPVideoStreamCli, and inet::UDPEchoApp.
Referenced by inet::ieee80211::Ieee80211Mac::handleNodeShutdown(), inet::ieee80211::Ieee80211Mac::handleNodeStart(), inet::physicallayer::Radio::handleNodeStart(), handleOperationStage(), and initialize().
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.
63 Enter_Method_Silent();
64 if (dynamic_cast<NodeStartOperation *>(operation)) {
70 else if (dynamic_cast<NodeShutdownOperation *>(operation)) {
77 else if (dynamic_cast<NodeCrashOperation *>(operation)) {
virtual void handleNodeCrash()
Definition: OperationalBase.cc:97
virtual bool handleNodeShutdown(IDoneCallback *doneCallback)
Definition: OperationalBase.cc:92
virtual void setOperational(bool isOperational)
Definition: OperationalBase.cc:101
virtual bool handleNodeStart(IDoneCallback *doneCallback)
Definition: OperationalBase.cc:87
virtual bool isNodeShutdownStage(int stage)=0
virtual bool isNodeStartStage(int stage)=0
Definition: NodeOperations.h:127
void inet::OperationalBase::initialize |
( |
int |
stage | ) |
|
|
overrideprotectedvirtual |
Reimplemented in inet::PIMDM, inet::PIMSM, inet::PIMBase, inet::physicallayer::Radio, inet::CsmaCaMac, inet::Flood, inet::LMacLayer, inet::CSMA, inet::IdealMac, inet::UDPBasicBurst, inet::UDPVideoStreamSvr, inet::BMacLayer, inet::ieee80211::Ieee80211Mac, inet::WiseRoute, inet::ProbabilisticBroadcast, inet::UDPBasicApp, inet::UDPSink, inet::UDPVideoStreamCli, inet::MACProtocolBase, inet::physicallayer::Ieee80211Radio, inet::UDPEchoApp, inet::NetworkProtocolBase, and inet::AdaptiveProbabilisticBroadcast.
Referenced by inet::NetworkProtocolBase::initialize(), inet::UDPEchoApp::initialize(), inet::MACProtocolBase::initialize(), inet::UDPVideoStreamCli::initialize(), inet::UDPSink::initialize(), inet::UDPBasicApp::initialize(), inet::UDPVideoStreamSvr::initialize(), inet::UDPBasicBurst::initialize(), inet::physicallayer::Radio::initialize(), and inet::PIMBase::initialize().
35 NodeStatus *nodeStatus =
dynamic_cast<NodeStatus *
>(
findContainingNode(
this)->getSubmodule(
"status"));
bool isOperational
Definition: OperationalBase.h:28
virtual void setOperational(bool isOperational)
Definition: OperationalBase.cc:101
cModule * findContainingNode(const cModule *from)
Find the node containing the given module.
Definition: ModuleAccess.cc:56
virtual bool handleNodeStart(IDoneCallback *doneCallback)
Definition: OperationalBase.cc:87
virtual bool isInitializeStage(int stage)=0
Definition: NodeStatus.h:40
virtual bool inet::OperationalBase::isInitializeStage |
( |
int |
stage | ) |
|
|
protectedpure virtual |
virtual bool inet::OperationalBase::isNodeShutdownStage |
( |
int |
stage | ) |
|
|
protectedpure virtual |
virtual bool inet::OperationalBase::isNodeStartStage |
( |
int |
stage | ) |
|
|
protectedpure virtual |
virtual int inet::OperationalBase::numInitStages |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
Reimplemented in inet::PIMDM, inet::PIMSM, inet::PIMBase, inet::Flood, inet::IdealMac, inet::UDPBasicBurst, inet::UDPVideoStreamSvr, inet::BMacLayer, inet::ieee80211::Ieee80211Mac, inet::WiseRoute, inet::ProbabilisticBroadcast, inet::UDPBasicApp, inet::UDPSink, inet::UDPVideoStreamCli, and inet::UDPEchoApp.
The number of initialization stages.
Definition: InitStages.h:116
void inet::OperationalBase::setOperational |
( |
bool |
isOperational | ) |
|
|
protectedvirtual |
bool inet::OperationalBase::isOperational |
|
protected |
simtime_t inet::OperationalBase::lastChange |
|
protected |
The documentation for this class was generated from the following files: