QuISP
Loading...
Searching...
No Matches
quisp_test::env::StaticEnv Class Reference

cEnvir implementation for unit testing based on OMNeT++'s StaticEnv. More...

#include <StaticEnv.h>

Inheritance diagram for quisp_test::env::StaticEnv:
Collaboration diagram for quisp_test::env::StaticEnv:

Public Member Functions

 StaticEnv ()
 
 ~StaticEnv ()
 
void objectDeleted (cObject *object) override
 
void simulationEvent (cEvent *event) override
 
void messageScheduled (cMessage *msg) override
 
void messageCancelled (cMessage *msg) override
 
void beginSend (cMessage *msg, const omnetpp::SendOptions &options) override
 
void messageSendDirect (cMessage *msg, cGate *toGate, const omnetpp::ChannelResult &result) override
 
void messageSendHop (cMessage *msg, cGate *srcGate) override
 
void messageSendHop (cMessage *msg, cGate *srcGate, const omnetpp::ChannelResult &result) override
 
void endSend (cMessage *msg) override
 
void messageCreated (cMessage *msg) override
 
void messageCloned (cMessage *msg, cMessage *clone) override
 
void messageDeleted (cMessage *msg) override
 
void moduleReparented (cModule *module, cModule *oldparent, int oldId) override
 
void componentMethodBegin (cComponent *from, cComponent *to, const char *methodFmt, va_list va, bool silent) override
 
void componentMethodEnd () override
 
void moduleCreated (cModule *newmodule) override
 
void moduleDeleted (cModule *module) override
 
void gateCreated (cGate *newgate) override
 
void gateDeleted (cGate *gate) override
 
void connectionCreated (cGate *srcgate) override
 
void connectionDeleted (cGate *srcgate) override
 
void displayStringChanged (cComponent *component) override
 
void undisposedObject (cObject *obj) override
 
void log (cLogEntry *entry) override
 
void preconfigure (cComponent *component) override
 
void configure (cComponent *component) override
 
void readParameter (cPar *parameter) override
 
bool isModuleLocal (cModule *parentmod, const char *modname, int index) override
 
cXMLElement * getXMLDocument (const char *filename, const char *xpath=nullptr) override
 
cXMLElement * getParsedXMLString (const char *content, const char *xpath=nullptr) override
 
void forgetXMLDocument (const char *filename) override
 
void forgetParsedXMLString (const char *content) override
 
void flushXMLDocumentCache () override
 
void flushXMLParsedContentCache () override
 
unsigned getExtraStackForEnvir () const override
 
cConfiguration * getConfig () override
 
std::string resolveResourcePath (const char *fileName, cComponentType *context) override
 
bool isGUI () const override
 
bool isExpressMode () const override
 
void bubble (cComponent *component, const char *text) override
 
std::string gets (const char *prompt, const char *defaultreply=nullptr) override
 
cEnvir & flush ()
 
int getNumRNGs () const override
 
cRNG * getRNG (int k) override
 
void * registerOutputVector (const char *modulename, const char *vectorname) override
 
void deregisterOutputVector (void *vechandle) override
 
void setVectorAttribute (void *vechandle, const char *name, const char *value) override
 
bool recordInOutputVector (void *vechandle, simtime_t t, double value) override
 
void recordScalar (cComponent *component, const char *name, double value, opp_string_map *attributes=nullptr) override
 
void recordStatistic (cComponent *component, const char *name, cStatistic *statistic, opp_string_map *attributes=nullptr) override
 
void addResultRecorders (cComponent *component, simsignal_t signal, const char *statisticName, cProperty *statisticTemplateProperty) override
 
virtual std::ostream * getStreamForSnapshot () override
 
void releaseStreamForSnapshot (std::ostream *os) override
 
int getArgCount () const override
 
char ** getArgVector () const override
 
int getParsimProcId () const override
 
int getParsimNumPartitions () const override
 
unsigned long getUniqueNumber () override
 
bool idle () override
 
void refOsgNode (osg::Node *scene) override
 
void unrefOsgNode (osg::Node *scene) override
 
bool ensureDebugger (cRuntimeError *) override
 
void getImageSize (const char *imageName, double &outWidth, double &outHeight) override
 
void getTextExtent (const cFigure::Font &font, const char *text, double &outWidth, double &outHeight, double &outAscent) override
 
void appendToImagePath (const char *directory) override
 
void loadImage (const char *fileName, const char *imageName=nullptr) override
 
