Skip to content

Commit

Permalink
Merge pull request #8 from openMSL/7-the-modeldescription-is-not-comp…
Browse files Browse the repository at this point in the history
…letely-correct-according-to-osmp

Fix modelDescription
  • Loading branch information
ClemensLinnhoff authored Jul 5, 2024
2 parents e53ad0d + d0cd7e4 commit b8a74c1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ get_directory_property(OSI_VERSION_MAJOR DIRECTORY lib/open-simulation-interface
get_directory_property(OSI_VERSION_MINOR DIRECTORY lib/open-simulation-interface DEFINITION VERSION_MINOR)
get_directory_property(OSI_VERSION_PATCH DIRECTORY lib/open-simulation-interface DEFINITION VERSION_PATCH)
set(OSIVERSION "${OSI_VERSION_MAJOR}.${OSI_VERSION_MINOR}.${OSI_VERSION_PATCH}")
set(OSMPVERSION "1.0.0" CACHE STRING "OSMP Version String")
set(MODELVERSION "0.5.0" CACHE STRING "Model Version String")

include_directories(lib/fmi2/headers)

Expand Down
34 changes: 17 additions & 17 deletions src/modelDescription.in.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
description="TCP/IP Network Proxy for SensorView and SensorData"
author="Persival GmbH"
version="@OSMPVERSION@"
generationTool="Based on OSMPNetworkProxy"
generationTool="manual"
generationDateAndTime="@FMUTIMESTAMP@"
variableNamingConvention="structured">
<CoSimulation
Expand All @@ -23,24 +23,27 @@
<Category name="OSI" description="Enable OSI-related logging"/>
</LogCategories>
<DefaultExperiment startTime="0.0" stepSize="0.020"/>
<VendorAnnotations>
<Tool name="net.pmsf.osmp" xmlns:osmp="http://xsd.pmsf.net/OSISensorModelPackaging"><osmp:osmp version="@OSMPVERSION@" osi-version="@OSIVERSION@"/></Tool>
</VendorAnnotations>
<ModelVariables>
<ScalarVariable name="OSIIn.base.lo" valueReference="0" causality="input" variability="discrete">
<ScalarVariable name="OSMPSensorViewIn.base.lo" valueReference="0" causality="input" variability="discrete">
<Integer start="0"/>
<Annotations>
<Tool name="net.pmsf.osmp" xmlns:osmp="http://xsd.pmsf.net/OSISensorModelPackaging"><osmp:osmp-binary-variable name="OSMPSensorViewIn" role="base.lo" mime-type="application/x-open-simulation-interface; type=SensorData; version=@OSIVERSION@"/></Tool>
</Annotations>
</ScalarVariable>
<ScalarVariable name="OSIIn.base.hi" valueReference="1" causality="input" variability="discrete">
<ScalarVariable name="OSMPSensorViewIn.base.hi" valueReference="1" causality="input" variability="discrete">
<Integer start="0"/>
<Annotations>
<Tool name="net.pmsf.osmp" xmlns:osmp="http://xsd.pmsf.net/OSISensorModelPackaging"><osmp:osmp-binary-variable name="OSMPSensorViewIn" role="base.hi" mime-type="application/x-open-simulation-interface; type=SensorData; version=@OSIVERSION@"/></Tool>
</Annotations>
</ScalarVariable>
<ScalarVariable name="OSIIn.size" valueReference="2" causality="input" variability="discrete">
<Integer start="0"/>
</ScalarVariable>
<ScalarVariable name="OSIOut.base.lo" valueReference="3" causality="output" variability="discrete" initial="exact">
<Integer start="0"/>
</ScalarVariable>
<ScalarVariable name="OSIOut.base.hi" valueReference="4" causality="output" variability="discrete" initial="exact">
<Integer start="0"/>
</ScalarVariable>
<ScalarVariable name="OSIOut.size" valueReference="5" causality="output" variability="discrete" initial="exact">
<ScalarVariable name="OSMPSensorViewIn.size" valueReference="2" causality="input" variability="discrete">
<Integer start="0"/>
<Annotations>
<Tool name="net.pmsf.osmp" xmlns:osmp="http://xsd.pmsf.net/OSISensorModelPackaging"><osmp:osmp-binary-variable name="OSMPSensorViewIn" role="size" mime-type="application/x-open-simulation-interface; type=SensorData; version=@OSIVERSION@"/></Tool>
</Annotations>
</ScalarVariable>
<ScalarVariable name="valid" valueReference="0" causality="output" variability="discrete" initial="exact">
<Boolean start="false"/>
Expand All @@ -60,16 +63,13 @@
<ScalarVariable name="port" valueReference="1" causality="parameter" variability="fixed" initial="exact">
<String start="3456"/>
</ScalarVariable>
<ScalarVariable name="wait_time_in_s" valueReference="6" causality="parameter" variability="fixed" initial="exact">
<ScalarVariable name="wait_time_in_s" valueReference="3" causality="parameter" variability="fixed" initial="exact">
<Integer start="5"/>
</ScalarVariable>
</ModelVariables>
<ModelStructure>
<Outputs>
<Unknown index="4"/>
<Unknown index="5"/>
<Unknown index="6"/>
<Unknown index="7"/>
</Outputs>
</ModelStructure>
</fmiModelDescription>

0 comments on commit b8a74c1

Please sign in to comment.