obsw.pr 1.78 KB
Newer Older
1 2
/* CIF PROCESS (250, 150), (150, 75) */
process Obsw;
3
    /* CIF TEXT (673, 123), (291, 153) */
4 5 6
    -- Text area for declarations and comments
    
    dcl p t_boolean;
Maxime Perrotin's avatar
Maxime Perrotin committed
7 8
    
    dcl inp t_uint32 := 42;
9 10
    
    dcl p2 t_boolean;
11
    /* CIF ENDTEXT */
12
    /* CIF START (341, 10), (70, 35) */
13
    START;
14
        /* CIF PROCEDURECALL (265, 65), (222, 35) */
15
        call writeln ('[SDL] OBSW Startup');
16
        /* CIF NEXTSTATE (341, 115), (70, 35) */
17
        NEXTSTATE Wait;
18
    /* CIF state (471, 10), (70, 35) */
19
    state Wait;
20 21 22 23
    endstate;
    /* CIF state (341, 115), (70, 35) */
    state Wait;
        /* CIF input (145, 170), (78, 35) */
24
        input Run(p);
25 26 27
            /* CIF PROCEDURECALL (0, 225), (369, 35) */
            call writeln('[SDL] Got RUN from the GUI with value: ', p);
            /* CIF output (139, 275), (89, 35) */
28
            output Result(42);
29
            /* CIF NEXTSTATE (149, 325), (70, 35) */
30
            NEXTSTATE wait;
31
        /* CIF input (531, 170), (70, 35) */
32
        input Pulse;
33
            /* CIF PROCEDURECALL (501, 225), (129, 35) */
Maxime Perrotin's avatar
Maxime Perrotin committed
34
            call guidance (inp, p);
35
            /* CIF PROCEDURECALL (471, 275), (189, 35) */
Maxime Perrotin's avatar
Maxime Perrotin committed
36
            call writeln('[SDL] Result: ', p);
37
            /* CIF task (448, 330), (236, 35) */
Maxime Perrotin's avatar
Maxime Perrotin committed
38
            task inp := if inp = 42 then 0 else 42 fi;
39
            /* CIF PROCEDURECALL (493, 385), (145, 35) */
40
            call Get_Pro_Data (p2);
41
            /* CIF PROCEDURECALL (379, 435), (374, 35) */
42
            call writeln('[SDL] Protected call result: ', p2);
43
            /* CIF output (517, 490), (98, 35) */
44
            output Result(inp);
45
            /* CIF output (505, 545), (120, 35) */
Maxime Perrotin's avatar
Maxime Perrotin committed
46
            output Gnc_Async (42);
47
            /* CIF NEXTSTATE (531, 595), (70, 35) */
48 49 50
            NEXTSTATE wait;
    endstate;
endprocess Obsw;