testValueClause.xml

Page auto-generated from XML file.

Failure

The generated TethysL source could not be parsed, likely due to source XML not being well-formed.

Below is the compile error at the TethysL level, as well as the source XML.

The TethysL file name shown below does not necessarily indicate the file exists, but hints about the actual corresponding .xml file.

Syntax error:
   --> lrauv-application/Missions/RegressionTests/testValueClause.xml:28:17
    | 
 24 |     Two = 2 count
 25 | 
 26 |     # Define Eight as 2 * ( 2 + 2 )
 27 | 
 28 |     Eight = Two * ( Two + Two )
    |                 ^
 29 |   }
 30 | 
 31 |   aggregate {
 32 |     run when (
    | 
Unexpected: `*`
One of the following is possible:
  (argument name)
  }
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# -   Copyright (c) 2024 MBARI
# -   MBARI Proprietary Information. Confidential. All Rights Reserved
# -   Unauthorized copying or distribution of this file via any medium is strictly
# -   prohibited.
# -
# -   WARNING - This file contains information whose export is restricted by the
# -   Export Administration Act of 1979 (Title 50, U.S.C., App. 2401 et seq.), as
# -   amended. Violations of these export laws are subject to severe civil and/or
# -   criminal penalties.

mission TestMission {
test_code valgrind {{{
passed = True
}}}


  arguments {
    True = true

    False = false

    One = 1 count

    Two = 2 count

    # Define Eight as 2 * ( 2 + 2 )

    Eight = Two * ( Two + Two )
  }

  aggregate {
    run when (
      true
    )

    syslog "Ok with Units:bool Value:1"

    behavior Guidance:Wait {
      run in sequence
      timeout duration=P2M
    }
  }

  aggregate {
    run when (
      false
    )

    syslog critical "Should not see this with Units:bool Value:0"
  }

  aggregate {
    run when (
      true == true
    )

    syslog "Ok with Units:bool Value:1 EQ Units:bool Value:1"

    behavior Guidance:Wait {
      run in sequence
      timeout duration=P2M
    }
  }

  aggregate {
    run when (
      true == false
    )

    syslog critical "Should not see this with Units:bool Value:1 EQ Units:bool Value:0"
  }

  aggregate {
    run when (
      true
    )

    syslog "Ok with True"

    behavior Guidance:Wait {
      run in sequence
      timeout duration=P2M
    }
  }

  aggregate {
    run when (
      false
    )

    syslog critical "Should not see this with with False"
  }

  aggregate {
    run when (
      not ( false )
    )

    syslog "Ok with Not False"

    behavior Guidance:Wait {
      run in sequence
      timeout duration=P2M
    }
  }

  aggregate {
    run when (
      not ( true )
    )

    syslog critical "Should not see this with with Not True"
  }

  aggregate {
    run when (
      true == true
    )

    syslog "Ok with True Eq True"

    behavior Guidance:Wait {
      run in sequence
      timeout duration=P2M
    }
  }

  aggregate {
    run when (
      true == false
    )

    syslog critical "Should not see this with True Eq False"
  }

  aggregate {
    run when (
      true != false
    )

    syslog "Ok with True Ne False"

    behavior Guidance:Wait {
      run in sequence
      timeout duration=P2M
    }
  }

  aggregate {
    run when (
      false != false
    )

    syslog critical "Should not see this with False Ne False"
  }

  aggregate {
    run when (
      false != true
    )

    syslog "Ok with False Ne True"

    behavior Guidance:Wait {
      run in sequence
      timeout duration=P2M
    }
  }

  aggregate {
    run when (
      true != true
    )

    syslog critical "Should not see this with True Ne True"
  }

  aggregate {
    run when (
      True
    )

    syslog "Ok with Arg Name=\"True\""

    behavior Guidance:Wait {
      run in sequence
      timeout duration=P2M
    }
  }

  aggregate {
    run when (
      False
    )

    syslog critical "Should not see this with Arg Name=\"False\""
  }

  aggregate {
    run when (
      One + One == Two
    )

    syslog "Ok with Args 1 + 1 = 2"

    behavior Guidance:Wait {
      run in sequence
      timeout duration=P2M
    }
  }

  aggregate {
    run when (
      Two == ( One + One )
    )

    syslog "Ok with Args 2 = 1 + 1"

    behavior Guidance:Wait {
      run in sequence
      timeout duration=P2M
    }
  }

  aggregate {
    run when (
      ( One + 3 count ) * Two == Eight
    )

    syslog "Ok with( Arg 1 + Value 3 ) * Arg 2 = Arg 8"

    behavior Guidance:Wait {
      run in sequence
      timeout duration=P2M
    }
  }

  aggregate {
    run when (
      Universal:platform_buoyancy_position * 0.5 meter == ( Universal:platform_buoyancy_position / 2 meter )
    )

    syslog "Ok with ( buoyancy * 0.5 ) = ( buoyancy / 2 )"

    behavior Guidance:Wait {
      run in sequence
      timeout duration=P2M
    }
  }

  # <Syslog> with no fragments: syslog none

}
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
<?xml version="1.0" encoding="UTF-8"?>
<!--
-   Copyright (c) 2024 MBARI
-   MBARI Proprietary Information. Confidential. All Rights Reserved
-   Unauthorized copying or distribution of this file via any medium is strictly
-   prohibited.
-
-   WARNING - This file contains information whose export is restricted by the
-   Export Administration Act of 1979 (Title 50, U.S.C., App. 2401 et seq.), as
-   amended. Violations of these export laws are subject to severe civil and/or
-   criminal penalties.
-->

<Mission xmlns="Tethys"
       xmlns:Control="Tethys/Control"
       xmlns:Guidance="Tethys/Guidance" 
       xmlns:Units="Tethys/Units"
       xmlns:Universal="Tethys/Universal"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="Tethys http://okeanids.mbari.org/tethys/Xml/Tethys.xsd
                           Tethys/Control http://okeanids.mbari.org/tethys/Xml/Control.xsd
                           Tethys/Guidance http://okeanids.mbari.org/tethys/Xml/Guidance.xsd
                           Tethys/Units http://okeanids.mbari.org/tethys/Xml/Units.xsd
                           Tethys/Universal http://okeanids.mbari.org/tethys/Xml/Universal.xsd"
       Id="TestMission">

<!--
TEST_WITH_VALGRIND
TEST_CODE_START

passed = True

TEST_CODE_END
-->

    <DefineArg Name="True"><True/></DefineArg>

    <DefineArg Name="False"><False/></DefineArg>

    <DefineArg Name="One"><Units:count/><Value>1</Value></DefineArg>

    <DefineArg Name="Two"><Units:count/><Value>2</Value></DefineArg>

<!-- Define Eight as 2 * ( 2 + 2 ) -->

    <DefineArg Name="Eight"><Arg Name="Two"/><Mult><Arg Name="Two"/><Add><Arg Name="Two"/></Add></Mult></DefineArg>

    <Aggregate>

        <When>
            <True/>
        </When>

        <Syslog>Ok with Units:bool Value:1</Syslog>

        <Guidance:Wait>
            <Sequence/>
            <Timeout Duration="P2M" />
        </Guidance:Wait>

    </Aggregate>

    <Aggregate>

        <When>
            <False/>
        </When>

        <Syslog Severity="Critical">Should not see this with Units:bool Value:0</Syslog>

    </Aggregate>

    <Aggregate>

        <When>
            <True/>
            <Eq><True/></Eq>
        </When>

        <Syslog>Ok with Units:bool Value:1 EQ Units:bool Value:1</Syslog>

        <Guidance:Wait>
            <Sequence/>
            <Timeout Duration="P2M" />
        </Guidance:Wait>

    </Aggregate>

    <Aggregate>

        <When>
            <True/>
            <Eq><False/></Eq>
        </When>

        <Syslog Severity="Critical">Should not see this with Units:bool Value:1 EQ Units:bool Value:0</Syslog>

    </Aggregate>

    <Aggregate>

        <When>
            <True/>
        </When>

        <Syslog>Ok with True</Syslog>

        <Guidance:Wait>
            <Sequence/>
            <Timeout Duration="P2M" />
        </Guidance:Wait>

    </Aggregate>

    <Aggregate>

        <When>
            <False/>
        </When>

        <Syslog Severity="Critical">Should not see this with with False</Syslog>

    </Aggregate>

    <Aggregate>

        <When>
            <Not><False/></Not>
        </When>

        <Syslog>Ok with Not False</Syslog>

        <Guidance:Wait>
            <Sequence/>
            <Timeout Duration="P2M" />
        </Guidance:Wait>

    </Aggregate>

    <Aggregate>

        <When>
            <Not><True/></Not>
        </When>

        <Syslog Severity="Critical">Should not see this with with Not True</Syslog>

    </Aggregate>

    <Aggregate>

        <When>
            <True/>
            <Eq><True/></Eq>
        </When>

        <Syslog>Ok with True Eq True</Syslog>

        <Guidance:Wait>
            <Sequence/>
            <Timeout Duration="P2M" />
        </Guidance:Wait>

    </Aggregate>

    <Aggregate>

        <When>
            <True/>
            <Eq><False/></Eq>
        </When>

        <Syslog Severity="Critical">Should not see this with True Eq False</Syslog>

    </Aggregate>

    <Aggregate>

        <When>
            <True/>
            <Ne><False/></Ne>
        </When>

        <Syslog>Ok with True Ne False</Syslog>

        <Guidance:Wait>
            <Sequence/>
            <Timeout Duration="P2M" />
        </Guidance:Wait>

    </Aggregate>

    <Aggregate>

        <When>
            <False/>
            <Ne><False/></Ne>
        </When>

        <Syslog Severity="Critical">Should not see this with False Ne False</Syslog>

    </Aggregate>

    <Aggregate>

        <When>
            <False/>
            <Ne><True/></Ne>
        </When>

        <Syslog>Ok with False Ne True</Syslog>

        <Guidance:Wait>
            <Sequence/>
            <Timeout Duration="P2M" />
        </Guidance:Wait>

    </Aggregate>

    <Aggregate>

        <When>
            <True/>
            <Ne><True/></Ne>
        </When>

        <Syslog Severity="Critical">Should not see this with True Ne True</Syslog>

    </Aggregate>

    <Aggregate>

        <When>
            <Arg Name="True"/>
        </When>

        <Syslog>Ok with Arg Name="True"</Syslog>

        <Guidance:Wait>
            <Sequence/>
            <Timeout Duration="P2M" />
        </Guidance:Wait>

    </Aggregate>

    <Aggregate>

        <When>
            <Arg Name="False"/>
        </When>

        <Syslog Severity="Critical">Should not see this with Arg Name="False"</Syslog>

    </Aggregate>

    <Aggregate>

        <When>
            <Arg Name="One"/>
            <Add><Arg Name="One"/></Add>

            <Eq><Arg Name="Two"/></Eq>
        </When>

        <Syslog>Ok with Args 1 + 1 = 2</Syslog>

        <Guidance:Wait>
            <Sequence/>
            <Timeout Duration="P2M" />
        </Guidance:Wait>

    </Aggregate>

    <Aggregate>

        <When>
            <Arg Name="Two"/>
            <Eq><Arg Name="One"/><Add><Arg Name="One"/></Add></Eq>
        </When>

        <Syslog>Ok with Args 2 = 1 + 1</Syslog>

        <Guidance:Wait>
            <Sequence/>
            <Timeout Duration="P2M" />
        </Guidance:Wait>

    </Aggregate>

    <Aggregate>

        <When>
            <Arg Name="One"/>
            <Add><Units:count/><Value>3</Value></Add>

            <Mult><Arg Name="Two"/></Mult>

            <Eq><Arg Name="Eight"/></Eq>
        </When>

        <Syslog>Ok with( Arg 1 + Value 3 ) * Arg 2 = Arg 8</Syslog>

        <Guidance:Wait>
            <Sequence/>
            <Timeout Duration="P2M" />
        </Guidance:Wait>

    </Aggregate>

    <Aggregate>

        <When>
            <Universal:platform_buoyancy_position/>
            <Mult><Units:meter/><Value>0.5</Value></Mult>

            <Eq><Universal:platform_buoyancy_position/><Div><Units:meter/><Value>2</Value></Div></Eq>
        </When>

        <Syslog>Ok with ( buoyancy * 0.5 ) = ( buoyancy / 2 )</Syslog>

        <Guidance:Wait>
            <Sequence/>
            <Timeout Duration="P2M" />
        </Guidance:Wait>

    </Aggregate>

    <Syslog Severity="None"/>

</Mission>