Commit 84968d20 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Update testcase to match opengeode test-simu

parent 182b6615
...@@ -8,6 +8,16 @@ FixedIntList ::= SEQUENCE (SIZE(3)) OF TASTE-Peek-id ...@@ -8,6 +8,16 @@ FixedIntList ::= SEQUENCE (SIZE(3)) OF TASTE-Peek-id
MyEnum ::= ENUMERATED {one, two, three, four, five} MyEnum ::= ENUMERATED {one, two, three, four, five}
MyChoice ::= CHOICE { a BOOLEAN, b ENUMERATED { aa, bb } }
MySeq ::= SEQUENCE { a BOOLEAN, b MyChoice }
MySetOf ::= SET (SIZE(1..3)) OF INTEGER (0..10)
MySeqOf ::= SEQUENCE (SIZE(1..3)) OF INTEGER (0..10)
MySimpleSeq ::= SEQUENCE { a INTEGER (0..255), b BOOLEAN, c MyEnum }
END END
......
/* CIF PROCESS (295, 56), (150, 75) */ /* CIF PROCESS (297, 59), (150, 75) */
PROCESS orchestrator PROCESS orchestrator
/* CIF COMMENT (405, 192), (71, 35) */ /* CIF COMMENT (407, 195), (78, 35) */
COMMENT 'Hello'; COMMENT 'Hello';
/* CIF TEXT (0, 94), (398, 312) */ /* CIF TEXT (0, 138), (448, 448) */
dcl seq tastE_Peek_id_list := { 1,2,3,4,5}; dcl seq tastE_Peek_id_list := { 1,2,3,4,5};
dcl a myEnum; dcl a myEnum;
...@@ -11,60 +11,97 @@ dcl fixed fixedIntList := { 1,2,3}; ...@@ -11,60 +11,97 @@ dcl fixed fixedIntList := { 1,2,3};
dcl anInt T_UInt32 :=0; dcl anInt T_UInt32 :=0;
dcl simpleseq MySimpleSeq := {a 42, b true, c three};
timer myTimer; timer myTimer;
procedure VDM comment '#hello';
fpar in inp fixedIntList,
in/out outp fixedIntList;
external comment '#vdm #classname=RemoteCall';
procedure VDM2;
fpar in inp T_Uint32,
in/out outp MySimpleSeq;
external comment '#vdm #classname=RemoteCall';
/* CIF ENDTEXT */ /* CIF ENDTEXT */
/* CIF START (708, 150), (80, 36) */ /* CIF START (940, 150), (80, 36) */
START; START;
/* CIF NEXTSTATE (713, 201), (68, 34) */ /* CIF NEXTSTATE (944, 201), (72, 34) */
NEXTSTATE Wait; NEXTSTATE Wait;
/* CIF STATE (957, 345), (70, 35) */ /* CIF STATE (1468, 125), (100, 35) */
STATE next;
/* CIF INPUT (930, 400), (122, 35) */
INPUT pulse(a);
/* CIF PROCEDURECALL (904, 450), (173, 35) */
CALL reset_timer(mytimer);
/* CIF NEXTSTATE (956, 500), (70, 35) */
NEXTSTATE wait;
ENDSTATE;
/* CIF STATE (980, 125), (93, 35) */
STATE timeout; STATE timeout;
/* CIF INPUT (965, 180), (122, 35) */ /* CIF INPUT (1453, 180), (147, 35) */
INPUT Paramless_TC; INPUT Paramless_TC;
/* CIF PROCEDURECALL (926, 230), (200, 35) */ /* CIF PROCEDURECALL (1402, 230), (249, 35) */
CALL SET_timer(1000, mytimer); CALL SET_timer(1000, mytimer);
/* CIF NEXTSTATE (991, 280), (70, 35) */ /* CIF NEXTSTATE (1489, 280), (74, 35) */
NEXTSTATE next; NEXTSTATE next;
ENDSTATE; ENDSTATE;
/* CIF STATE (713, 201), (68, 34) */ /* CIF STATE (1474, 345), (74, 35) */
STATE next;
/* CIF INPUT (1447, 400), (122, 35) */
INPUT pulse(a);
/* CIF PROCEDURECALL (1401, 450), (213, 35) */
CALL reset_timer(mytimer);
/* CIF NEXTSTATE (1473, 500), (70, 35) */
NEXTSTATE wait;
ENDSTATE;
/* CIF STATE (944, 201), (72, 34) */
STATE Wait; STATE Wait;
/* CIF INPUT (461, 255), (87, 35) */ /* CIF INPUT (666, 255), (101, 35) */
INPUT pulse(a); INPUT pulse(a);
/* CIF TASK (434, 305), (139, 40) */ /* CIF TASK (631, 305), (170, 48) */
TASK seq := {0,1,0,1,0}, TASK seq := {0,1,0,1,0},
anint := 478; anint := 478;
/* CIF PROCEDURECALL (407, 365), (193, 35) */ /* CIF PROCEDURECALL (587, 368), (259, 35) */
CALL externalProc(anint, anint); CALL writeln('Input param', anint);
/* CIF OUTPUT (447, 415), (114, 35) */ /* CIF PROCEDURECALL (597, 418), (238, 35) */
CALL ExternalProc(anint, anint);
/* CIF PROCEDURECALL (579, 468), (275, 35) */
CALL writeln('Output param', anint);
/* CIF PROCEDURECALL (573, 518), (286, 35) */
CALL write('Calling VDM with data');
/* CIF TASK (523, 568), (386, 48) */
TASK for each in fixed: call write(each, ' '); endfor;
/* CIF PROCEDURECALL (631, 631), (170, 40) */
CALL writeln('');
/* CIF PROCEDURECALL (630, 686), (172, 35) */
CALL vdm(fixed, fixed);
/* CIF PROCEDURECALL (631, 736), (170, 40) */
CALL write('Result:');
/* CIF TASK (525, 791), (383, 35) */
TASK for each in fixed: call write(each, ' '); endfor;
/* CIF PROCEDURECALL (658, 841), (116, 40) */
CALL writeln('');
/* CIF PROCEDURECALL (526, 896), (381, 35) */
CALL writeln('Calling VDM2 with value', fixed(0));
/* CIF PROCEDURECALL (595, 946), (242, 35) */
CALL vdm2(fixed(0), simpleseq);
/* CIF PROCEDURECALL (461, 996), (511, 40) */
CALL writeln('Result:', simpleseq!a, ' ', simpleseq!b, ' ', simpleseq!c);
/* CIF OUTPUT (647, 1051), (138, 35) */
OUTPUT telemetry(a); OUTPUT telemetry(a);
/* CIF OUTPUT (442, 465), (123, 35) */ /* CIF OUTPUT (643, 1101), (147, 35) */
OUTPUT peek_list(seq); OUTPUT peek_list(seq);
/* CIF OUTPUT (431, 515), (145, 35) */ /* CIF OUTPUT (628, 1151), (177, 35) */
OUTPUT peek_fixed(fixed); OUTPUT peek_fixed(fixed);
/* CIF NEXTSTATE (469, 565), (70, 35) */ /* CIF NEXTSTATE (679, 1201), (74, 35) */
NEXTSTATE next; NEXTSTATE next;
/* CIF INPUT (652, 255), (122, 35) */ /* CIF INPUT (1078, 255), (147, 35) */
INPUT Paramless_TC; INPUT Paramless_TC;
/* CIF PROCEDURECALL (610, 305), (205, 35) */ /* CIF PROCEDURECALL (1025, 305), (253, 35) */
CALL writeln('Got Paramless TC'); CALL writeln('Got Paramless TC');
/* CIF PROCEDURECALL (613, 355), (200, 35) */ /* CIF PROCEDURECALL (1027, 355), (249, 35) */
CALL SET_timer(1000, mytimer); CALL SET_timer(1000, mytimer);
/* CIF OUTPUT (650, 405), (125, 35) */ /* CIF OUTPUT (1076, 405), (150, 35) */
OUTPUT Paramless_TM; OUTPUT Paramless_TM;
/* CIF NEXTSTATE (678, 455), (70, 35) */ /* CIF NEXTSTATE (1116, 455), (70, 35) */
NEXTSTATE wait; NEXTSTATE wait;
/* CIF INPUT (826, 255), (90, 35) */ /* CIF INPUT (1288, 255), (104, 35) */
INPUT mytimer; INPUT mytimer;
/* CIF NEXTSTATE (826, 305), (90, 35) */ /* CIF NEXTSTATE (1289, 305), (102, 35) */
NEXTSTATE Timeout; NEXTSTATE Timeout;
ENDSTATE; ENDSTATE;
ENDPROCESS orchestrator; ENDPROCESS orchestrator;
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment