Commit dd07b9ea authored by jdelange's avatar jdelange
Browse files

* ocarina/src/backends/ocarina-backends-properties.adb

   - Update properties definition according to updated
     ARINC653 annex


git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@4616 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 5a6d93a7
...@@ -428,6 +428,9 @@ package body Ocarina.Backends.Properties is ...@@ -428,6 +428,9 @@ package body Ocarina.Backends.Properties is
ARINC653_Memory_Kind_Data_Name : Name_Id; ARINC653_Memory_Kind_Data_Name : Name_Id;
ARINC653_Actions_Name : Name_Id; ARINC653_Actions_Name : Name_Id;
ARINC653_Module_Recovery_Actions_Name : Name_Id;
ARINC653_Partition_Recovery_Actions_Name : Name_Id;
ARINC653_Process_Recovery_Actions_Name : Name_Id;
ARINC653_Action_Ignore_Name : Name_Id; ARINC653_Action_Ignore_Name : Name_Id;
ARINC653_Action_Confirm_Name : Name_Id; ARINC653_Action_Confirm_Name : Name_Id;
ARINC653_Action_Partition_Stop_Name : Name_Id; ARINC653_Action_Partition_Stop_Name : Name_Id;
...@@ -436,8 +439,12 @@ package body Ocarina.Backends.Properties is ...@@ -436,8 +439,12 @@ package body Ocarina.Backends.Properties is
ARINC653_Action_Process_Stop_And_Start_Other_Name : Name_Id; ARINC653_Action_Process_Stop_And_Start_Other_Name : Name_Id;
ARINC653_Action_Process_Restart_Name : Name_Id; ARINC653_Action_Process_Restart_Name : Name_Id;
ARINC653_Action_Partition_Restart_Name : Name_Id; ARINC653_Action_Partition_Restart_Name : Name_Id;
ARINC653_Action_Cold_Restart_Name : Name_Id;
ARINC653_Action_Warm_Restart_Name : Name_Id;
ARINC653_Action_Module_Restart_Name : Name_Id; ARINC653_Action_Module_Restart_Name : Name_Id;
ARINC653_Action_Nothing_Name : Name_Id; ARINC653_Action_Nothing_Name : Name_Id;
ARINC653_Action_Reset_Name : Name_Id;
ARINC653_Action_Stop_Name : Name_Id;
ARINC653_Errors_Name : Name_Id; ARINC653_Errors_Name : Name_Id;
ARINC653_Error_Module_Init_Name : Name_Id; ARINC653_Error_Module_Init_Name : Name_Id;
...@@ -3299,6 +3306,14 @@ package body Ocarina.Backends.Properties is ...@@ -3299,6 +3306,14 @@ package body Ocarina.Backends.Properties is
ARINC653_Actions_Name ARINC653_Actions_Name
:= Get_String_Name ("arinc653::hm_actions"); := Get_String_Name ("arinc653::hm_actions");
ARINC653_Module_Recovery_Actions_Name
:= Get_String_Name ("arinc653::hm_module_recovery_actions");
ARINC653_Partition_Recovery_Actions_Name
:= Get_String_Name
("arinc653::hm_partition_recovery_actions");
ARINC653_Process_Recovery_Actions_Name
:= Get_String_Name
("arinc653::hm_process_recovery_actions");
ARINC653_Action_Ignore_Name ARINC653_Action_Ignore_Name
:= Get_String_Name ("ignore"); := Get_String_Name ("ignore");
ARINC653_Action_Confirm_Name ARINC653_Action_Confirm_Name
...@@ -3313,10 +3328,18 @@ package body Ocarina.Backends.Properties is ...@@ -3313,10 +3328,18 @@ package body Ocarina.Backends.Properties is
:= Get_String_Name ("proces_stop_and_start_another"); := Get_String_Name ("proces_stop_and_start_another");
ARINC653_Action_Process_Restart_Name ARINC653_Action_Process_Restart_Name
:= Get_String_Name ("process_restart"); := Get_String_Name ("process_restart");
ARINC653_Action_Warm_Restart_Name
:= Get_String_Name ("warm_restart");
ARINC653_Action_Cold_Restart_Name
:= Get_String_Name ("cold_restart");
ARINC653_Action_Partition_Restart_Name ARINC653_Action_Partition_Restart_Name
:= Get_String_Name ("partition_restart"); := Get_String_Name ("partition_restart");
ARINC653_Action_Module_Restart_Name ARINC653_Action_Module_Restart_Name
:= Get_String_Name ("module_restart"); := Get_String_Name ("module_restart");
ARINC653_Action_Reset_Name
:= Get_String_Name ("reset");
ARINC653_Action_Stop_Name
:= Get_String_Name ("stop");
ARINC653_Action_Nothing_Name ARINC653_Action_Nothing_Name
:= Get_String_Name ("nothing"); := Get_String_Name ("nothing");
...@@ -4249,7 +4272,7 @@ package body Ocarina.Backends.Properties is ...@@ -4249,7 +4272,7 @@ package body Ocarina.Backends.Properties is
function Get_ARINC653_HM_Actions (E : Node_Id) function Get_ARINC653_HM_Actions (E : Node_Id)
return ARINC653_Actions return ARINC653_Actions
is is
L : List_Id; L : List_Id := No_List;
P : Node_Id; P : Node_Id;
begin begin
if Is_Defined_Property (E, ARINC653_Actions_Name) then if Is_Defined_Property (E, ARINC653_Actions_Name) then
...@@ -4259,6 +4282,30 @@ package body Ocarina.Backends.Properties is ...@@ -4259,6 +4282,30 @@ package body Ocarina.Backends.Properties is
In_Mode => No_Name); In_Mode => No_Name);
L := Multi_Value (AIN.Property_Association_Value (P)); L := Multi_Value (AIN.Property_Association_Value (P));
elsif Is_Defined_Property (E, ARINC653_Module_Recovery_Actions_Name) then
P := AIEP.Find_Property_Association_From_Name
(Property_List => AIN.Properties (E),
Property_Name => ARINC653_Module_Recovery_Actions_Name,
In_Mode => No_Name);
L := Multi_Value (AIN.Property_Association_Value (P));
elsif Is_Defined_Property (E, ARINC653_Partition_Recovery_Actions_Name) then
P := AIEP.Find_Property_Association_From_Name
(Property_List => AIN.Properties (E),
Property_Name => ARINC653_Partition_Recovery_Actions_Name,
In_Mode => No_Name);
L := Multi_Value (AIN.Property_Association_Value (P));
elsif Is_Defined_Property (E, ARINC653_Process_Recovery_Actions_Name) then
P := AIEP.Find_Property_Association_From_Name
(Property_List => AIN.Properties (E),
Property_Name => ARINC653_Process_Recovery_Actions_Name,
In_Mode => No_Name);
L := Multi_Value (AIN.Property_Association_Value (P));
else
L := No_List;
end if;
if ATNU.Is_Empty (L) then if ATNU.Is_Empty (L) then
return ARINC653_Empty_Actions; return ARINC653_Empty_Actions;
...@@ -4289,15 +4336,27 @@ package body Ocarina.Backends.Properties is ...@@ -4289,15 +4336,27 @@ package body Ocarina.Backends.Properties is
elsif ATN.Name (ATN.Identifier (S)) = elsif ATN.Name (ATN.Identifier (S)) =
ARINC653_Action_Partition_Restart_Name then ARINC653_Action_Partition_Restart_Name then
Handled_Actions (I) := ARINC653_Action_Partition_Restart; Handled_Actions (I) := ARINC653_Action_Partition_Restart;
elsif ATN.Name (ATN.Identifier (S)) =
ARINC653_Action_Warm_Restart_Name then
Handled_Actions (I) := ARINC653_Action_Partition_Restart;
elsif ATN.Name (ATN.Identifier (S)) =
ARINC653_Action_Cold_Restart_Name then
Handled_Actions (I) := ARINC653_Action_Partition_Restart;
elsif ATN.Name (ATN.Identifier (S)) = elsif ATN.Name (ATN.Identifier (S)) =
ARINC653_Action_Partition_Stop_Name then ARINC653_Action_Partition_Stop_Name then
Handled_Actions (I) := ARINC653_Action_Partition_Stop; Handled_Actions (I) := ARINC653_Action_Partition_Stop;
elsif ATN.Name (ATN.Identifier (S)) = elsif ATN.Name (ATN.Identifier (S)) =
ARINC653_Action_Module_Stop_Name then ARINC653_Action_Module_Stop_Name then
Handled_Actions (I) := ARINC653_Action_Module_Stop; Handled_Actions (I) := ARINC653_Action_Module_Stop;
elsif ATN.Name (ATN.Identifier (S)) =
ARINC653_Action_Stop_Name then
Handled_Actions (I) := ARINC653_Action_Module_Stop;
elsif ATN.Name (ATN.Identifier (S)) = elsif ATN.Name (ATN.Identifier (S)) =
ARINC653_Action_Module_Restart_Name then ARINC653_Action_Module_Restart_Name then
Handled_Actions (I) := ARINC653_Action_Module_Restart; Handled_Actions (I) := ARINC653_Action_Module_Restart;
elsif ATN.Name (ATN.Identifier (S)) =
ARINC653_Action_Reset_Name then
Handled_Actions (I) := ARINC653_Action_Module_Restart;
elsif ATN.Name (ATN.Identifier (S)) = elsif ATN.Name (ATN.Identifier (S)) =
ARINC653_Action_Nothing_Name then ARINC653_Action_Nothing_Name then
Handled_Actions (I) := ARINC653_Action_Nothing; Handled_Actions (I) := ARINC653_Action_Nothing;
...@@ -4308,9 +4367,6 @@ package body Ocarina.Backends.Properties is ...@@ -4308,9 +4367,6 @@ package body Ocarina.Backends.Properties is
return Handled_Actions; return Handled_Actions;
end; end;
end if; end if;
end if;
return ARINC653_Empty_Actions;
end Get_ARINC653_HM_Actions; end Get_ARINC653_HM_Actions;
--------------------- ---------------------
......
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