LifecycleController

Package: inet.common.lifecycle

LifecycleController

simple module

Manages operations like shutdown/restart, suspend/resume, crash/recover and similar operations for nodes (routers, hosts, etc), interfaces, and protocols.

This module usually has only one instance in a network, and has no parameters -- operations can be initiated programmatically (from C++), or via ScenarioManager scripts. An example script:

<scenario>
  <at t="2s">
    <tell module="lifecycleController" target="Router2" operation="NodeShutdownOperation"/>
  </at>
  <at t="10s">
    <tell module="lifecycleController" target="Router2" operation="NodeStartOperation"/>
  </at>
</scenario>

The module attribute should point to the LifecycleController module instance.

The target attribute should point to the module (host, router, network interface, protocol, etc) to be operated on.

The operation attribute contains the operation to perform. Some known operations names are: NodeShutdownOperation, NodeCrashOperation, NodeStartOperation. To see all available operations, find the names of C++ classes subclassed from LifecycleOperation.

The details of the mechanism can be found in the C++ documentation of this module's class.

See also: ScenarioManager

Properties

Name Value Description
display i=block/cogwheel_s

Source code

//
// Manages operations like shutdown/restart, suspend/resume, crash/recover
// and similar operations for nodes (routers, hosts, etc), interfaces, and
// protocols.
//
// This module usually has only one instance in a network, and has no
// parameters -- operations can be initiated programmatically (from C++),
// or via ~ScenarioManager scripts. An example script:
//
// <pre>
// <scenario>
//   <at t="2s">
//     <tell module="lifecycleController" target="Router2" operation="NodeShutdownOperation"/>
//   </at>
//   <at t="10s">
//     <tell module="lifecycleController" target="Router2" operation="NodeStartOperation"/>
//   </at>
// </scenario>
// </pre>
//
// The <tt>module</tt> attribute should point to the LifecycleController
// module instance.
//
// The <tt>target</tt> attribute should point to the module (host, router,
// network interface, protocol, etc) to be operated on.
//
// The <tt>operation</tt> attribute contains the operation to perform. Some
// known operations names are: NodeShutdownOperation, NodeCrashOperation,
// NodeStartOperation. To see all available operations,
// find the names of C++ classes subclassed from LifecycleOperation.
//
// The details of the mechanism can be found in the C++ documentation of this
// module's class.
//
// @see ScenarioManager
//
simple LifecycleController
{
    @display("i=block/cogwheel_s");
}
File: src/inet/common/lifecycle/LifecycleController.ned