OMSimulatorLib
The OMSimulator project is a FMI-based co-simulation environment that supports ordinary (i.e., non-delayed) and TLM connections.
|
#include <Values.h>
Classes | |
struct | unitDefinitionsToExport |
Public Member Functions | |
Values () | |
~Values () | |
oms_status_enu_t | setBoolean (const ComRef &cref, bool value) |
oms_status_enu_t | setInteger (const ComRef &cref, int value) |
oms_status_enu_t | setReal (const ComRef &cref, double value) |
oms_status_enu_t | setString (const ComRef &cref, const std::string &value) |
oms_status_enu_t | setUnit (const ComRef &cref, const std::string &value) |
void | setUnitDefinitions (const ComRef &cref) |
void | getFilteredUnitDefinitionsToSSD (std::map< std::string, std::map< std::string, std::string >> &unitDefinitions) |
void | getFilteredEnumerationDefinitionsToSSD (std::map< std::string, std::map< std::string, std::string >> &enumerationDefinitions) |
void | updateModelDescriptionRealStartValue (const ComRef &cref, double value) |
void | updateModelDescriptionIntegerStartValue (const ComRef &cref, int value) |
void | updateModelDescriptionBooleanStartValue (const ComRef &cref, bool value) |
void | updateModelDescriptionStringStartValue (const ComRef &cref, std::string value) |
void | updateModelDescriptionVariableUnit (const ComRef &cref, const std::string &value) |
void | copyModelDescriptionUnitToResources (Values &value) |
oms_status_enu_t | getBoolean (const ComRef &cref, bool &value) |
oms_status_enu_t | getInteger (const ComRef &cref, int &value) |
oms_status_enu_t | getReal (const ComRef &cref, double &value) |
oms_status_enu_t | getString (const ComRef &cref, std::string &value) |
oms_status_enu_t | setBooleanResources (const ComRef &cref, bool value, const ComRef &fullCref, bool externalInput, oms_modelState_enu_t modelState) |
oms_status_enu_t | setIntegerResources (const ComRef &cref, int value, const ComRef &fullCref, bool externalInput, oms_modelState_enu_t modelState) |
oms_status_enu_t | setRealResources (const ComRef &cref, double value, const ComRef &fullCref, bool externalInput, oms_modelState_enu_t modelState) |
oms_status_enu_t | setStringResources (const ComRef &cref, const std::string &value, const ComRef &fullCref, bool externalInput, oms_modelState_enu_t modelState) |
oms_status_enu_t | setUnitResources (const ComRef &cref, const std::string &value, const ComRef &fullCref) |
oms_status_enu_t | getBooleanResources (const ComRef &cref, bool &value, bool externalInput, oms_modelState_enu_t modelState) |
oms_status_enu_t | getIntegerResources (const ComRef &cref, int &value, bool externalInput, oms_modelState_enu_t modelState) |
oms_status_enu_t | getRealResources (const ComRef &cref, double &value, bool externalInput, oms_modelState_enu_t modelState) |
oms_status_enu_t | getStringResources (const ComRef &cref, std::string &value, bool externalInput, oms_modelState_enu_t modelState) |
oms_status_enu_t | getBooleanFromModeldescription (const ComRef &cref, bool &value) |
oms_status_enu_t | getIntegerFromModeldescription (const ComRef &cref, int &value) |
oms_status_enu_t | getRealFromModeldescription (const ComRef &cref, double &value) |
oms_status_enu_t | getStringFromModeldescription (const ComRef &cref, std::string &value) |
std::string | getUnit (ComRef &cref) const |
std::string | getUnitFromModeldescription (ComRef &cref) const |
std::string | getEnumerationTypeFromModeldescription (ComRef &cref) const |
oms_status_enu_t | exportToSSD (pugi::xml_node &node) const |
oms_status_enu_t | importFromSnapshot (const pugi::xml_node &node, const std::string &sspVersion, const Snapshot &snapshot, std::string variantName) |
oms_status_enu_t | importFromSnapshot (const Snapshot &snapshot, const std::string &ssvFilePath, const std::string &ssmFilename) |
oms_status_enu_t | deleteStartValue (const ComRef &cref) |
oms_status_enu_t | updateOrDeleteStartValueInReplacedComponent (Values &value, const ComRef &owner, std::vector< std::string > &warningList) |
oms_status_enu_t | deleteStartValueInResources (const ComRef &cref) |
oms_status_enu_t | deleteReferencesInSSD (const std::string &filename) |
oms_status_enu_t | deleteResourcesInSSP (const std::string &filename) |
oms_status_enu_t | exportToSSV (pugi::xml_node &ssvNode) const |
oms_status_enu_t | exportUnitDefinitions (Snapshot &snapshot, std::string filename, std::string variantName) const |
oms_status_enu_t | exportUnitDefinitionsToSSVTemplate (Snapshot &snapshot, std::string filename) |
void | importUnitDefinitions (const pugi::xml_node &node) |
void | importEnumerationDefinitions (const pugi::xml_node &node, std::string &enumTypeName) |
void | exportToSSVTemplate (pugi::xml_node &ssvNode, const ComRef &cref) |
start values read from modelDescription.xml and creates a ssv template More... | |
void | exportReduceSSV (pugi::xml_node &ssvNode, const ComRef &cref) |
reduced SSV file which contains only the referenced crefs in parametermapping More... | |
oms_status_enu_t | exportToSSMTemplate (pugi::xml_node &ssmNode, const ComRef &cref) |
start values read from modelDescription.xml and creates a ssm template More... | |
oms_status_enu_t | parseModelDescription (const filesystem::path &root, std::string &guid_) |
path without the filename, i.e. modelDescription.xml More... | |
oms_status_enu_t | rename (const oms::ComRef &oldCref, const oms::ComRef &newCref) |
oms_status_enu_t | renameInResources (const oms::ComRef &oldCref, const oms::ComRef &newCref) |
void | exportParameterBindings (pugi::xml_node &node, Snapshot &snapshot, std::string variantName) const |
bool | hasResources () |
returns if the system or subsystem or submodule have parameter resources either as ssv or inline More... | |
Public Attributes | |
std::map< ComRef, bool > | booleanStartValues |
parameters and start values defined before instantiating the FMU More... | |
std::map< ComRef, double > | realStartValues |
parameters and start values defined before instantiating the FMU More... | |
std::map< ComRef, int > | integerStartValues |
parameters and start values defined before instantiating the FMU More... | |
std::map< ComRef, std::string > | stringStartValues |
parameters and start values defined before instantiating the FMU More... | |
std::map< ComRef, bool > | booleanValues |
input values defined after initialization More... | |
std::map< ComRef, double > | realValues |
input values defined after initialization More... | |
std::map< ComRef, int > | integerValues |
input values defined after initialization More... | |
std::map< ComRef, std::string > | stringValues |
input values defined after initialization More... | |
std::map< ComRef, bool > | modelDescriptionBooleanStartValues |
start values read from modelDescription.xml More... | |
std::map< ComRef, double > | modelDescriptionRealStartValues |
start values read from modelDescription.xml More... | |
std::map< ComRef, int > | modelDescriptionIntegerStartValues |
start values read from modelDescription.xml More... | |
std::map< ComRef, std::string > | modelDescriptionStringStartValues |
start values read from modelDescription.xml More... | |
std::map< int, std::vector< int > > | modelStructureOutputs |
output and its dependencies from <ModelStructure> More... | |
std::map< int, std::vector< int > > | modelStructureDerivatives |
derivatives and its dependencies from <ModelStructure> More... | |
std::map< int, std::vector< int > > | modelStructureInitialUnknowns |
initialUnknowns and its dependencies from <ModelStructure> More... | |
std::map< int, bool > | modelStructureOutputDependencyExist |
std::map< int, bool > | modelStructureDerivativesDependencyExist |
std::map< int, bool > | modelStructureInitialUnknownsDependencyExist |
std::map< ComRef, std::string > | modelDescriptionVariableUnits |
variable units read from modeldescription.xml More... | |
std::map< ComRef, std::string > | variableUnits |
variable units set by user More... | |
std::vector< unitDefinitionsToExport > | unitDefinitionsToExportInSSP |
list of unitDefinitions to be exported in ssp More... | |
std::map< std::string, std::map< std::string, std::string > > | modeldescriptionUnitDefinitions |
<UnitDefinitions> list read from modeldescription.xml More... | |
std::map< std::string, std::map< std::string, std::string > > | modeldescriptionTypeDefinitions |
<TypeDefinitions> list read from modeldescription.xml More... | |
std::map< std::string, std::string > | modeldescriptionEnumeration |
enumeration declared type list list read from modeldescription.xml More... | |
std::multimap< ComRef, ComRef > | mappedEntry |
parameter names and values provided in the parameter source are to be mapped to the parameters of the component or system More... | |
std::vector< Values > | parameterResources |
list of parameter resources provided inline or .ssv files More... | |
std::map< std::string, Values > | allresources |
mapped resources either inline or ssv More... | |
std::string | ssmFile = "" |
mapped ssm files associated with ssv files; More... | |
bool | linkResources = true |
Private Member Functions | |
oms_status_enu_t | exportStartValuesHelper (pugi::xml_node &node) const |
void | exportParameterMappingInline (pugi::xml_node &node) const |
void | exportParameterMappingToSSM (pugi::xml_node &node) const |
oms_status_enu_t | importStartValuesHelper (const pugi::xml_node ¶meters) |
void | parseModelStructureDependencies (std::string &dependencies, std::vector< int > &dependencyList) |
void | importParameterMapping (const pugi::xml_node ¶meterMapping) |
oms::ComRef | getMappedCrefEntry (const ComRef &cref) const |
bool | isEntryReferencedInSSM (const ComRef &cref) const |
bool | empty () const |
oms::Values::Values | ( | ) |
oms::Values::~Values | ( | ) |
void oms::Values::copyModelDescriptionUnitToResources | ( | Values & | value | ) |
oms_status_enu_t oms::Values::deleteReferencesInSSD | ( | const std::string & | filename | ) |
oms_status_enu_t oms::Values::deleteResourcesInSSP | ( | const std::string & | filename | ) |
oms_status_enu_t oms::Values::deleteStartValue | ( | const ComRef & | cref | ) |
oms_status_enu_t oms::Values::deleteStartValueInResources | ( | const ComRef & | cref | ) |
|
private |
void oms::Values::exportParameterBindings | ( | pugi::xml_node & | node, |
Snapshot & | snapshot, | ||
std::string | variantName | ||
) | const |
|
private |
|
private |
void oms::Values::exportReduceSSV | ( | pugi::xml_node & | ssvNode, |
const ComRef & | cref | ||
) |
reduced SSV file which contains only the referenced crefs in parametermapping
|
private |
oms_status_enu_t oms::Values::exportToSSD | ( | pugi::xml_node & | node | ) | const |
oms_status_enu_t oms::Values::exportToSSMTemplate | ( | pugi::xml_node & | ssmNode, |
const ComRef & | cref | ||
) |
start values read from modelDescription.xml and creates a ssm template
oms_status_enu_t oms::Values::exportToSSV | ( | pugi::xml_node & | ssvNode | ) | const |
void oms::Values::exportToSSVTemplate | ( | pugi::xml_node & | ssvNode, |
const ComRef & | cref | ||
) |
start values read from modelDescription.xml and creates a ssv template
oms_status_enu_t oms::Values::exportUnitDefinitions | ( | Snapshot & | snapshot, |
std::string | filename, | ||
std::string | variantName | ||
) | const |
oms_status_enu_t oms::Values::exportUnitDefinitionsToSSVTemplate | ( | Snapshot & | snapshot, |
std::string | filename | ||
) |
oms_status_enu_t oms::Values::getBoolean | ( | const ComRef & | cref, |
bool & | value | ||
) |
oms_status_enu_t oms::Values::getBooleanFromModeldescription | ( | const ComRef & | cref, |
bool & | value | ||
) |
oms_status_enu_t oms::Values::getBooleanResources | ( | const ComRef & | cref, |
bool & | value, | ||
bool | externalInput, | ||
oms_modelState_enu_t | modelState | ||
) |
std::string oms::Values::getEnumerationTypeFromModeldescription | ( | ComRef & | cref | ) | const |
void oms::Values::getFilteredEnumerationDefinitionsToSSD | ( | std::map< std::string, std::map< std::string, std::string >> & | enumerationDefinitions | ) |
void oms::Values::getFilteredUnitDefinitionsToSSD | ( | std::map< std::string, std::map< std::string, std::string >> & | unitDefinitions | ) |
oms_status_enu_t oms::Values::getInteger | ( | const ComRef & | cref, |
int & | value | ||
) |
oms_status_enu_t oms::Values::getIntegerFromModeldescription | ( | const ComRef & | cref, |
int & | value | ||
) |
oms_status_enu_t oms::Values::getIntegerResources | ( | const ComRef & | cref, |
int & | value, | ||
bool | externalInput, | ||
oms_modelState_enu_t | modelState | ||
) |
|
private |
oms_status_enu_t oms::Values::getReal | ( | const ComRef & | cref, |
double & | value | ||
) |
oms_status_enu_t oms::Values::getRealFromModeldescription | ( | const ComRef & | cref, |
double & | value | ||
) |
oms_status_enu_t oms::Values::getRealResources | ( | const ComRef & | cref, |
double & | value, | ||
bool | externalInput, | ||
oms_modelState_enu_t | modelState | ||
) |
oms_status_enu_t oms::Values::getString | ( | const ComRef & | cref, |
std::string & | value | ||
) |
oms_status_enu_t oms::Values::getStringFromModeldescription | ( | const ComRef & | cref, |
std::string & | value | ||
) |
oms_status_enu_t oms::Values::getStringResources | ( | const ComRef & | cref, |
std::string & | value, | ||
bool | externalInput, | ||
oms_modelState_enu_t | modelState | ||
) |
std::string oms::Values::getUnit | ( | ComRef & | cref | ) | const |
std::string oms::Values::getUnitFromModeldescription | ( | ComRef & | cref | ) | const |
bool oms::Values::hasResources | ( | ) |
returns if the system or subsystem or submodule have parameter resources either as ssv or inline
void oms::Values::importEnumerationDefinitions | ( | const pugi::xml_node & | node, |
std::string & | enumTypeName | ||
) |
oms_status_enu_t oms::Values::importFromSnapshot | ( | const pugi::xml_node & | node, |
const std::string & | sspVersion, | ||
const Snapshot & | snapshot, | ||
std::string | variantName | ||
) |
oms_status_enu_t oms::Values::importFromSnapshot | ( | const Snapshot & | snapshot, |
const std::string & | ssvFilePath, | ||
const std::string & | ssmFilename | ||
) |
|
private |
|
private |
void oms::Values::importUnitDefinitions | ( | const pugi::xml_node & | node | ) |
|
private |
oms_status_enu_t oms::Values::parseModelDescription | ( | const filesystem::path & | root, |
std::string & | guid_ | ||
) |
path without the filename, i.e. modelDescription.xml
|
private |
oms_status_enu_t oms::Values::rename | ( | const oms::ComRef & | oldCref, |
const oms::ComRef & | newCref | ||
) |
oms_status_enu_t oms::Values::renameInResources | ( | const oms::ComRef & | oldCref, |
const oms::ComRef & | newCref | ||
) |
oms_status_enu_t oms::Values::setBoolean | ( | const ComRef & | cref, |
bool | value | ||
) |
oms_status_enu_t oms::Values::setBooleanResources | ( | const ComRef & | cref, |
bool | value, | ||
const ComRef & | fullCref, | ||
bool | externalInput, | ||
oms_modelState_enu_t | modelState | ||
) |
oms_status_enu_t oms::Values::setInteger | ( | const ComRef & | cref, |
int | value | ||
) |
oms_status_enu_t oms::Values::setIntegerResources | ( | const ComRef & | cref, |
int | value, | ||
const ComRef & | fullCref, | ||
bool | externalInput, | ||
oms_modelState_enu_t | modelState | ||
) |
oms_status_enu_t oms::Values::setReal | ( | const ComRef & | cref, |
double | value | ||
) |
oms_status_enu_t oms::Values::setRealResources | ( | const ComRef & | cref, |
double | value, | ||
const ComRef & | fullCref, | ||
bool | externalInput, | ||
oms_modelState_enu_t | modelState | ||
) |
oms_status_enu_t oms::Values::setString | ( | const ComRef & | cref, |
const std::string & | value | ||
) |
oms_status_enu_t oms::Values::setStringResources | ( | const ComRef & | cref, |
const std::string & | value, | ||
const ComRef & | fullCref, | ||
bool | externalInput, | ||
oms_modelState_enu_t | modelState | ||
) |
oms_status_enu_t oms::Values::setUnit | ( | const ComRef & | cref, |
const std::string & | value | ||
) |
void oms::Values::setUnitDefinitions | ( | const ComRef & | cref | ) |
oms_status_enu_t oms::Values::setUnitResources | ( | const ComRef & | cref, |
const std::string & | value, | ||
const ComRef & | fullCref | ||
) |
void oms::Values::updateModelDescriptionBooleanStartValue | ( | const ComRef & | cref, |
bool | value | ||
) |
void oms::Values::updateModelDescriptionIntegerStartValue | ( | const ComRef & | cref, |
int | value | ||
) |
void oms::Values::updateModelDescriptionRealStartValue | ( | const ComRef & | cref, |
double | value | ||
) |
void oms::Values::updateModelDescriptionStringStartValue | ( | const ComRef & | cref, |
std::string | value | ||
) |
void oms::Values::updateModelDescriptionVariableUnit | ( | const ComRef & | cref, |
const std::string & | value | ||
) |
oms_status_enu_t oms::Values::updateOrDeleteStartValueInReplacedComponent | ( | Values & | value, |
const ComRef & | owner, | ||
std::vector< std::string > & | warningList | ||
) |
std::map<std::string, Values> oms::Values::allresources |
mapped resources either inline or ssv
std::map<ComRef, bool> oms::Values::booleanStartValues |
parameters and start values defined before instantiating the FMU
std::map<ComRef, bool> oms::Values::booleanValues |
input values defined after initialization
std::map<ComRef, int> oms::Values::integerStartValues |
parameters and start values defined before instantiating the FMU
std::map<ComRef, int> oms::Values::integerValues |
input values defined after initialization
bool oms::Values::linkResources = true |
parameter names and values provided in the parameter source are to be mapped to the parameters of the component or system
std::map<ComRef, bool> oms::Values::modelDescriptionBooleanStartValues |
start values read from modelDescription.xml
std::map<std::string, std::string> oms::Values::modeldescriptionEnumeration |
enumeration declared type list list read from modeldescription.xml
std::map<ComRef, int> oms::Values::modelDescriptionIntegerStartValues |
start values read from modelDescription.xml
std::map<ComRef, double> oms::Values::modelDescriptionRealStartValues |
start values read from modelDescription.xml
std::map<ComRef, std::string> oms::Values::modelDescriptionStringStartValues |
start values read from modelDescription.xml
std::map<std::string, std::map<std::string, std::string> > oms::Values::modeldescriptionTypeDefinitions |
<TypeDefinitions> list read from modeldescription.xml
std::map<std::string, std::map<std::string, std::string> > oms::Values::modeldescriptionUnitDefinitions |
<UnitDefinitions> list read from modeldescription.xml
std::map<ComRef, std::string> oms::Values::modelDescriptionVariableUnits |
variable units read from modeldescription.xml
std::map<int, std::vector<int> > oms::Values::modelStructureDerivatives |
derivatives and its dependencies from <ModelStructure>
std::map<int, bool> oms::Values::modelStructureDerivativesDependencyExist |
std::map<int, std::vector<int> > oms::Values::modelStructureInitialUnknowns |
initialUnknowns and its dependencies from <ModelStructure>
std::map<int, bool> oms::Values::modelStructureInitialUnknownsDependencyExist |
std::map<int, bool> oms::Values::modelStructureOutputDependencyExist |
std::map<int, std::vector<int> > oms::Values::modelStructureOutputs |
output and its dependencies from <ModelStructure>
std::vector<Values> oms::Values::parameterResources |
list of parameter resources provided inline or .ssv files
std::map<ComRef, double> oms::Values::realStartValues |
parameters and start values defined before instantiating the FMU
std::map<ComRef, double> oms::Values::realValues |
input values defined after initialization
std::string oms::Values::ssmFile = "" |
mapped ssm files associated with ssv files;
std::map<ComRef, std::string> oms::Values::stringStartValues |
parameters and start values defined before instantiating the FMU
std::map<ComRef, std::string> oms::Values::stringValues |
input values defined after initialization
std::vector<unitDefinitionsToExport> oms::Values::unitDefinitionsToExportInSSP |
list of unitDefinitions to be exported in ssp
std::map<ComRef, std::string> oms::Values::variableUnits |
variable units set by user