Commit 463b5885 authored by Maxime Perrotin's avatar Maxime Perrotin

Complete bi-directional GUI support

parent 11d21919
...@@ -47,7 +47,6 @@ void @_LOWER:Parent_Function_@_@_LOWER:Name_@ ...@@ -47,7 +47,6 @@ void @_LOWER:Parent_Function_@_@_LOWER:Name_@
@@END_IF@@ @@END_IF@@
@@END_TABLE@@ @@END_TABLE@@
@@IF@@ @_Language_@ /= GUI
// Declare user code function as external (it may not have a .h if it is in Ada) // Declare user code function as external (it may not have a .h if it is in Ada)
extern void @_LOWER:Parent_Function_@_PI_@_LOWER:Name_@ extern void @_LOWER:Parent_Function_@_PI_@_LOWER:Name_@
@@INLINE( \()(,\n )(\);\n)@@ @@INLINE( \()(,\n )(\);\n)@@
...@@ -71,7 +70,6 @@ void @_LOWER:Parent_Function_@_@_LOWER:Name_@ ...@@ -71,7 +70,6 @@ void @_LOWER:Parent_Function_@_@_LOWER:Name_@
@@END_IF@@ @@END_IF@@
@@END_TABLE@@ @@END_TABLE@@
@@END_INLINE@@ @@END_INLINE@@
@@END_IF@@
@@TABLE@@ @@-- encode output parameters @@TABLE@@ @@-- encode output parameters
@@IF@@ @_Param_Directions_@ = "PARAM_OUT" @@IF@@ @_Param_Directions_@ = "PARAM_OUT"
......
/* CIF PROCESS (250, 150), (150, 75) */ /* CIF PROCESS (250, 150), (150, 75) */
process Obsw; process Obsw;
/* CIF TEXT (504, 123), (282, 153) */ /* CIF TEXT (673, 123), (291, 153) */
-- Text area for declarations and comments -- Text area for declarations and comments
dcl p t_boolean; dcl p t_boolean;
...@@ -9,40 +9,42 @@ process Obsw; ...@@ -9,40 +9,42 @@ process Obsw;
dcl p2 t_boolean; dcl p2 t_boolean;
/* CIF ENDTEXT */ /* CIF ENDTEXT */
/* CIF START (320, 10), (70, 35) */ /* CIF START (341, 10), (70, 35) */
START; START;
/* CIF PROCEDURECALL (248, 65), (213, 35) */ /* CIF PROCEDURECALL (265, 65), (222, 35) */
call writeln ('[SDL] OBSW Startup'); call writeln ('[SDL] OBSW Startup');
/* CIF NEXTSTATE (320, 115), (70, 35) */ /* CIF NEXTSTATE (341, 115), (70, 35) */
NEXTSTATE Wait; NEXTSTATE Wait;
/* CIF state (320, 115), (70, 35) */ /* CIF state (471, 10), (70, 35) */
state Wait; state Wait;
/* CIF input (124, 170), (78, 35) */ endstate;
/* CIF state (341, 115), (70, 35) */
state Wait;
/* CIF input (145, 170), (78, 35) */
input Run(p); input Run(p);
/* CIF output (119, 225), (86, 35) */ /* CIF PROCEDURECALL (0, 225), (369, 35) */
call writeln('[SDL] Got RUN from the GUI with value: ', p);
/* CIF output (139, 275), (89, 35) */
output Result(42); output Result(42);
/* CIF NEXTSTATE (128, 275), (70, 35) */ /* CIF NEXTSTATE (149, 325), (70, 35) */
NEXTSTATE wait; NEXTSTATE wait;
/* CIF input (369, 170), (70, 35) */ /* CIF input (531, 170), (70, 35) */
input Pulse; input Pulse;
/* CIF PROCEDURECALL (341, 225), (125, 35) */ /* CIF PROCEDURECALL (501, 225), (129, 35) */
call guidance (inp, p); call guidance (inp, p);
/* CIF PROCEDURECALL (313, 275), (181, 35) */ /* CIF PROCEDURECALL (471, 275), (189, 35) */
call writeln('[SDL] Result: ', p); call writeln('[SDL] Result: ', p);
/* CIF task (291, 330), (224, 35) */ /* CIF task (448, 330), (236, 35) */
task inp := if inp = 42 then 0 else 42 fi; task inp := if inp = 42 then 0 else 42 fi;
/* CIF PROCEDURECALL (331, 385), (145, 35) */ /* CIF PROCEDURECALL (493, 385), (145, 35) */
call Get_Pro_Data (p2); call Get_Pro_Data (p2);
/* CIF PROCEDURECALL (217, 435), (374, 35) */ /* CIF PROCEDURECALL (379, 435), (374, 35) */
call writeln('[SDL] Protected call result: ', p2); call writeln('[SDL] Protected call result: ', p2);
/* CIF output (355, 490), (98, 35) */ /* CIF output (517, 490), (98, 35) */
output Result(inp); output Result(inp);
/* CIF output (345, 545), (116, 35) */ /* CIF output (505, 545), (120, 35) */
output Gnc_Async (42); output Gnc_Async (42);
/* CIF NEXTSTATE (369, 595), (70, 35) */ /* CIF NEXTSTATE (531, 595), (70, 35) */
NEXTSTATE wait; NEXTSTATE wait;
endstate; endstate;
/* CIF state (450, 10), (70, 35) */
state Wait;
endstate;
endprocess Obsw; endprocess Obsw;
\ 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