|cEnvir represents the "environment" of the simulation. More...|
|The interface for cEnvir objects that can be instantiated as a user interface like Cmdenv and Tkenv. More...|
|A cEnvir implementation with all pure virtual methods defined with an empty body, with a trivial implementation, or to throw an exception with the "unsupported method" text. More...|
|#define EV ev.isDisabled()?ev:ev|
EV<< can be used instead of
ev<< to make logging more efficient.
EV << "Packet " << msg->getName() << " received\n";
EV utilizes cEnvir::isDisabled() to check whether the logged text is going to be printed/stored anywhere, or just gets discarded; in the latter case the
<< operators do not get evaluated at all, making the log statement effectively a zero cost operation.
|#define ev (*cSimulation::getActiveEnvir())|
Represents the "environment" or user interface of the simulation.
Most common usage from model code (simple modules) is to write log messages, e.g.:
ev << "Received packet " << msg->getName() << ", length " << msg->getBitLength()/8 << " bytes\n"; ev << "Sending up to higher layer\n";
The rest of cEnvir methods are used internally for communication between the simulation kernel and the environment.
Referenced by cComponent::getRNG().