cFigure::Rectangle getSubmoduleBounds (const cModule *submodule) override
 
double getZoomLevel (const cModule *module) override
 
double getAnimationTime () const override
 
double getAnimationSpeed () const override
 
double getRemainingAnimationHoldTime () const override
 
void addLifecycleListener (cISimulationLifecycleListener *listener) override
 
void removeLifecycleListener (cISimulationLifecycleListener *listener) override
 
void notifyLifecycleListeners (SimulationLifecycleEventType eventType, cObject *details) override
 
std::vector< cFigure::Point > getConnectionLine (const cGate *sourceGate) override
 
void recordParameter (cPar *par) override
 
void recordComponentType (cComponent *component) override
 
void pausePoint () override
 
cSimulation * newSimulation ()
 delete current simulation and then setup new simulation
 
void resetSimulation ()
 delete all cObjects in cSimulation::defaultList.
 

Public Attributes

cRNG * rng = nullptr
 
cConfiguration * config = nullptr
 

Protected Member Functions

void unsupported () const
 
void alert (const char *msg) override
 
bool askYesNo (const char *msg) override
 

Detailed Description

Constructor & Destructor Documentation

◆ StaticEnv()

quisp_test::env::StaticEnv::StaticEnv ( )

◆ ~StaticEnv()

quisp_test::env::StaticEnv::~StaticEnv ( )
inline

Member Function Documentation

◆ addLifecycleListener()

void quisp_test::env::StaticEnv::addLifecycleListener ( cISimulationLifecycleListener * listener)
inlineoverride

◆ addResultRecorders()

void quisp_test::env::StaticEnv::addResultRecorders ( cComponent * component,
simsignal_t signal,
const char * statisticName,
cProperty * statisticTemplateProperty )
inlineoverride

◆ alert()

void quisp_test::env::StaticEnv::alert ( const char * msg)
inlineoverrideprotected

◆ appendToImagePath()

void quisp_test::env::StaticEnv::appendToImagePath ( const char * directory)
inlineoverride

◆ askYesNo()

bool quisp_test::env::StaticEnv::askYesNo ( const char * msg)
inlineoverrideprotected

◆ beginSend()

void quisp_test::env::StaticEnv::beginSend ( cMessage * msg,
const omnetpp::SendOptions & options )
inlineoverride

◆ bubble()

void quisp_test::env::StaticEnv::bubble ( cComponent * component,
const char * text )
inlineoverride

◆ componentMethodBegin()

void quisp_test::env::StaticEnv::componentMethodBegin ( cComponent * from,
cComponent * to,
const char * methodFmt,
va_list va,
bool silent )
inlineoverride

◆ componentMethodEnd()

void quisp_test::env::StaticEnv::componentMethodEnd ( )
inlineoverride

◆ configure()

void quisp_test::env::StaticEnv::configure ( cComponent * component)
inlineoverride

◆ connectionCreated()

void quisp_test::env::StaticEnv::connectionCreated ( cGate * srcgate)
inlineoverride

◆ connectionDeleted()

void quisp_test::env::StaticEnv::connectionDeleted ( cGate * srcgate)
inlineoverride

◆ deregisterOutputVector()

void quisp_test::env::StaticEnv::deregisterOutputVector ( void * vechandle)
inlineoverride

◆ displayStringChanged()

void quisp_test::env::StaticEnv::displayStringChanged ( cComponent * component)
inlineoverride

◆ endSend()

void quisp_test::env::StaticEnv::endSend ( cMessage * msg)
inlineoverride

◆ ensureDebugger()

bool quisp_test::env::StaticEnv::ensureDebugger ( cRuntimeError * )
inlineoverride

◆ flush()

cEnvir & quisp_test::env::StaticEnv::flush ( )
inline

◆ flushXMLDocumentCache()

void quisp_test::env::StaticEnv::flushXMLDocumentCache ( )
inlineoverride

◆ flushXMLParsedContentCache()

void quisp_test::env::StaticEnv::flushXMLParsedContentCache ( )
inlineoverride

◆ forgetParsedXMLString()

void quisp_test::env::StaticEnv::forgetParsedXMLString ( const char * content)
inlineoverride

◆ forgetXMLDocument()

void quisp_test::env::StaticEnv::forgetXMLDocument ( const char * filename)
inlineoverride

◆ gateCreated()

void quisp_test::env::StaticEnv::gateCreated ( cGate * newgate)
inlineoverride

◆ gateDeleted()

