diff --git a/src/OMSimulatorLib/Connector.cpp b/src/OMSimulatorLib/Connector.cpp index 6db6ad034..5b6d90507 100644 --- a/src/OMSimulatorLib/Connector.cpp +++ b/src/OMSimulatorLib/Connector.cpp @@ -150,6 +150,8 @@ oms::Connector* oms::Connector::NewConnector(const pugi::xml_node& node, const s type = oms_signal_type_integer; else if (typeString == "Boolean") type = oms_signal_type_boolean; + else if (typeString == "String") + type = oms_signal_type_string; else if (typeString == "Enumeration") type = oms_signal_type_enum; // TODO handle "Binary" type for FMI-2.1 see specification diff --git a/testsuite/simulation/str_hello_world.lua b/testsuite/simulation/str_hello_world.lua index e432a6ffc..569e4f44d 100644 --- a/testsuite/simulation/str_hello_world.lua +++ b/testsuite/simulation/str_hello_world.lua @@ -30,6 +30,9 @@ print("info: a: " .. oms_getString("model.root.fmu.a")) print("info: b: " .. oms_getString("model.root.fmu.b")) print("info: c: " .. oms_getString("model.root.fmu.c")) +src = oms_exportSnapshot("model") +print(src) + oms_terminate("model") oms_delete("model") @@ -42,4 +45,98 @@ oms_delete("model") -- info: a: Hello -- info: b: OMSimulator -- info: c: Hello OMSimulator! +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- -- endResult