All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
openfluid::ware::SimulationDrivenWare Class Reference

#include <ware/SimulationDrivenWare.hpp>

Inheritance diagram for openfluid::ware::SimulationDrivenWare:
openfluid::ware::PluggableWare openfluid::ware::SimulationInspectorWare openfluid::ware::PluggableObserver openfluid::ware::SimulationContributorWare openfluid::ware::PluggableSimulator openfluid::machine::Generator openfluid::machine::FixedGenerator openfluid::machine::InjectGenerator openfluid::machine::InterpGenerator openfluid::machine::RandomGenerator

Public Member Functions

virtual ~SimulationDrivenWare ()
 
void linkToSimulation (const openfluid::base::SimulationStatus *SimStatus)
 
void linkToSimulationLogger (openfluid::base::SimulationLogger *SimLogger)
 
void initializeWare (const WareID_t &ID)
 
void finalizeWare ()
 
void setPreviousTimeIndex (const openfluid::core::TimeIndex_t &TimeIndex)
 
- Public Member Functions inherited from openfluid::ware::PluggableWare
virtual ~PluggableWare ()
 
void linkToRunEnvironment (const openfluid::base::EnvironmentProperties *Env)
 

Protected Member Functions

virtual bool isLinked () const
 
openfluid::core::DateTime OPENFLUID_GetBeginDate () const
 
openfluid::core::DateTime OPENFLUID_GetEndDate () const
 
openfluid::core::DateTime OPENFLUID_GetCurrentDate () const
 
openfluid::core::Duration_t OPENFLUID_GetSimulationDuration () const
 
openfluid::core::Duration_t OPENFLUID_GetDefaultDeltaT () const
 
openfluid::core::TimeIndex_t OPENFLUID_GetCurrentTimeIndex () const
 
openfluid::core::TimeIndex_t OPENFLUID_GetPreviousRunTimeIndex () const
 
openfluid::base::SimulationStatus::SimulationStage OPENFLUID_GetCurrentStage () const
 
openfluid::base::SimulationStatus::SchedulingConstraint OPENFLUID_GetSchedulingConstraint () const
 
virtual void OPENFLUID_RaiseWarning (const std::string &Msg)
 
virtual void OPENFLUID_RaiseWarning (const std::string &Source, const std::string &Msg)
 
virtual void OPENFLUID_RaiseError (const std::string &Msg)
 
virtual void OPENFLUID_RaiseError (const std::string &Source, const std::string &Msg)
 
 SimulationDrivenWare (WareType WType)
 
- Protected Member Functions inherited from openfluid::ware::PluggableWare
bool OPENFLUID_GetRunEnvironment (std::string Key, std::string &Val)
 
bool OPENFLUID_GetRunEnvironment (std::string Key, bool &Val)
 
WareID_t OPENFLUID_GetWareID () const
 
 PluggableWare (WareType WType)
 

Protected Attributes

openfluid::base::SimulationLoggermp_SimLogger
 
openfluid::base::StdoutAndFileOutputStream OPENFLUID_Logger
 
- Protected Attributes inherited from openfluid::ware::PluggableWare
bool m_Initialized
 
WareType m_WareType
 

Additional Inherited Members

- Public Types inherited from openfluid::ware::PluggableWare
enum  WareType { UNDEFINED, OBSERVER, SIMULATOR, OTHER }
 
- Static Public Member Functions inherited from openfluid::ware::PluggableWare
static bool isWellFormated (const openfluid::ware::WareParamKey_t &ParameterKey)
 
static boost::property_tree::ptree getParamsAsPropertyTree (const WareParams_t &Params)
 

Constructor & Destructor Documentation

openfluid::ware::SimulationDrivenWare::SimulationDrivenWare ( WareType  WType)
inlineprotected
virtual openfluid::ware::SimulationDrivenWare::~SimulationDrivenWare ( )
inlinevirtual

Member Function Documentation

void openfluid::ware::SimulationDrivenWare::finalizeWare ( )
virtual

Reimplemented from openfluid::ware::PluggableWare.

void openfluid::ware::SimulationDrivenWare::initializeWare ( const WareID_t ID)
virtual

Reimplemented from openfluid::ware::PluggableWare.

