Commit 229b8dad authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

(as per Maxime) remove auto-generated files.

parent 97606fb5
-- This file was generated automatically: DO NOT MODIFY IT !
with System.IO;
use System.IO;
with TASTE_BasicTypes;
use TASTE_BasicTypes;
with VEGA;
use VEGA;
with adaasn1rtl;
use adaasn1rtl;
with Interfaces;
use Interfaces;
package body flight is
l_vesat : aliased asn1SccGNC_OUTPUT_VESAT_INPUT;
l_cmd : aliased asn1SccSimulation_Param;
l_data_in : aliased asn1SccGNC_INPUT_VESAT_OUTPUT;
type states is (START, running, wait);
state : states := START;
function get_state return String;
pragma export(C, get_state, "flight_state");
procedure runTransition(trId: Integer);
procedure pulse is
begin
case state is
when running =>
runTransition(5);
when wait =>
runTransition(1);
when others =>
null;
end case;
end pulse;
procedure run_gnc(gnc_input: access asn1SccGNC_INPUT_VESAT_OUTPUT) is
begin
case state is
when running =>
l_data_in := gnc_input.all;
runTransition(7);
when wait =>
l_data_in := gnc_input.all;
runTransition(3);
when others =>
null;
end case;
end run_gnc;
procedure simulate(cmd: access asn1SccSimulation_Param) is
begin
case state is
when running =>
l_cmd := cmd.all;
runTransition(6);
when wait =>
l_cmd := cmd.all;
runTransition(2);
when others =>
null;
end case;
end simulate;
procedure timeout is
begin
case state is
when running =>
runTransition(4);
when wait =>
runTransition(1);
when others =>
null;
end case;
end timeout;
procedure runTransition(trId: Integer) is
tmp6 : aliased asn1SccT_Uint32;
tmp9 : aliased asn1SccGNC_OUTPUT_VESAT_INPUT;
tmp13 : aliased asn1SccGNC_OUTPUT_VESAT_INPUT;
tmp19 : aliased asn1SccGNC_OUTPUT_VESAT_INPUT;
tmp23 : aliased asn1SccGNC_OUTPUT_VESAT_INPUT;
begin
case trId is
when 0 =>
-- PROCEDURE_CALL writeln('[Flight] Startup') (19,5)
Put_Line("[Flight] Startup");
-- NEXT_STATE Wait (21,10) at 170, 58
state := Wait;
return;
when 1 =>
-- NEXT_STATE - (31,10) at 298, 62
return;
when 2 =>
-- PROCEDURE_CALL writeln
-- ('[Flight] Received Simulate command') (36,5)
Put_Line("[Flight] Received Simulate command");
-- PROCEDURE_CALL set_timer(5000, timeout) (39,5)
tmp6 := 5000;
SET_timeout(tmp6'access);
-- OUTPUT run_vesat(vesat) (41,7)
tmp9 := l_vesat;
run_vesat(tmp9'access);
-- NEXT_STATE running (43,10) at 457, 212
state := running;
return;
when 3 =>
-- PROCEDURE_CALL writeln
-- ('[Flight] Received run_gnc') (48,5)
Put_Line("[Flight] Received run_gnc");
-- OUTPUT run_vesat(vesat) (51,7)
tmp13 := l_vesat;
run_vesat(tmp13'access);
-- NEXT_STATE running (53,10) at 672, 162
state := running;
return;
when 4 =>
-- PROCEDURE_CALL writeln('[Flight] timeout') (64,5)
Put_Line("[Flight] timeout");
-- NEXT_STATE wait (66,10) at -73, 411
state := wait;
return;
when 5 =>
-- NEXT_STATE - (70,10) at 57, 363
return;
when 6 =>
-- PROCEDURE_CALL writeln('[flight] Got Simulate while running') (74,5)
Put_Line("[flight] Got Simulate while running");
-- OUTPUT run_vesat(vesat) (76,7)
tmp19 := l_vesat;
run_vesat(tmp19'access);
-- NEXT_STATE - (78,10) at 235, 461
return;
when 7 =>
-- PROCEDURE_CALL writeln
-- ('[Flight] Received run_gnc while running..stopping') (82,5)
Put_Line("[Flight] Received run_gnc while running..stopping");
-- OUTPUT run_vesat(vesat) (85,7)
tmp23 := l_vesat;
run_vesat(tmp23'access);
-- NEXT_STATE wait (87,10) at 525, 461
state := wait;
return;
when others =>
null;
end case;
end runTransition;
function get_state return String is
begin
return states'Image(state);
end get_state;
begin
runTransition(0);
end flight;
\ No newline at end of file
-- This file was generated automatically: DO NOT MODIFY IT !
with TASTE_BasicTypes;
use TASTE_BasicTypes;
with VEGA;
use VEGA;
package flight is
-- Provided interface "pulse"
procedure pulse;
-- Provided interface "run_gnc"
procedure run_gnc(gnc_input: access asn1SccGNC_INPUT_VESAT_OUTPUT);
-- Provided interface "simulate"
procedure simulate(cmd: access asn1SccSimulation_Param);
-- Provided interface "timeout"
procedure timeout;
-- Required interface "run_vesat"
procedure run_vesat(gnc_output: access asn1SccGNC_OUTPUT_VESAT_INPUT);
pragma import(C, run_vesat, "flight_RI_run_vesat");
-- Timer timeout SET and RESET functions
procedure SET_timeout(val: access asn1SccT_UInt32);
pragma import(C, SET_timeout, "flight_RI_set_timeout");
procedure RESET_timeout;
pragma import(C, RESET_timeout, "flight_RI_reset_timeout");
end flight;
\ 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