|
INET Framework for OMNeT++/OMNEST
|
Base class for operations used by the ILifecycle interface. More...
#include <LifecycleOperation.h>
Public Types | |
| typedef std::map< std::string, std::string > | StringMap |
Public Member Functions | |
| LifecycleOperation () | |
| virtual void | initialize (cModule *module, StringMap ¶ms) |
| Initialize the operation using the parameters provided in the string map. More... | |
| cModule * | getRootModule () const |
| Returns the module the operation is initiated on. More... | |
| virtual int | getNumStages () const =0 |
| Returns the number of stages required by this operation. More... | |
| int | getCurrentStage () const |
| Returns the current stage, an integer in 0..numStages-1. More... | |
Private Attributes | |
| cModule * | rootModule = nullptr |
| int | currentStage = 0 |
| std::vector< IDoneCallback * > | pendingList |
| bool | insideInitiateOperation = false |
| IDoneCallback * | operationCompletionCallback = nullptr |
Friends | |
| class | LifecycleController |
Base class for operations used by the ILifecycle interface.
Subclasses represent "operations" like shutdown, suspend, failure, restart, etc.
| typedef std::map<std::string, std::string> inet::LifecycleOperation::StringMap |
|
inline |
|
inline |
Returns the current stage, an integer in 0..numStages-1.
Referenced by inet::L2NodeConfigurator::handleOperationStage(), inet::Ipv4NodeConfigurator::handleOperationStage(), inet::NodeStatus::handleOperationStage(), inet::OperationalMixin< cSimpleModule >::handleOperationStage(), inet::Ipv4RoutingTable::handleOperationStage(), inet::Ipv6RoutingTable::handleOperationStage(), and inet::NetworkInterface::handleOperationStage().
|
pure virtual |
Returns the number of stages required by this operation.
Implemented in inet::ModuleCrashOperation, inet::ModuleStopOperation, inet::ModuleStartOperation, inet::InterfaceOperationBase, and inet::ApplicationOperationBase.
Referenced by inet::NodeStatus::handleOperationStage(), and inet::LifecycleController::resumeOperation().
|
inline |
Returns the module the operation is initiated on.
Referenced by inet::TcpServerListener::handleCrashOperation(), inet::UdpEchoApp::handleCrashOperation(), inet::TelnetApp::handleCrashOperation(), inet::EtherAppServer::handleCrashOperation(), inet::TcpBasicClientApp::handleCrashOperation(), inet::UdpVideoStreamClient::handleCrashOperation(), inet::TcpSessionApp::handleCrashOperation(), inet::TcpServerHostApp::handleCrashOperation(), inet::UdpSink::handleCrashOperation(), inet::EtherTrafGen::handleCrashOperation(), inet::UdpVideoStreamServer::handleCrashOperation(), inet::EtherAppClient::handleCrashOperation(), inet::UdpBasicBurst::handleCrashOperation(), inet::PingApp::handleCrashOperation(), inet::DhcpServer::handleCrashOperation(), and inet::DhcpClient::handleCrashOperation().
|
inlinevirtual |
Initialize the operation using the parameters provided in the string map.
The implementation should destructively modify the map, removing from it the parameters it understands. Ideally, the map should be empty when this method returns; if it is not, the caller should treat that as an error, and report the remaining parameters as unrecognized by the operation.
Reimplemented in inet::InterfaceOperationBase, and inet::ApplicationOperationBase.
Referenced by inet::power::SimpleEpEnergyManagement::executeNodeOperation(), inet::power::SimpleCcBattery::executeNodeOperation(), inet::power::SimpleEpEnergyStorage::executeNodeOperation(), inet::ApplicationOperationBase::initialize(), inet::InterfaceOperationBase::initialize(), and inet::ScenarioManager::processLifecycleCommand().
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
Referenced by inet::LifecycleController::resumeOperation().