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

This operation represents the process of crashing a module. More...

#include <ModuleOperations.h>

Inheritance diagram for inet::ModuleCrashOperation:
inet::LifecycleOperation

Public Types

enum  Stage { STAGE_CRASH, STAGE_LAST }
 
- Public Types inherited from inet::LifecycleOperation
typedef std::map< std::string, std::string > StringMap
 

Public Member Functions

virtual int getNumStages () const override
 Returns the number of stages required by this operation. More...
 
- Public Member Functions inherited from inet::LifecycleOperation
 LifecycleOperation ()
 
virtual void initialize (cModule *module, StringMap &params)
 Initialize the operation using the parameters provided in the string map. More...
 
cModule * getRootModule () const
 Returns the module the operation is initiated on. More...
 
int getCurrentStage () const
 Returns the current stage, an integer in 0..numStages-1. More...
 

Detailed Description

This operation represents the process of crashing a module.

The difference between this operation and ShutdownOperation is that the module will not do a graceful shutdown (e.g. routing protocols will not have chance of notifying peers about broken routes).

The operation has only one stage, and the execution must finish in zero simulation time.

Member Enumeration Documentation

◆ Stage

Enumerator
STAGE_CRASH 
STAGE_LAST 
75  {
76  STAGE_CRASH, // the only stage, must execute within zero simulation time
78  };

Member Function Documentation

◆ getNumStages()

virtual int inet::ModuleCrashOperation::getNumStages ( ) const
inlineoverridevirtual

Returns the number of stages required by this operation.

Implements inet::LifecycleOperation.

81 { return STAGE_LAST + 1; }

The documentation for this class was generated from the following file:
inet::ModuleCrashOperation::STAGE_LAST
@ STAGE_LAST
Definition: ModuleOperations.h:77
inet::ModuleCrashOperation::STAGE_CRASH
@ STAGE_CRASH
Definition: ModuleOperations.h:76