void quisp_test::env::StaticEnv::gateDeleted ( cGate * gate)
inlineoverride

◆ getAnimationSpeed()

double quisp_test::env::StaticEnv::getAnimationSpeed ( ) const
inlineoverride

◆ getAnimationTime()

double quisp_test::env::StaticEnv::getAnimationTime ( ) const
inlineoverride

◆ getArgCount()

int quisp_test::env::StaticEnv::getArgCount ( ) const
inlineoverride

◆ getArgVector()

char ** quisp_test::env::StaticEnv::getArgVector ( ) const
inlineoverride

◆ getConfig()

cConfiguration * quisp_test::env::StaticEnv::getConfig ( )
override

◆ getConnectionLine()

std::vector< cFigure::Point > quisp_test::env::StaticEnv::getConnectionLine ( const cGate * sourceGate)
inlineoverride

◆ getExtraStackForEnvir()

unsigned quisp_test::env::StaticEnv::getExtraStackForEnvir ( ) const
inlineoverride

◆ getImageSize()

void quisp_test::env::StaticEnv::getImageSize ( const char * imageName,
double & outWidth,
double & outHeight )
inlineoverride

◆ getNumRNGs()

int quisp_test::env::StaticEnv::getNumRNGs ( ) const
inlineoverride

◆ getParsedXMLString()

cXMLElement * quisp_test::env::StaticEnv::getParsedXMLString ( const char * content,
const char * xpath = nullptr )
inlineoverride

◆ getParsimNumPartitions()

int quisp_test::env::StaticEnv::getParsimNumPartitions ( ) const
inlineoverride

◆ getParsimProcId()

int quisp_test::env::StaticEnv::getParsimProcId ( ) const
inlineoverride

◆ getRemainingAnimationHoldTime()

double quisp_test::env::StaticEnv::getRemainingAnimationHoldTime ( ) const
inlineoverride

◆ getRNG()

cRNG * quisp_test::env::StaticEnv::getRNG ( int k)
override

◆ gets()

std::string quisp_test::env::StaticEnv::gets ( const char * prompt,
const char * defaultreply = nullptr )
override

◆ getStreamForSnapshot()

virtual std::ostream * quisp_test::env::StaticEnv::getStreamForSnapshot ( )
inlineoverridevirtual

◆ getSubmoduleBounds()

cFigure::Rectangle quisp_test::env::StaticEnv::getSubmoduleBounds ( const cModule * submodule)
inlineoverride

◆ getTextExtent()

void quisp_test::env::StaticEnv::getTextExtent ( const cFigure::Font & font,
const char * text,
double & outWidth,
double & outHeight,
double & outAscent )
inlineoverride

◆ getUniqueNumber()

unsigned long quisp_test::env::StaticEnv::getUniqueNumber ( )
inlineoverride

◆ getXMLDocument()

cXMLElement * quisp_test::env::StaticEnv::getXMLDocument ( const char * filename,
const char * xpath = nullptr )
inlineoverride

◆ getZoomLevel()

double quisp_test::env::StaticEnv::getZoomLevel ( const cModule * module)
inlineoverride

◆ idle()

bool quisp_test::env::StaticEnv::idle ( )
inlineoverride

◆ isExpressMode()

bool quisp_test::env::StaticEnv::isExpressMode ( ) const
inlineoverride

◆ isGUI()

bool quisp_test::env::StaticEnv::isGUI ( ) const
inlineoverride

◆ isModuleLocal()

bool quisp_test::env::StaticEnv::isModuleLocal ( cModule * parentmod,
const char * modname,
int index )
inlineoverride

◆ loadImage()

void quisp_test::env::StaticEnv::loadImage ( const char * fileName,
const char * imageName = nullptr )
inlineoverride

◆ log()

void quisp_test::env::StaticEnv::log ( cLogEntry * entry)
inlineoverride

◆ messageCancelled()

void quisp_test::env::StaticEnv::messageCancelled ( cMessage * msg)
inlineoverride

◆ messageCloned()

void quisp_test::env::StaticEnv::messageCloned ( cMessage * msg,
cMessage * clone )
inlineoverride

◆ messageCreated()

void quisp_test::env::StaticEnv::messageCreated ( cMessage * msg)
inlineoverride

◆ messageDeleted()

void quisp_test::env::StaticEnv::messageDeleted ( cMessage * msg)
inlineoverride

◆ messageScheduled()

void quisp_test::env::StaticEnv::messageScheduled ( cMessage * msg)
inlineoverride

◆ messageSendDirect()

void quisp_test::env::StaticEnv::messageSendDirect ( cMessage * msg,
cGate * toGate,
const omnetpp::ChannelResult & result )
inlineoverride

◆ messageSendHop() [1/2]

void quisp_test::env::StaticEnv::messageSendHop ( cMessage * msg,
cGate * srcGate )
inlineoverride

◆ messageSendHop() [2/2]

void quisp_test::env::StaticEnv::messageSendHop ( cMessage * msg,
cGate * srcGate,
const omnetpp::ChannelResult & result )
inlineoverride

◆ moduleCreated()

void quisp_test::env::StaticEnv::moduleCreated ( cModule * newmodule)
inlineoverride

◆ moduleDeleted()

void quisp_test::env::StaticEnv::moduleDeleted ( cModule * module)
inlineoverride

◆ moduleReparented()

void quisp_test::env::StaticEnv::moduleReparented ( cModule * module,
cModule * oldparent,
int oldId )
inlineoverride

◆ newSimulation()

cSimulation * quisp_test::env::StaticEnv::newSimulation ( )

delete current simulation and then setup new simulation

◆ notifyLifecycleListeners()

void quisp_test::env::StaticEnv::notifyLifecycleListeners ( SimulationLifecycleEventType eventType,
cObject * details )
inlineoverride

◆ objectDeleted()

void quisp_test::env::StaticEnv::objectDeleted ( cObject * object)
inlineoverride

◆ pausePoint()

void quisp_test::env::StaticEnv::pausePoint ( )
inlineoverride

◆ preconfigure()

void quisp_test::env::StaticEnv::preconfigure ( cComponent * component)
inlineoverride

◆ readParameter()

void quisp_test::env::StaticEnv::readParameter ( cPar * parameter)
inlineoverride

◆ recordComponentType()

void quisp_test::env::StaticEnv::recordComponentType ( cComponent * component)
inlineoverride

◆ recordInOutputVector()

bool quisp_test::env::StaticEnv::recordInOutputVector ( void * vechandle,
simtime_t t,
double value )
inlineoverride

◆ recordParameter()

void quisp_test::env::StaticEnv::recordParameter ( cPar * par)
inlineoverride

◆ recordScalar()

void quisp_test::env::StaticEnv::recordScalar ( cComponent * component,
const char * name,
double value,
opp_string_map * attributes = nullptr )
inlineoverride

◆ recordStatistic()

void quisp_test::env::StaticEnv::recordStatistic ( cComponent * component,
const char * name,
cStatistic * statistic,
opp_string_map * attributes = nullptr )
inlineoverride

◆ refOsgNode()

void quisp_test::env::StaticEnv::refOsgNode ( osg::Node * scene)
inlineoverride

◆ registerOutputVector()

void * quisp_test::env::StaticEnv::registerOutputVector ( const char * modulename,
const char * vectorname )
inlineoverride

◆ releaseStreamForSnapshot()

void quisp_test::env::StaticEnv::releaseStreamForSnapshot ( std::ostream * os)
inlineoverride

◆ removeLifecycleListener()

void quisp_test::env::StaticEnv::removeLifecycleListener ( cISimulationLifecycleListener * listener)
inlineoverride

◆ resetSimulation()

void quisp_test::env::StaticEnv::resetSimulation ( )

delete all cObjects in cSimulation::defaultList.

◆ resolveResourcePath()

std::string quisp_test::env::StaticEnv::resolveResourcePath ( const char * fileName,
cComponentType * context )
inlineoverride

◆ setVectorAttribute()

void quisp_test::env::StaticEnv::setVectorAttribute ( void * vechandle,
const char * name,
const char * value )
inlineoverride

◆ simulationEvent()

void quisp_test::env::StaticEnv::simulationEvent ( cEvent * event)
inlineoverride

◆ undisposedObject()

void quisp_test::env::StaticEnv::undisposedObject ( cObject * obj)
override

◆ unrefOsgNode()

void quisp_test::env::StaticEnv::unrefOsgNode ( osg::Node * scene)
inlineoverride

◆ unsupported()

void quisp_test::env::StaticEnv::unsupported ( ) const
inlineprotected

Member Data Documentation

◆ config

cConfiguration* quisp_test::env::StaticEnv::config = nullptr

◆ rng

cRNG* quisp_test::env::StaticEnv::rng = nullptr

The documentation for this class was generated from the following files: