Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gitting-around committed Oct 31, 2024
1 parent 6c0caf8 commit be3f025
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
2 changes: 1 addition & 1 deletion rabbitmq-fmu/test/fmu_test_it.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ namespace {
FmuContainerCore test = FmuContainerCore(maxAge, lookAhead);

long long milliSecondsSinceEpoch[] = { (long long) 100.0, (long long) 200.0, (long long) 300.0, (long long) 400.0, (long long) 500.0, (long long) 600.0, (long long) 700.0, (long long) 800.0, (long long) 900.0, (long long) 1000.0};
string message[] = {"1970-01-01T00:00:00.100+01:00", "1970-01-01T00:00:00.200+01:00", "1970-01-01T00:00:00.300+01:00", "1970-01-01T00:00:00.400+01:00", "1970-01-01T00:00:00.500+01:00", "1970-01-01T00:00:00.600+01:00", "1970-01-01T00:00:00.700+01:00", "1970-01-01T00:00:00.800+01:00", "1970-01-01T00:00:00.900+01:00" ,"1970-01-01T00:00:01.0+01:00"};
string message[] = {"1970-01-01T00:00:00.100+00:00", "1970-01-01T00:00:00.200+00:00", "1970-01-01T00:00:00.300+00:00", "1970-01-01T00:00:00.400+00:00", "1970-01-01T00:00:00.500+00:00", "1970-01-01T00:00:00.600+00:00", "1970-01-01T00:00:00.700+00:00", "1970-01-01T00:00:00.800+00:00", "1970-01-01T00:00:00.900+00:00" ,"1970-01-01T00:00:01.0+00:00"};

for (int i = 0; i < (sizeof(milliSecondsSinceEpoch)/sizeof(*milliSecondsSinceEpoch)); i++) {

Expand Down
45 changes: 22 additions & 23 deletions rabbitmq-fmu/xmls-for-tests/modelDescription.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<fmiModelDescription fmiVersion="2.0" modelName="RabbitMq" guid="{cfc65592-ffff-4563-9705-1581b6e7071c}"
generationTool="RabbitMQ digital twin generator" numberOfEventIndicators="0" copyright="AU"
license="-">
generationTool="RabbitMQ digital twin generator" numberOfEventIndicators="0" copyright="INTO-CPS"
license="INTO-CPS">
<CoSimulation modelIdentifier="rabbitmq" needsExecutionTool="true"
canHandleVariableCommunicationStepSize="true" canInterpolateInputs="false"
maxOutputDerivativeOrder="0" canRunAsynchronuously="false" canBeInstantiatedOnlyOncePerProcess="true"
Expand All @@ -15,17 +15,15 @@
<DefaultExperiment startTime="0.0" stopTime="16.0" stepSize="0.01"/>
<ModelVariables>

<ScalarVariable name="xpos" valueReference="20" variability="continuous" causality="output">
<ScalarVariable name="xpos" valueReference="100" variability="continuous" causality="output">
<Real />
</ScalarVariable>
<ScalarVariable name="ypos" valueReference="21" variability="continuous" causality="output">
</ScalarVariable>
<ScalarVariable name="ypos" valueReference="101" variability="continuous" causality="output">
<Real />
</ScalarVariable>

<ScalarVariable name="seqno" valueReference="14" variability="discrete" causality="output">
<Integer/>
</ScalarVariable>

<ScalarVariable name = "distance" valueReference="102" variability="continuous" causality ="input">
<Real start="0.0" />
</ScalarVariable>

<ScalarVariable name="config.hostname" valueReference="0" variability="fixed" causality="parameter" initial="exact">
<String start="localhost"/>
Expand All @@ -42,23 +40,23 @@


<ScalarVariable name="config.routingkey" valueReference="4" variability="fixed" causality="parameter" initial="exact">
<String start="linefollower.data.to_cosim"/>
<String start="data.to_cosim"/>
</ScalarVariable>

<ScalarVariable name="config.communicationtimeout" valueReference="5" variability="fixed" causality="parameter" description="Network read time out in seconds" initial="exact">
<Integer start="600"/>
<Integer start="60"/>
</ScalarVariable>
<ScalarVariable name="config.precision" valueReference="6" variability="fixed" causality="parameter" description="Communication step comparison precision. Number of decimals to consider" initial="exact">
<Integer start="10"/>
</ScalarVariable>
<ScalarVariable name="config.maxage" valueReference="7" variability="fixed" causality="parameter" description="The max age of a value specified in ms," initial="exact">
<Integer start="0"/>
<Integer start="1000"/>
</ScalarVariable>
<ScalarVariable name="config.lookahead" valueReference="8" variability="fixed" causality="parameter" description="The number of queue messages that should be considered on each processing. Value must be greater than 0" initial="exact">
<Integer start="1"/>
</ScalarVariable>
<ScalarVariable name="config.exchangename" valueReference="9" variability="fixed" causality="parameter" initial="exact">
<String start="fmi_digital_twin_cd"/>
<String start="fmi_digital_twin"/>
</ScalarVariable>
<ScalarVariable name="config.exchangetype" valueReference="10" variability="fixed" causality="parameter" initial="exact">
<String start="direct"/>
Expand All @@ -70,18 +68,19 @@
<String start="direct"/>
</ScalarVariable>
<ScalarVariable name="config.routingkey.from_cosim" valueReference="13" variability="fixed" causality="parameter" initial="exact">
<String start="linefollower.data.from_cosim"/>
<String start="data.from_cosim"/>
</ScalarVariable>


</ModelVariables>
<ModelStructure>
<Outputs>
</ModelVariables>
<ModelStructure>
<Outputs>
<Unknown index="1"/>
<Unknown index="2"/>
<Unknown index="3"/>
</Outputs>
</ModelStructure>

</Outputs>
<InitialUnknowns>
<Unknown index="1"/>
<Unknown index="2"/>
</InitialUnknowns>
</ModelStructure>

</fmiModelDescription>

0 comments on commit be3f025

Please sign in to comment.