csimulation.h Source File¶
|
API
|
csimulation.h
77 cComponent **componentv = nullptr; // vector of modules/channels, componentv[0] is not used for historical reasons
83 cSimpleModule *currentActivityModule = nullptr; // the module currently executing activity() (nullptr if handleMessage() or in main)
97 bool trapOnNextEvent = false; // when set, next handleMessage or activity() will execute debugger interrupt
99 bool parameterMutabilityCheck = true; // when disabled, module parameters can be set without them being declared @mutable
102 cUsageCollector *usageCollector = nullptr; // used for coverage tests and for detecting unread parameters
242 cModule *getModule(int id) const {return id<0 || id>=size || !componentv[id] ? nullptr : componentv[id]->isModule() ? (cModule *)componentv[id] : nullptr;}
248 cChannel *getChannel(int id) const {return id<0 || id>=size || !componentv[id] ? nullptr : componentv[id]->isChannel() ? (cChannel *)componentv[id] : nullptr;}
292 static void loadNedFile(const char *nedFilename, const char *expectedPackage=nullptr, bool isXML=false);
304 static void loadNedText(const char *name, const char *nedText, const char *expectedPackage=nullptr, bool isXML=false);
526 void setGlobalContext() {contextComponent=nullptr; cOwnedObject::setOwningContext(&globalOwningContext);}
cEnvir represents the "environment" or user interface of the simulation.
Definition cenvir.h:76
This class defines the interface for fingerprint calculators.
Definition cfingerprint.h:36
Abstract base class for the future event set (FES), a central data structure for discrete event simul...
Definition cfutureeventset.h:33
Abstract interface for managing random number generators (RNGs) for simulation components (modules an...
Definition crngmanager.h:44
The message class in OMNeT++. cMessage objects may represent events, messages, jobs or other entities...
Definition cmessage.h:96
Abstract class for creating a module of a specific type.
Definition ccomponenttype.h:212
cObject is a lightweight class which serves as the root of the OMNeT++ class hierarchy....
Definition cobject.h:93
Thrown when the simulation kernel or other components detect a runtime error.
Definition cexception.h:343
void setScheduler(cScheduler *scheduler)
void transferTo(cSimpleModule *module)
void snapshot(cObject *obj, const char *label)
void setContextType(ContextType type)
Definition csimulation.h:521
virtual ~cSimulation()
static void setActiveSimulation(cSimulation *sim)
void requestTrapOnNextEvent()
Definition csimulation.h:567
simtime_t guessNextSimtime()
cSimpleModule * getContextSimpleModule() const
unsigned long getUniqueNumber()
void transferToMain()
void insertEvent(cEvent *event)
void callInitialize()
void callRefreshDisplay()
bool isTrapOnNextEventRequested() const
Definition csimulation.h:578
cModuleType * getNetworkType() const
Definition csimulation.h:406
void executeEvent(cEvent *event)
static cSimulation * getActiveSimulation()
Definition csimulation.h:150
static void setStaticEnvir(cEnvir *env)
static std::string getNedPackageForFolder(const char *folder)
cSimulation(const char *name, cEnvir *env)
void setFingerprintCalculator(cFingerprintCalculator *fingerprint)
void putBackEvent(cEvent *event)
simtime_t_cref getWarmupPeriod() const
Definition csimulation.h:437
cModule * findModuleByPath(const char *modulePath) const
cSimpleModule * getActivityModule() const
Definition csimulation.h:533
void setSystemModule(cModule *module)
void setFES(cFutureEventSet *fes)
void callFinish()
void setContext(cComponent *component)
cModule * getModuleByPath(const char *modulePath) const
static int loadNedSourceFolder(const char *folderName, const char *excludedPackages="")
eventnumber_t getEventNumber() const
Definition csimulation.h:426
cModule * getContextModule() const
cComponent * getComponent(int id) const
Definition csimulation.h:236
cFingerprintCalculator * getFingerprintCalculator()
Definition csimulation.h:602
static void loadNedText(const char *name, const char *nedText, const char *expectedPackage=nullptr, bool isXML=false)
static void doneLoadingNedFiles()
int registerComponent(cComponent *component)
cEvent * guessNextEvent()
virtual std::string getFullPath() const override
void deregisterComponent(cComponent *component)
virtual void forEachChild(cVisitor *v) override
void setSimulationTimeLimit(simtime_t simTimeLimit)
void setupNetwork(cModuleType *networkType)
cSimpleModule * guessNextModule()
cEvent * takeNextEvent()
virtual void setRngManager(cIRngManager *rngManager)
static void loadNedFile(const char *nedFilename, const char *expectedPackage=nullptr, bool isXML=false)
void deleteNetwork()
Internal class, used as a base class for modules and channels. It is not intended for subclassing out...
Definition csoftowner.h:34
Enables traversing the tree of (cObject-rooted) simulation objects.
Definition cvisitor.h:57
cSimulation * getSimulation()
Returns the currently active simulation, or nullptr if there is none.
Definition csimulation.h:623
cEnvir * getEnvir()
Returns the environment object for the currently active simulation. This function never returns nullp...
Definition csimulation.h:631
int64_t eventnumber_t
Sequence number of events during the simulation. Events are numbered from one. (Event number zero is ...
Definition simkerneldefs.h:78
const simtime_t & simtime_t_cref
Constant reference to a simtime_t.
Definition simtime_t.h:48
Generated on for API by