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

Simplify code/model

parent 068580be
......@@ -13,11 +13,6 @@ with GSER;
package body Properties is
procedure Check_Queue (Res : out asn1Boolean) is
begin
Res := False;
end Check_Queue;
procedure Update_State (Full_State : in out State_With_Observers;
Application_State : asn1SccSystem_State) is
begin
......
......@@ -36,10 +36,6 @@ package Properties is
(User_State => asn1sccSystem_State_Init,
My_Observer_State => My_Observer.Ctxt);
-- there are continuous signals in the observers, we need check_queue
procedure Check_Queue (Res : out asn1Boolean);
pragma Export (C, Check_Queue, "my_observer_check_queue");
procedure My_Properties (Full_State : in out State_With_Observers;
Event : in out asn1sccObservable_Event;
Id : out Natural;
......
......@@ -25,7 +25,7 @@ observe;
dcl count T_Int renames st.orchestrator.counter;
/* CIF ENDTEXT */
/* CIF procedure (1256, 63), (70, 35) */
/* CIF procedure (1253, 63), (70, 35) */
procedure observe;
/* CIF TEXT (38, 48), (313, 72) */
-- this procedure could be generated automatically,
......@@ -42,21 +42,9 @@ observe;
call writeln ('observer init');
/* CIF NEXTSTATE (426, 183), (83, 35) */
NEXTSTATE first_state;
/* CIF state (1015, 111), (101, 35) */
state second_state;
/* CIF provided (963, 168), (241, 35) */
provided st.orchestrator.magic_number = 42;
/* CIF PROCEDURECALL (904, 223), (359, 35) */
call writeln ('[observer] step 2 passed (magic_number =42)');
/* CIF NEXTSTATE (1033, 273), (101, 35) */
NEXTSTATE third_state;
endstate;
/* CIF state (118, 218), (95, 35) */
state end_success;
endstate;
/* CIF state (1139, 316), (88, 35) */
/* CIF state (920, 371), (88, 35) */
state third_state;
/* CIF provided (1104, 371), (341, 136) */
/* CIF provided (437, 426), (341, 136) */
provided event =
output_event : {
source orchestrator,
......@@ -64,30 +52,37 @@ output_event : {
event orchestrator: msg_out : paramesstogui : {}
};
priority 2;
/* CIF PROCEDURECALL (1186, 538), (176, 35) */
/* CIF PROCEDURECALL (520, 593), (176, 35) */
call writeln ('SUCCESS(1)');
/* CIF NEXTSTATE (1226, 593), (95, 35) */
NEXTSTATE end_success;
/* CIF provided (528, 371), (525, 104) */
provided present(event) = output_event
and then event.output_event.dest = simulator_gui
and then present(event.output_event.event) = orchestrator
and then present(event.output_event.event.orchestrator.msg_out) = paramesstogui;
priority 3;
/* CIF PROCEDURECALL (703, 506), (176, 35) */
call writeln ('SUCCESS(2)');
/* CIF NEXTSTATE (743, 561), (95, 35) */
/* CIF NEXTSTATE (560, 648), (95, 35) */
NEXTSTATE end_success;
/* CIF provided (1448, 371), (268, 40) */
provided output paramesstogui from orchestrator;
/* CIF provided (789, 426), (173, 56) */
provided output paramesstogui
from orchestrator;
priority 1;
/* CIF NEXTSTATE (1535, 431), (95, 40) */
/* CIF NEXTSTATE (828, 513), (95, 40) */
NEXTSTATE end_success;
/* CIF provided (972, 426), (182, 35) */
provided st.orchestrator.state = wait;
/* CIF NEXTSTATE (1016, 481), (95, 35) */
NEXTSTATE end_success;
endstate;
/* CIF state (115, 218), (95, 35) */
state end_success;
endstate;
/* CIF state (819, 86), (101, 35) */
state second_state;
/* CIF provided (751, 141), (241, 35) */
provided st.orchestrator.magic_number = 42;
/* CIF PROCEDURECALL (692, 196), (359, 35) */
call writeln ('[observer] step 2 passed (magic_number =42)');
/* CIF NEXTSTATE (821, 246), (101, 35) */
NEXTSTATE third_state;
endstate;
/* CIF state (426, 183), (83, 35) */
state first_state;
/* CIF provided (364, 239), (208, 35) */
provided st.orchestrator.counter = 3;
/* CIF provided (418, 239), (100, 35) */
provided count = 3;
/* CIF PROCEDURECALL (317, 294), (300, 35) */
call writeln ('[observer] step 1 passed (counter=3)');
/* CIF NEXTSTATE (417, 349), (101, 35) */
......
Supports Markdown
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