32 #ifndef _OMS_COMPONENT_FMU_ME_H_
33 #define _OMS_COMPONENT_FMU_ME_H_
45 #include <pugixml.hpp>
47 #include <unordered_map>
61 oms_status_enu_t
exportToSSD(pugi::xml_node& node,
Snapshot& snapshot, std::string variantName)
const;
62 oms_status_enu_t
exportToSSV(pugi::xml_node& ssvNode);
70 oms_status_enu_t
reset();
81 oms_status_enu_t
getBoolean(
const fmi2ValueReference& vr,
bool& value);
83 oms_status_enu_t
getInteger(
const fmi2ValueReference& vr,
int& value);
85 oms_status_enu_t
getReal(
const fmi2ValueReference& vr,
double& value);
87 oms_status_enu_t
getString(
const fmi2ValueReference& vr, std::string& value);
93 oms_status_enu_t
setTime(
double time);
96 oms_status_enu_t
getDirectionalDerivativeHeper(
const int unknownIndex,
const int knownIndex,
const std::vector<int>& dependencyList,
double& value);
123 oms_status_enu_t
newResources(
const std::string& ssvFilename,
const std::string& ssmFilename,
bool externalResources);
ComRef - component reference.
Definition: ComRef.h:47
Definition: ComponentFMUME.h:53
oms_status_enu_t registerSignalsForResultFile(ResultWriter &resultFile)
Definition: ComponentFMUME.cpp:1730
const FMUInfo * getFMUInfo() const
Definition: ComponentFMUME.h:59
oms_status_enu_t deleteStartValue(const ComRef &cref)
Definition: ComponentFMUME.cpp:1511
~ComponentFMUME()
Definition: ComponentFMUME.cpp:53
oms_status_enu_t deleteReferencesInSSD(const std::string &filename)
Definition: ComponentFMUME.cpp:836
oms::ComRef getValidCref(ComRef cref)
Definition: ComponentFMUME.cpp:766
oms_status_enu_t getDirectionalDerivativeHeper(const int unknownIndex, const int knownIndex, const std::vector< int > &dependencyList, double &value)
Definition: ComponentFMUME.cpp:1380
oms_status_enu_t getReal(const ComRef &cref, double &value)
Definition: ComponentFMUME.cpp:1126
oms_status_enu_t renameValues(const ComRef &oldCref, const ComRef &newCref)
Definition: ComponentFMUME.cpp:1931
oms_status_enu_t reset()
Definition: ComponentFMUME.cpp:884
std::vector< unsigned int > derivatives
Definition: ComponentFMUME.h:153
oms_status_enu_t setTime(double time)
Definition: ComponentFMUME.cpp:1012
std::vector< unsigned int > parameters
Definition: ComponentFMUME.h:156
oms_status_enu_t setExportName(const std::string &exportName)
Definition: ComponentFMUME.h:126
Variable * getVariable(const ComRef &cref)
Definition: ComponentFMUME.cpp:1100
oms_status_enu_t setBoolean(const ComRef &cref, bool value)
Definition: ComponentFMUME.cpp:1408
std::unordered_map< unsigned int, unsigned int > resultFileMapping
Definition: ComponentFMUME.h:162
oms_status_enu_t getContinuousStates(double *states)
Definition: ComponentFMUME.cpp:1839
oms_status_enu_t setContinuousStates(double *states)
Definition: ComponentFMUME.cpp:1848
void getFilteredEnumerationDefinitionsToSSD(std::map< std::string, std::map< std::string, std::string >> &enumerationDefinitions)
Definition: ComponentFMUME.cpp:397
ComponentFMUME & operator=(ComponentFMUME const ©)
not implemented
std::vector< unsigned int > inputs
Definition: ComponentFMUME.h:154
void getFilteredSignals(std::vector< Connector > &filteredSignals) const
Definition: ComponentFMUME.cpp:1922
FMUInfo fmuInfo
Definition: ComponentFMUME.h:149
std::vector< unsigned int > calculatedParameters
Definition: ComponentFMUME.h:152
void getFilteredUnitDefinitionsToSSD(std::map< std::string, std::map< std::string, std::string >> &unitDefinitions)
Definition: ComponentFMUME.cpp:375
oms_status_enu_t terminate()
Definition: ComponentFMUME.cpp:873
fmiHandle * getFMU()
Definition: ComponentFMUME.h:116
oms_status_enu_t addSignalsToResults(const char *regex)
Definition: ComponentFMUME.cpp:1884
oms_status_enu_t setInteger(const ComRef &cref, int value)
Definition: ComponentFMUME.cpp:1460
Values values
start values defined before instantiating the FMU and external inputs defined after initialization
Definition: ComponentFMUME.h:160
static Component * NewComponent(const oms::ComRef &cref, System *parentSystem, const std::string &fmuPath, std::string replaceComponent="")
Definition: ComponentFMUME.cpp:61
oms_status_enu_t getString(const ComRef &cref, std::string &value)
Definition: ComponentFMUME.cpp:1218
oms_status_enu_t removeSignalsFromResults(const char *regex)
Definition: ComponentFMUME.cpp:1903
fmi2EventInfo * getEventInfo()
Definition: ComponentFMUME.h:117
std::vector< Variable > allVariables
Definition: ComponentFMUME.h:151
fmiHandle * fmu
Definition: ComponentFMUME.h:144
oms_status_enu_t initialize()
Definition: ComponentFMUME.cpp:852
oms_status_enu_t exportToSSMTemplate(pugi::xml_node &ssmNode)
Definition: ComponentFMUME.cpp:414
oms_status_enu_t initializeDependencyGraph_outputs()
Definition: ComponentFMUME.cpp:540
oms_status_enu_t deleteResourcesInSSP(const std::string &filename)
Definition: ComponentFMUME.cpp:844
oms_status_enu_t initializeDependencyGraph_initialUnknowns()
Definition: ComponentFMUME.cpp:437
oms_status_enu_t getBoolean(const ComRef &cref, bool &value)
Definition: ComponentFMUME.cpp:922
Values & getValues()
Definition: ComponentFMUME.h:77
size_t getNumberOfContinuousStates() const
Definition: ComponentFMUME.h:108
oms_status_enu_t exportToSSVTemplate(pugi::xml_node &ssvNode, Snapshot &snapshot)
Definition: ComponentFMUME.cpp:407
oms_status_enu_t setResourcesHelper1(Values value)
Definition: ComponentFMUME.cpp:685
fmi2EventInfo eventInfo
Definition: ComponentFMUME.h:146
size_t nEventIndicators
Definition: ComponentFMUME.h:147
oms_status_enu_t exportToSSD(pugi::xml_node &node, Snapshot &snapshot, std::string variantName) const
Definition: ComponentFMUME.cpp:351
std::vector< bool > exportVariables
Definition: ComponentFMUME.h:157
oms_status_enu_t getInteger(const ComRef &cref, int &value)
Definition: ComponentFMUME.cpp:1020
oms_status_enu_t doEventIteration()
Definition: ComponentFMUME.cpp:776
size_t getNumberOfEventIndicators() const
Definition: ComponentFMUME.h:109
std::string exportName
export name of the FMU, used for the result file
Definition: ComponentFMUME.h:158
oms_status_enu_t setValuesResources(Values &values)
Definition: ComponentFMUME.cpp:1536
ComponentFMUME(ComponentFMUME const ©)
not implemented
oms_status_enu_t instantiate()
Definition: ComponentFMUME.cpp:620
ComponentFMUME(const ComRef &cref, System *parentSystem, const std::string &fmuPath)
Definition: ComponentFMUME.cpp:48
std::string getExportName() const
Definition: ComponentFMUME.h:127
oms_status_enu_t updateOrDeleteStartValueInReplacedComponent(std::vector< std::string > &warningList)
Definition: ComponentFMUME.cpp:1549
oms_status_enu_t exportToSSV(pugi::xml_node &ssvNode)
Definition: ComponentFMUME.cpp:402
bool getCanGetAndSetState()
Definition: ComponentFMUME.h:119
fmi2CallbackLogger omsfmi2logger
Definition: ComponentFMUME.h:143
oms_status_enu_t updateSignals(ResultWriter &resultWriter)
Definition: ComponentFMUME.cpp:1799
oms_status_enu_t getNominalsOfContinuousStates(double *nominals)
Definition: ComponentFMUME.cpp:1866
oms_status_enu_t getEventindicators(double *eventindicators)
Definition: ComponentFMUME.cpp:1875
oms_status_enu_t setReal(const ComRef &cref, double value)
Definition: ComponentFMUME.cpp:1575
void dumpInitialUnknowns()
Definition: ComponentFMUME.cpp:420
oms_status_enu_t newResources(const std::string &ssvFilename, const std::string &ssmFilename, bool externalResources)
Definition: ComponentFMUME.cpp:796
oms_status_enu_t setString(const ComRef &cref, const std::string &value)
Definition: ComponentFMUME.cpp:1633
oms_status_enu_t getDirectionalDerivative(const ComRef &unknownCref, const ComRef &knownCref, double &value)
Definition: ComponentFMUME.cpp:1298
oms_status_enu_t setUnit(const ComRef &cref, const std::string &value)
Definition: ComponentFMUME.cpp:1689
oms_status_enu_t setResourcesHelper2(Values value)
Definition: ComponentFMUME.cpp:709
std::vector< unsigned int > outputs
Definition: ComponentFMUME.h:155
oms_status_enu_t getDerivatives(double *derivatives)
Definition: ComponentFMUME.cpp:1857
Definition: Component.h:60
ComRef cref
Definition: Component.h:154
System * parentSystem
Definition: Component.h:153
FMU info.
Definition: FMUInfo.h:45
bool getCanGetAndSetFMUstate() const
Definition: FMUInfo.h:56
Definition: ResultWriter.h:69
Definition: Snapshot.h:47
Definition: Variable.h:46