Miscellaneous types.
Classes | |
class | any_ptr |
A type-safe equivalent of the void* pointer. More... | |
class | cArray |
Vector-like container for objects derived from cObject. More... | |
class | cConfigOption |
Describes a configuration option. More... | |
class | cEnum |
Provides string representation for enums. More... | |
class | cFingerprintCalculator |
This class defines the interface for fingerprint calculators. More... | |
class | cSingleFingerprintCalculator |
This class calculates the "fingerprint" of a simulation. More... | |
class | cMultiFingerprintCalculator |
This class calculates multiple fingerprints simultaneously. More... | |
class | cHasher |
Utility class to calculate the hash of some data. More... | |
class | cISimulationLifecycleListener |
A callback interface for receiving notifications at various stages simulations, including setting up, running, and tearing down.. More... | |
class | cMsgPar |
Allows a value (string, bool, double, etc) to be attached to a cMessage object. More... | |
class | cNoncopyableOwnedObject |
Base class for cOwnedObject-based classes that do not wish to support assignment and duplication. More... | |
class | cPatternMatcher |
Glob-style pattern matching class, adopted to special OMNeT++ requirements. One instance represents a pattern to match. More... | |
struct | SendOptions |
Options for the cSimpleModule::send() and cSimpleModule::sendDirect() calls. More... | |
class | cStringTokenizer |
String tokenizer that supports quoted strings and nested parenthesis. More... | |
class | cVisitor |
Enables traversing the tree of (cObject-rooted) simulation objects. More... | |
class | opp_component_ptr< T > |
class | opp_string |
Lightweight string class, used internally in some parts of OMNeT++. More... | |
class | opp_string_vector |
Lightweight string vector, used internally in some parts of OMNeT++. More... | |
class | opp_string_map |
Lightweight string-to-string map, used internally in some parts of OMNeT++. More... | |
Macros | |
#define | Enter_Method(...) |
Denotes module class member function as callable from other modules. More... | |
#define | Enter_Method_Silent(...) |
Denotes module class member function as callable from other modules. More... | |
Typedefs | |
typedef void(* | CoroutineFnp) (void *) |
Prototype for functions that can be used with cCoroutine objects as coroutine bodies. More... | |
typedef cValue(* | NedFunction) (cComponent *context, cValue argv[], int argc) |
One of the two function signatures that can be used with cDynamicExpression. This one can be used with functions that do not need context information other than contextComponent for the evaluation. More... | |
typedef cValue(* | NedFunctionExt) (cExpression::Context *context, cValue argv[], int argc) |
One of the two function signatures that can be used with cDynamicExpression. This one is more generic, as it receives all context information in the context argument. More... | |
typedef double(* | MathFunc) (...) |
Prototype for mathematical functions. More... | |
typedef double(* | MathFuncNoArg) () |
Prototype for mathematical functions taking no arguments. More... | |
typedef double(* | MathFunc1Arg) (double) |
Prototype for mathematical functions taking one argument. More... | |
typedef double(* | MathFunc2Args) (double, double) |
Prototype for mathematical functions taking two arguments. More... | |
typedef double(* | MathFunc3Args) (double, double, double) |
Prototype for mathematical functions taking three arguments. More... | |
typedef double(* | MathFunc4Args) (double, double, double, double) |
Prototype for mathematical functions taking four arguments. More... | |
typedef int(* | CompareFunc) (cObject *a, cObject *b) |
Function for comparing two cObjects, used by cQueue for priority queuing. More... | |
typedef int64_t | eventnumber_t |
Sequence number of events during the simulation. Events are numbered from one. (Event number zero is reserved for network setup and initialization.) More... | |
typedef int64_t | msgid_t |
Message ID. See cMessage::getId(). More... | |
typedef int64_t | txid_t |
Transmission ID. See SendOptions::transmissionId(), cMessage::getTransmissionId(). More... | |
typedef int64_t | intval_t |
Signed integer type which is guaranteed to be at least 64 bits wide. It is used throughout the library as a "large enough" general integer type, for example in NED parameters, during expression evaluation, and as signal value. More... | |
typedef uint64_t | uintval_t |
Unsigned integer type which is guaranteed to be at least 64 bits wide. It is used throughout the library as a "large enough" general unsigned integer type. More... | |
typedef intval_t | intpar_t |
Enumerations | |
enum | SimulationLifecycleEventType { LF_ON_STARTUP, LF_PRE_NETWORK_SETUP, LF_POST_NETWORK_SETUP, LF_PRE_NETWORK_INITIALIZE, LF_POST_NETWORK_INITIALIZE, LF_ON_SIMULATION_START, LF_ON_SIMULATION_PAUSE, LF_ON_SIMULATION_RESUME, LF_ON_SIMULATION_SUCCESS, LF_ON_SIMULATION_ERROR, LF_PRE_NETWORK_FINISH, LF_POST_NETWORK_FINISH, LF_ON_RUN_END, LF_PRE_NETWORK_DELETE, LF_POST_NETWORK_DELETE, LF_ON_SHUTDOWN } |
Event type for cISimulationLifecycleListener's lifecycleEvent() method. More... | |
Functions | |
cObject * | createOne (const char *classname) |
Shortcut to cObjectFactory::createOne(). More... | |
cObject * | createOneIfClassIsKnown (const char *classname) |
Shortcut to cObjectFactory::createOneIfClassIsKnown(). More... | |
cSimulation * | getSimulation () |
Returns the currently active simulation, or nullptr if there is none. More... | |
cEnvir * | getEnvir () |
Returns the environment object for the currently active simulation. This function never returns nullptr (not even during shutdown). More... | |
#define Enter_Method | ( | ... | ) |
Denotes module class member function as callable from other modules.
Usage: Enter_Method(fmt, arg1, arg2...);
Example: Enter_Method("requestPacket(%d)",n);
The macro should be put at the top of every module member function that may be called from other modules. This macro arranges to temporarily switch the context to the called module (the old context will be restored automatically when the method returns), and also lets the graphical user interface animate the method call.
The argument(s) should specify the method name (and parameters) – it will be used for the animation. The argument list works as in printf()
, so it is easy to include the actual parameter values.
#define Enter_Method_Silent | ( | ... | ) |
Denotes module class member function as callable from other modules.
This macro is similar to the Enter_Method() macro, only it does not animate the call on the GUI; the call is still recorded into the the event log file.
The macro may be called with or without arguments. When called with arguments, they should be a printf-style format string, and parameters to be substituted into it; the resulting string should contain the method name and the actual arguments.
Usage: Enter_Method_Silent();
, Enter_Method_Silent(fmt, arg1, arg2...);
Example: Enter_Method_Silent("getRouteFor(address=%d)",address);
typedef void(* CoroutineFnp) (void *) |
Prototype for functions that can be used with cCoroutine objects as coroutine bodies.
typedef cValue(* NedFunction) (cComponent *context, cValue argv[], int argc) |
One of the two function signatures that can be used with cDynamicExpression. This one can be used with functions that do not need context information other than contextComponent for the evaluation.
typedef cValue(* NedFunctionExt) (cExpression::Context *context, cValue argv[], int argc) |
One of the two function signatures that can be used with cDynamicExpression. This one is more generic, as it receives all context information in the context argument.
typedef double(* MathFunc) (...) |
Prototype for mathematical functions.
typedef double(* MathFuncNoArg) () |
Prototype for mathematical functions taking no arguments.
typedef double(* MathFunc1Arg) (double) |
Prototype for mathematical functions taking one argument.
typedef double(* MathFunc2Args) (double, double) |
Prototype for mathematical functions taking two arguments.
typedef double(* MathFunc3Args) (double, double, double) |
Prototype for mathematical functions taking three arguments.
typedef double(* MathFunc4Args) (double, double, double, double) |
Prototype for mathematical functions taking four arguments.
Function for comparing two cObjects, used by cQueue for priority queuing.
The return value should be:
typedef int64_t eventnumber_t |
Sequence number of events during the simulation. Events are numbered from one. (Event number zero is reserved for network setup and initialization.)
typedef int64_t msgid_t |
Message ID. See cMessage::getId().
typedef int64_t txid_t |
Transmission ID. See SendOptions::transmissionId(), cMessage::getTransmissionId().
typedef int64_t intval_t |
Signed integer type which is guaranteed to be at least 64 bits wide. It is used throughout the library as a "large enough" general integer type, for example in NED parameters, during expression evaluation, and as signal value.
typedef uint64_t uintval_t |
Unsigned integer type which is guaranteed to be at least 64 bits wide. It is used throughout the library as a "large enough" general unsigned integer type.
Event type for cISimulationLifecycleListener's lifecycleEvent() method.
Enumerator | |
---|---|
LF_ON_STARTUP | Fired on the startup of the simulation program, after global configuration has been applied, but before any simulation has been set up. |
LF_PRE_NETWORK_SETUP | Fired before network setup. At the time of the call, cSimulation's network type pointer (see getNetworkType()) already points to the type of the network that will be set up. |
LF_POST_NETWORK_SETUP | Fired immediately after a network has been set up, and before callInitialize() has been invoked. If there has been an error during network setup, then only LF_SIMULATION_ERROR will be fired but not this event. For practical purposes, this event is almost the same as LF_PRE_NETWORK_INITIALIZE. |
LF_PRE_NETWORK_INITIALIZE | Fired just before the network is initialized, i.e. before callInitialize() has been invoked on the system module. |
LF_POST_NETWORK_INITIALIZE | Fired just after the network was initialized, i.e. after callInitialize() was invoked on the system module. If there is has been an error during initialization, then only LF_SIMULATION_ERROR will be fired but not this event. |
LF_ON_SIMULATION_START | Fired immediately before the first event is processed by the simulation. This is similar to, but not the same as LF_POST_NETWORK_INITIALIZE, because on the GUI there might be a delay between the user setting up the network and actually hitting the Run button. |
LF_ON_SIMULATION_PAUSE | Fired when simulation execution has been temporarily stopped by the user between two events. |
LF_ON_SIMULATION_RESUME | Fired when the user resumes simulation execution after it has been paused. This event may be used e.g. by the real-time scheduler to resynchronize with wall clock time. |
LF_ON_SIMULATION_SUCCESS | Fired just after processing the last event of the simulation (i.e. still before finalization). If the simulation stops with an error, LF_ON_SIMULATION_ERROR will be fired instead of this event. |
LF_ON_SIMULATION_ERROR | Fired on a runtime error, in any stage of a simulation run's lifecycle (during network setup, initialization, in an event during simulation, during finalization and network deletion.) |
LF_PRE_NETWORK_FINISH | Fired just before the network is finalized, i.e. before callFinish() has been invoked on the system module. This only happens if the simulation has completed successfully (did not stop with an error). |
LF_POST_NETWORK_FINISH | Fired immediately after the network has been finalized, i.e. after callFinish() invocation has taken place on the system module. If there has been an error during finalization, then only LF_ON_SIMULATION_ERROR will be fired but not this event. |
LF_ON_RUN_END | Fired after the simulation has been terminated, either by calling finish() or because of an error any previous state (including network setup). This event is distinct from LF_PRE_NETWORK_DELETE, because when using a GUI, there might be a delay between the simulation terminating and the user action that causes the network to be deleted. Note that using the GUI, it is also possible for the user to skip finalization of the network (even if there was no error), so LF_PRE_NETWORK_FINISH / LF_POST_NETWORK_FINISH are not guaranteed to have been fired prior to this event. |
LF_PRE_NETWORK_DELETE | Fired before the network is deleted, i.e. before cSimulation's deleteNetwork() has been called. This event is fired even if there was an error during network setup. |
LF_POST_NETWORK_DELETE | Fired after the network has been deleted, i.e. cSimulation's deleteNetwork() was called. At the time of the call, the network type pointer in cSimulation (see getNetworkType()) is still valid. This event is not fired if an error occurs during deleteNetwork(). |
LF_ON_SHUTDOWN | Fired before the simulation program exits. At the time of the call, the simulated network has been torn down, but the simulation infrastructure (scheduler object, etc) is still in place. |
|
inline |
Shortcut to cObjectFactory::createOne().
References cObjectFactory::createOne().
|
inline |
Shortcut to cObjectFactory::createOneIfClassIsKnown().
References cObjectFactory::createOneIfClassIsKnown().
|
inline |
Returns the currently active simulation, or nullptr if there is none.
References cSimulation::getActiveSimulation().
Referenced by cMessage::getArrivalModule(), cTopology::Node::getModule(), cMessage::getSenderModule(), and cMessage::setTimestamp().
|
inline |
Returns the environment object for the currently active simulation. This function never returns nullptr (not even during shutdown).
References cSimulation::getActiveEnvir().