16 #ifndef __OMNETPP_CSIMULATION_H    17 #define __OMNETPP_CSIMULATION_H    19 #include "simkerneldefs.h"    20 #include "simtime_t.h"    21 #include "ccomponent.h"    22 #include "cexception.h"    35 class cFutureEventSet;
    37 class cParsimPartition;
    39 class cFingerprintCalculator;
    44 SIM_API 
extern cDefaultList defaultList; 
    68     static cEnvir *activeEnvir;
    69     static cEnvir *staticEnvir; 
    76 #ifdef USE_OMNETPP4x_FINGERPRINTS    77     int lastVersion4ModuleId; 
   103     void checkActive()  {
if (getActiveSimulation()!=
this) 
throw cRuntimeError(
this, E_WRONGSIM);}
   129     virtual void forEachChild(
cVisitor *v) 
override;
   134     virtual std::string getFullPath() 
const override;
   161     static void setStaticEnvir(
cEnvir *env);
   189     void deregisterComponent(
cComponent *component);
   203     cModule *getModuleByPath(
const char *modulePath) 
const;
   226     void setSystemModule(
cModule *module);
   253     static int loadNedSourceFolder(
const char *folderName);
   262     static void loadNedFile(
const char *nedFilename, 
const char *expectedPackage=
nullptr, 
bool isXML=
false);
   274     static void loadNedText(
const char *name, 
const char *nedText, 
const char *expectedPackage=
nullptr, 
bool isXML=
false);
   282     static void doneLoadingNedFiles();
   288     static std::string getNedPackageForFolder(
const char *folder);
   322     void setSimulationTimeLimit(
simtime_t simTimeLimit);
   334     void callInitialize();
   346     void deleteNetwork();
   439     void putBackEvent(
cEvent *event);
   445     void executeEvent(
cEvent *event);
   456     void transferToMain();
   463     void insertEvent(
cEvent *event);
   478     void setGlobalContext()  {contextComponent=
nullptr; cOwnedObject::setDefaultOwner(&defaultList);}
   505     cModule *getContextModule() 
const;
   541     unsigned long getUniqueNumber();
   548     void snapshot(
cObject *obj, 
const char *label);
 Abstract base class for the future event set (FES), a central data structure for discrete event simul...
Definition: cfutureeventset.h:32
 
cComponent * getContext() const 
Definition: csimulation.h:490
 
cModuleType * getNetworkType() const 
Definition: csimulation.h:363
 
The message class in OMNeT++. cMessage objects may represent events, messages, jobs or other entities...
Definition: cmessage.h:95
 
void setWarmupPeriod(simtime_t t)
Definition: csimulation.h:399
 
Thrown when the simulation kernel or other components detect a runtime error. 
Definition: cexception.h:282
 
Common base for module and channel classes. 
Definition: ccomponent.h:48
 
Root of the OMNeT++ class hierarchy. cObject is a lightweight class without any data members...
Definition: cobject.h:58
 
int getLastComponentId() const 
Definition: csimulation.h:194
 
int64_t-based, base-10 fixed-point simulation time. 
Definition: simtime.h:66
 
Base class for all simple module classes. 
Definition: csimplemodule.h:62
 
cModule * getModule(int id) const 
Definition: csimulation.h:215
 
int getSimulationStage() const 
Definition: csimulation.h:357
 
cChannel * getChannel(int id) const 
Definition: csimulation.h:221
 
Simulation manager class. 
Definition: csimulation.h:62
 
Represents an event in the discrete event simulator. 
Definition: cevent.h:43
 
Extends cObject with a name string. Also includes a "flags" member, with bits open for use by subclas...
Definition: cnamedobject.h:36
 
static cEnvir * getActiveEnvir()
Definition: csimulation.h:148
 
simtime_t_cref getWarmupPeriod() const 
Definition: csimulation.h:394
 
eventnumber_t getEventNumber() const 
Definition: csimulation.h:383
 
cModule * getSystemModule() const 
Definition: csimulation.h:231
 
cSimpleModule * getActivityModule() const 
Definition: csimulation.h:485
 
cEnvir represents the "environment" or user interface of the simulation. 
Definition: cenvir.h:73
 
simtime_t simTime()
Returns the current simulation time. 
Definition: csimulation.h:568
 
cScheduler * getScheduler() const 
Definition: csimulation.h:304
 
This class represents modules in the simulation. 
Definition: cmodule.h:47
 
cEnvir * getEnvir() const 
Definition: csimulation.h:171
 
static cEnvir * getStaticEnvir()
Definition: csimulation.h:166
 
void setContextType(int type)
Definition: csimulation.h:473
 
void setSimTime(simtime_t time)
Definition: csimulation.h:370
 
Abstract class to encapsulate event scheduling. 
Definition: cscheduler.h:48
 
static cSimulation * getActiveSimulation()
Definition: csimulation.h:142
 
cComponent * getComponent(int id) const 
Definition: csimulation.h:209
 
bool isTrapOnNextEventRequested() const 
Definition: csimulation.h:530
 
int getContextType() const 
Definition: csimulation.h:499
 
void setGlobalContext()
Definition: csimulation.h:478
 
void requestTrapOnNextEvent()
Definition: csimulation.h:519
 
cFingerprintCalculator * getFingerprintCalculator()
Definition: csimulation.h:554
 
int64_t eventnumber_t
Sequence number of events during the simulation. Events are numbered from one. (Event number zero is ...
Definition: simkerneldefs.h:78
 
Enables traversing the tree of (cObject-rooted) simulation objects. 
Definition: cvisitor.h:56
 
Utility class, to make it impossible to call the operator= and copy constructor of any class derived ...
Definition: cobject.h:311
 
simtime_t_cref getSimTime() const 
Definition: csimulation.h:377
 
This class defines the interface for fingerprint calculators. 
Definition: cfingerprint.h:34
 
Definition: cabstracthistogram.h:21
 
bool isModule() const 
Definition: ccomponent.h:382
 
cEnvir * getEnvir()
Returns the environment object for the currently active simulation. 
Definition: csimulation.h:582
 
Abstract class for creating a module of a specific type. 
Definition: ccomponenttype.h:192
 
void clearTrapOnNextEvent()
Definition: csimulation.h:524
 
Exception class. 
Definition: cexception.h:48
 
Base class for channels. 
Definition: cchannel.h:34
 
cFutureEventSet * getFES() const 
Definition: csimulation.h:316
 
cSimulation * getSimulation()
Returns the currently active simulation. 
Definition: csimulation.h:575
 
bool isChannel() const 
Definition: ccomponent.h:387