Commit ebc3c107 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Increase interest of test-simu

parent 0def3517
...@@ -26,82 +26,84 @@ procedure VDM2; ...@@ -26,82 +26,84 @@ procedure VDM2;
in/out outp MySimpleSeq; in/out outp MySimpleSeq;
external comment '#vdm #classname=RemoteCall'; external comment '#vdm #classname=RemoteCall';
/* CIF ENDTEXT */ /* CIF ENDTEXT */
/* CIF START (940, 150), (80, 36) */ /* CIF START (1081, 150), (80, 36) */
START; START;
/* CIF NEXTSTATE (944, 201), (72, 34) */ /* CIF NEXTSTATE (1085, 201), (72, 34) */
NEXTSTATE Wait; NEXTSTATE Wait;
/* CIF STATE (1468, 125), (100, 35) */ /* CIF STATE (1670, 345), (74, 35) */
STATE timeout;
/* CIF INPUT (1453, 180), (147, 35) */
INPUT Paramless_TC;
/* CIF PROCEDURECALL (1402, 230), (249, 35) */
CALL SET_timer(1000, mytimer);
/* CIF NEXTSTATE (1489, 280), (74, 35) */
NEXTSTATE next;
ENDSTATE;
/* CIF STATE (1474, 345), (74, 35) */
STATE next; STATE next;
/* CIF INPUT (1447, 400), (122, 35) */ /* CIF INPUT (1643, 400), (122, 35) */
INPUT pulse(a); INPUT pulse(a);
/* CIF PROCEDURECALL (1401, 450), (213, 35) */ /* CIF PROCEDURECALL (1598, 450), (213, 35) */
CALL reset_timer(mytimer); CALL reset_timer(mytimer);
/* CIF NEXTSTATE (1473, 500), (70, 35) */ /* CIF NEXTSTATE (1669, 500), (70, 35) */
NEXTSTATE wait; NEXTSTATE wait;
ENDSTATE; ENDSTATE;
/* CIF STATE (944, 201), (72, 34) */ /* CIF STATE (1664, 125), (100, 35) */
STATE timeout;
/* CIF INPUT (1649, 180), (147, 35) */
INPUT Paramless_TC;
/* CIF PROCEDURECALL (1598, 230), (249, 35) */
CALL SET_timer(1000, mytimer);
/* CIF NEXTSTATE (1686, 280), (74, 35) */
NEXTSTATE next;
ENDSTATE;
/* CIF STATE (1085, 201), (72, 34) */
STATE Wait; STATE Wait;
/* CIF INPUT (666, 255), (101, 35) */ /* CIF INPUT (807, 255), (101, 35) */
INPUT pulse(a); INPUT pulse(a);
/* CIF TASK (631, 305), (170, 48) */ /* CIF TASK (772, 305), (170, 48) */
TASK seq := {0,1,0,1,0}, TASK seq := {0,1,0,1,0},
anint := 478; anint := 478;
/* CIF PROCEDURECALL (587, 368), (259, 35) */ /* CIF PROCEDURECALL (728, 368), (259, 35) */
CALL writeln('Input param', anint); CALL writeln('Input param', anint);
/* CIF PROCEDURECALL (597, 418), (238, 35) */ /* CIF PROCEDURECALL (738, 418), (238, 35) */
CALL ExternalProc(anint, anint); CALL ExternalProc(anint, anint);
/* CIF PROCEDURECALL (579, 468), (275, 35) */ /* CIF PROCEDURECALL (720, 468), (275, 35) */
CALL writeln('Output param', anint); CALL writeln('Output param', anint);
/* CIF PROCEDURECALL (573, 518), (286, 35) */ /* CIF PROCEDURECALL (714, 518), (286, 35) */
CALL write('Calling VDM with data'); CALL write('Calling VDM with data');
/* CIF TASK (523, 568), (386, 48) */ /* CIF TASK (664, 568), (386, 48) */
TASK for each in fixed: call write(each, ' '); endfor; TASK for each in fixed: call write(each, ' '); endfor;
/* CIF PROCEDURECALL (631, 631), (170, 40) */ /* CIF PROCEDURECALL (772, 631), (170, 40) */
CALL writeln(''); CALL writeln('');
/* CIF PROCEDURECALL (630, 686), (172, 35) */ /* CIF PROCEDURECALL (771, 686), (172, 35) */
CALL vdm(fixed, fixed); CALL vdm(fixed, fixed);
/* CIF PROCEDURECALL (631, 736), (170, 40) */ /* CIF PROCEDURECALL (772, 736), (170, 40) */
CALL write('Result:'); CALL write('Result:');
/* CIF TASK (525, 791), (383, 35) */ /* CIF TASK (666, 791), (383, 35) */
TASK for each in fixed: call write(each, ' '); endfor; TASK for each in fixed: call write(each, ' '); endfor;
/* CIF PROCEDURECALL (658, 841), (116, 40) */ /* CIF PROCEDURECALL (799, 841), (116, 40) */
CALL writeln(''); CALL writeln('');
/* CIF PROCEDURECALL (526, 896), (381, 35) */ /* CIF PROCEDURECALL (667, 896), (381, 35) */
CALL writeln('Calling VDM2 with value', fixed(0)); CALL writeln('Calling VDM2 with value', fixed(0));
/* CIF PROCEDURECALL (595, 946), (242, 35) */ /* CIF PROCEDURECALL (736, 946), (242, 35) */
CALL vdm2(fixed(0), simpleseq); CALL vdm2(fixed(0), simpleseq);
/* CIF PROCEDURECALL (461, 996), (511, 40) */ /* CIF PROCEDURECALL (602, 996), (511, 40) */
CALL writeln('Result:', simpleseq!a, ' ', simpleseq!b, ' ', simpleseq!c); CALL writeln('Result:', simpleseq!a, ' ', simpleseq!b, ' ', simpleseq!c);
/* CIF OUTPUT (647, 1051), (138, 35) */ /* CIF OUTPUT (788, 1051), (138, 35) */
OUTPUT telemetry(a); OUTPUT telemetry(a);
/* CIF OUTPUT (643, 1101), (147, 35) */ /* CIF OUTPUT (784, 1101), (147, 35) */
OUTPUT peek_list(seq); OUTPUT peek_list(seq);
/* CIF OUTPUT (628, 1151), (177, 35) */ /* CIF OUTPUT (769, 1151), (177, 35) */
OUTPUT peek_fixed(fixed); OUTPUT peek_fixed(fixed);
/* CIF NEXTSTATE (679, 1201), (74, 35) */ /* CIF NEXTSTATE (820, 1201), (74, 35) */
NEXTSTATE next; NEXTSTATE next;
/* CIF INPUT (1078, 255), (147, 35) */ /* CIF INPUT (1219, 255), (147, 35) */
INPUT Paramless_TC; INPUT Paramless_TC;
/* CIF PROCEDURECALL (1025, 305), (253, 35) */ /* CIF PROCEDURECALL (1166, 305), (253, 35) */
CALL writeln('Got Paramless TC'); CALL writeln('Got Paramless TC');
/* CIF PROCEDURECALL (1027, 355), (249, 35) */ /* CIF PROCEDURECALL (1168, 355), (249, 35) */
CALL SET_timer(1000, mytimer); CALL SET_timer(1000, mytimer);
/* CIF OUTPUT (1076, 405), (150, 35) */ /* CIF OUTPUT (1217, 405), (150, 35) */
OUTPUT Paramless_TM; OUTPUT Paramless_TM;
/* CIF NEXTSTATE (1116, 455), (70, 35) */ /* CIF TASK (1191, 455), (202, 35) */
TASK anint := (anint + 1) mod 100;
/* CIF NEXTSTATE (1257, 505), (70, 35) */
NEXTSTATE wait; NEXTSTATE wait;
/* CIF INPUT (1288, 255), (104, 35) */ /* CIF INPUT (1429, 255), (104, 35) */
INPUT mytimer; INPUT mytimer;
/* CIF NEXTSTATE (1289, 305), (102, 35) */ /* CIF NEXTSTATE (1430, 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