virtual bool openfluid::ware::SimulationDrivenWare::isLinked ( ) const
inlineprotectedvirtual
void openfluid::ware::SimulationDrivenWare::linkToSimulation ( const openfluid::base::SimulationStatus SimStatus)
void openfluid::ware::SimulationDrivenWare::linkToSimulationLogger ( openfluid::base::SimulationLogger SimLogger)
inline
openfluid::core::DateTime openfluid::ware::SimulationDrivenWare::OPENFLUID_GetBeginDate ( ) const
protected

Returns the real beginning date of the simulated period

Returns
the date
openfluid::core::DateTime openfluid::ware::SimulationDrivenWare::OPENFLUID_GetCurrentDate ( ) const
protected

Returns the current real date corresponding to the current time index

Returns
the date
openfluid::base::SimulationStatus::SimulationStage openfluid::ware::SimulationDrivenWare::OPENFLUID_GetCurrentStage ( ) const
protected

Returns the current stage of the simulation

Returns
the stage
openfluid::core::TimeIndex_t openfluid::ware::SimulationDrivenWare::OPENFLUID_GetCurrentTimeIndex ( ) const
protected

Returns the current time index of the simulation, in seconds since the simulation started. When the simulation starts, the time index is equal to zero.

Returns
the current time index in seconds
openfluid::core::Duration_t openfluid::ware::SimulationDrivenWare::OPENFLUID_GetDefaultDeltaT ( ) const
protected

Returns the default DeltaT used by the scheduler

Returns
the deltaT in seconds
openfluid::core::DateTime openfluid::ware::SimulationDrivenWare::OPENFLUID_GetEndDate ( ) const
protected

Returns the real ending date of the simulated period

Returns
the date
openfluid::core::TimeIndex_t openfluid::ware::SimulationDrivenWare::OPENFLUID_GetPreviousRunTimeIndex ( ) const
protected

Returns the time index of the simulation when the plugged ware was previously run

Returns
the time index in seconds
openfluid::base::SimulationStatus::SchedulingConstraint openfluid::ware::SimulationDrivenWare::OPENFLUID_GetSchedulingConstraint ( ) const
protected

Returns the scheduling constraint applied to the simulation (may be NONE)

Returns
the constraint type
openfluid::core::Duration_t openfluid::ware::SimulationDrivenWare::OPENFLUID_GetSimulationDuration ( ) const
protected

Returns the simulation duration in seconds

Returns
the duration in seconds
virtual void openfluid::ware::SimulationDrivenWare::OPENFLUID_RaiseError ( const std::string &  Msg)
protectedvirtual

Raises an error message to the kernel. This stops the simulation the next time the kernel has the control

Parameters
[in]Msgthe content of the message

Reimplemented from openfluid::ware::PluggableWare.

virtual void openfluid::ware::SimulationDrivenWare::OPENFLUID_RaiseError ( const std::string &  Source,
const std::string &  Msg 
)
protectedvirtual

Raises an error message to the kernel. This stops the simulation the next time the kernel has the control

Parameters
[in]Sourcethe source of the message
[in]Msgthe content of the message
virtual void openfluid::ware::SimulationDrivenWare::OPENFLUID_RaiseWarning ( const std::string &  Msg)
protectedvirtual

Raises a time-marked warning message to the kernel. This do not stops the simulation

Parameters
[in]Msgthe content of the message
virtual void openfluid::ware::SimulationDrivenWare::OPENFLUID_RaiseWarning ( const std::string &  Source,
const std::string &  Msg 
)
protectedvirtual

Raises a time-marked warning message to the kernel. This do not stops the simulation

Parameters
[in]Sourcethe source of the message
[in]Msgthe content of the message
void openfluid::ware::SimulationDrivenWare::setPreviousTimeIndex ( const openfluid::core::TimeIndex_t TimeIndex)
inline

Member Data Documentation

openfluid::base::SimulationLogger* openfluid::ware::SimulationDrivenWare::mp_SimLogger
protected

Pointer to the execution messages repository

openfluid::base::StdoutAndFileOutputStream openfluid::ware::SimulationDrivenWare::OPENFLUID_Logger
protected

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