Commit 1fe01443 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add testcase

parent 955fa303
TASTE-BasicTypes DEFINITIONS ::=
BEGIN
T-UInt32 ::= INTEGER (0..4294967295)
TASTE-Peek-id ::= INTEGER (0..4294967295)
TASTE-Peek-id-list ::= SEQUENCE (SIZE (1..10)) OF TASTE-Peek-id
FixedIntList ::= SEQUENCE (SIZE(3)) OF TASTE-Peek-id
MyEnum ::= ENUMERATED {one, two, three, four, five}
END
/* CIF PROCESS (295, 56), (150, 75) */
PROCESS orchestrator
/* CIF COMMENT (405, 192), (71, 35) */
COMMENT 'Hello';
/* CIF TEXT (0, 94), (398, 312) */
dcl seq tastE_Peek_id_list := { 1,2,3,4,5};
dcl a myEnum;
dcl fixed fixedIntList := { 1,2,3};
dcl anInt T_UInt32 :=0;
timer myTimer;
/* CIF ENDTEXT */
/* CIF START (708, 150), (80, 36) */
START;
/* CIF NEXTSTATE (713, 201), (68, 34) */
NEXTSTATE Wait;
/* CIF STATE (957, 345), (70, 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;
/* CIF INPUT (965, 180), (122, 35) */
INPUT Paramless_TC;
/* CIF PROCEDURECALL (926, 230), (200, 35) */
CALL SET_timer(1000, mytimer);
/* CIF NEXTSTATE (991, 280), (70, 35) */
NEXTSTATE next;
ENDSTATE;
/* CIF STATE (713, 201), (68, 34) */
STATE Wait;
/* CIF INPUT (461, 255), (87, 35) */
INPUT pulse(a);
/* CIF TASK (434, 305), (139, 40) */
TASK seq := {0,1,0,1,0},
anint := 478;
/* CIF PROCEDURECALL (407, 365), (193, 35) */
CALL externalProc(anint, anint);
/* CIF OUTPUT (447, 415), (114, 35) */
OUTPUT telemetry(a);
/* CIF OUTPUT (442, 465), (123, 35) */
OUTPUT peek_list(seq);
/* CIF OUTPUT (431, 515), (145, 35) */
OUTPUT peek_fixed(fixed);
/* CIF NEXTSTATE (469, 565), (70, 35) */
NEXTSTATE next;
/* CIF INPUT (652, 255), (122, 35) */
INPUT Paramless_TC;
/* CIF PROCEDURECALL (610, 305), (205, 35) */
CALL writeln('Got Paramless TC');
/* CIF PROCEDURECALL (613, 355), (200, 35) */
CALL SET_timer(1000, mytimer);
/* CIF OUTPUT (650, 405), (125, 35) */
OUTPUT Paramless_TM;
/* CIF NEXTSTATE (678, 455), (70, 35) */
NEXTSTATE wait;
/* CIF INPUT (826, 255), (90, 35) */
INPUT mytimer;
/* CIF NEXTSTATE (826, 305), (90, 35) */
NEXTSTATE Timeout;
ENDSTATE;
ENDPROCESS orchestrator;
\ No newline at end of file
stop if a = two
stop if state = timeout
/* CIF Keep Specific Geode ASNFilename 'dataview-uniq.asn' */
USE Datamodel;
SYSTEM orchestrator;
SIGNAL pulse(myenum);
SIGNAL telemetry(myenum);
SIGNAL peek_list(taste_peek_id_list);
SIGNAL peek_fixed(fixedintlist);
SIGNAL Paramless_TC;
SIGNAL Paramless_TM;
PROCEDURE ExternalProc;
FPAR
IN gnc_output T_UInt32,
IN/OUT gnc_input T_UInt32;
EXTERNAL;
CHANNEL c
FROM ENV TO orchestrator WITH pulse, Paramless_TC;
FROM orchestrator TO ENV WITH telemetry, peek_list, peek_fixed, Paramless_TM;
ENDCHANNEL;
BLOCK orchestrator;
SIGNALROUTE r
FROM ENV TO orchestrator WITH pulse, Paramless_TC;
FROM orchestrator TO ENV WITH telemetry, peek_list, peek_fixed, Paramless_TM;
CONNECT c and r;
PROCESS orchestrator REFERENCED;
ENDBLOCK;
ENDSYSTEM;
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