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

TODO: This operation represents the process of suspending (hybernating) a network node. More...

#include <NodeOperations.h>

Inheritance diagram for inet::NodeCrashOperation:
inet::NodeOperation inet::LifecycleOperation

Public Types

enum  Stage { STAGE_CRASH, STAGE_LAST }
 
- Public Types inherited from inet::LifecycleOperation
enum  Kind { UP, DOWN, MOMENTARY }
 
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...
 
virtual Kind getKind () const override
 Returns the "kind" or "direction" of the operation. More...
 
- Public Member Functions inherited from inet::NodeOperation
virtual void initialize (cModule *module, StringMap &params) override
 Initialize the operation using the parameters provided in the string map. More...
 
- Public Member Functions inherited from inet::LifecycleOperation
 LifecycleOperation ()
 
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

TODO: This operation represents the process of suspending (hybernating) a network node.

All state information (routing tables, etc) will remain intact, but the node will stop responding to messages.

The operation should be applied to the module of a network node. Operation stages are organized top-down similarly to the OSI network layers. / class INET_API NodeSuspendOperation : public NodeOperation { public: enum Stage { STAGE_LOCAL, // for changes that don't depend on other modules STAGE_APPLICATION_LAYER, STAGE_TRANSPORT_LAYER, STAGE_NETWORK_LAYER, STAGE_LINK_LAYER, STAGE_PHYSICAL_LAYER, STAGE_LAST };

public: virtual int getNumStages() const { return STAGE_LAST+1; } virtual Kind getKind() const { return DOWN; } }; This operation represents the process of crashing a network node. The difference between this operation and NodeShutdownOperation is that the network node will not do a graceful shutdown (e.g. routing protocols will not have chance of notifying peers about broken routes).

The operation should be applied to the module of a network node. The operation has only one stage, and the execution must finish in zero simulation time.

Member Enumeration Documentation

Enumerator
STAGE_CRASH 
STAGE_LAST 
126  {
127  STAGE_CRASH, // the only stage, must execute within zero simulation time
128  STAGE_LAST
129  };
Definition: NodeOperations.h:128
Definition: NodeOperations.h:127

Member Function Documentation

virtual Kind inet::NodeCrashOperation::getKind ( ) const
inlineoverridevirtual

Returns the "kind" or "direction" of the operation.

This attribute is provided for convenience, it is not used by the lifecycle infrastructure itself.

Implements inet::LifecycleOperation.

133 { return DOWN; }
Shutdown, suspend, stop, crash, interface down, etc.
Definition: LifecycleOperation.h:41
virtual int inet::NodeCrashOperation::getNumStages ( ) const
inlineoverridevirtual

Returns the number of stages required by this operation.

Implements inet::LifecycleOperation.

132 { return STAGE_LAST + 1; }
Definition: NodeOperations.h:128

The documentation for this class was generated from the following file: