Commit 7f26a5d3 authored by yoogx's avatar yoogx
Browse files

Merge branch 'master' of https://github.com/OpenAADL/ocarina

parents ae1d29ba 6887e156
...@@ -1365,10 +1365,22 @@ package body Ocarina.Backends.C_Common.Mapping is ...@@ -1365,10 +1365,22 @@ package body Ocarina.Backends.C_Common.Mapping is
------------------------- -------------------------
function Map_Scade_Parameter (Parameter : Node_Id) return Node_Id is function Map_Scade_Parameter (Parameter : Node_Id) return Node_Id is
Scade_Name : Name_Id;
begin begin
Get_Name_String (Get_Scade_Signal (Parameter)); Scade_Name := Get_Scade_Signal (Parameter);
return CTU.Make_Defining_Identifier (Name_Find, C_Conversion => False); if Scade_Name = No_Name then
Scade_Name := Get_Source_Name (Parameter);
end if;
if Scade_Name = No_Name then
Display_Located_Error
(AIN.Loc (Parameter),
"The Parameter does not specify a SCADE mapping",
Fatal => True);
end if;
return CTU.Make_Defining_Identifier (Scade_Name, C_Conversion => False);
end Map_Scade_Parameter; end Map_Scade_Parameter;
---------------------- ----------------------
...@@ -2445,8 +2457,8 @@ package body Ocarina.Backends.C_Common.Mapping is ...@@ -2445,8 +2457,8 @@ package body Ocarina.Backends.C_Common.Mapping is
when Subprogram_Simulink => when Subprogram_Simulink =>
Add_Include Add_Include
(Make_Include_Clause (Make_Include_Clause
(Make_Defining_Identifier (Get_Source_Name (S), False), (Make_Defining_Identifier (Get_Source_Name (S), True),
False), True),
True); True);
if not AINU.Is_Empty (Features (S)) then if not AINU.Is_Empty (Features (S)) then
...@@ -2528,7 +2540,7 @@ package body Ocarina.Backends.C_Common.Mapping is ...@@ -2528,7 +2540,7 @@ package body Ocarina.Backends.C_Common.Mapping is
when Subprogram_Scade => when Subprogram_Scade =>
Add_Include Add_Include
(Make_Include_Clause (Map_Scade_Function_Name (S)), (Make_Include_Clause (Map_Scade_Function_Name (S), True),
Preserve_Case => True); Preserve_Case => True);
-- At first, we declare structures used as parameters -- At first, we declare structures used as parameters
-- for SCADE functions. So, if the subprograms has IN -- for SCADE functions. So, if the subprograms has IN
......
...@@ -177,8 +177,8 @@ package body Ocarina.Backends.Deos_Conf.Schedule is ...@@ -177,8 +177,8 @@ package body Ocarina.Backends.Deos_Conf.Schedule is
-- For now, we assume the partition duration -- For now, we assume the partition duration
-- is in milliseconds. -- is in milliseconds.
-- --
Slot_Duration := To_Milliseconds Slot_Duration := To_Nanoseconds
(Module_Schedule (J).Duration) * 1_000_000; (Module_Schedule (J).Duration);
XTU.Add_Attribute ("Duration", XTU.Add_Attribute ("Duration",
Trim (Unsigned_Long_Long'Image Trim (Unsigned_Long_Long'Image
(Slot_Duration), Left), (Slot_Duration), Left),
......
-- with Locations; -- with Locations;
with Ada.Strings; use Ada.Strings;
with Ada.Strings.Fixed; use Ada.Strings.Fixed;
with Ocarina.Backends.Utils; with Ocarina.Backends.Utils;
with Ocarina.Namet; use Ocarina.Namet; with Ocarina.Namet; use Ocarina.Namet;
with Ocarina.ME_AADL; with Ocarina.ME_AADL;
...@@ -28,6 +32,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is ...@@ -28,6 +32,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is
Root_Node : Node_Id := No_Node; Root_Node : Node_Id := No_Node;
Connections_Node : Node_Id := No_Node; Connections_Node : Node_Id := No_Node;
Channel_Identifier : Unsigned_Long_Long := 0;
procedure Visit_Architecture_Instance (E : Node_Id); procedure Visit_Architecture_Instance (E : Node_Id);
procedure Visit_Component_Instance (E : Node_Id); procedure Visit_Component_Instance (E : Node_Id);
...@@ -133,6 +138,8 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is ...@@ -133,6 +138,8 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is
Push_Entity (P); Push_Entity (P);
Push_Entity (U); Push_Entity (U);
Channel_Identifier := 0;
Current_XML_Node := XTN.Root_Node (XTN.XML_File (U)); Current_XML_Node := XTN.Root_Node (XTN.XML_File (U));
Connections_Node := Make_XML_Node ("Connections"); Connections_Node := Make_XML_Node ("Connections");
...@@ -163,7 +170,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is ...@@ -163,7 +170,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is
procedure Visit_Virtual_Processor_Instance (E : Node_Id) is procedure Visit_Virtual_Processor_Instance (E : Node_Id) is
Corresponding_Process : Node_Id; Corresponding_Process : Node_Id;
Connection_Node : Node_Id; Channel_Node : Node_Id;
Source_Node : Node_Id; Source_Node : Node_Id;
Destination_Node : Node_Id; Destination_Node : Node_Id;
Feature : Node_Id; Feature : Node_Id;
...@@ -182,7 +189,12 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is ...@@ -182,7 +189,12 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is
Port_Destination := Item (First_Node (Destinations (Feature))); Port_Destination := Item (First_Node (Destinations (Feature)));
Partition_Destination := Parent_Component (Port_Destination); Partition_Destination := Parent_Component (Port_Destination);
Connection_Node := Make_XML_Node ("Connection"); Channel_Node := Make_XML_Node ("Channel");
Add_Attribute ("Id",
Trim (Unsigned_Long_Long'Image
(Channel_Identifier), Left),
Channel_Node);
Source_Node := Make_XML_Node ("Source"); Source_Node := Make_XML_Node ("Source");
Add_Attribute ("PartitionNameRef", Add_Attribute ("PartitionNameRef",
Get_Name_String Get_Name_String
...@@ -196,7 +208,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is ...@@ -196,7 +208,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is
Source_Node); Source_Node);
Append_Node_To_List (Source_Node, Append_Node_To_List (Source_Node,
XTN.Subitems (Connection_Node)); XTN.Subitems (Channel_Node));
Destination_Node := Make_XML_Node ("Destination"); Destination_Node := Make_XML_Node ("Destination");
Add_Attribute ("PortNameRef", Add_Attribute ("PortNameRef",
...@@ -213,9 +225,11 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is ...@@ -213,9 +225,11 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is
Destination_Node); Destination_Node);
Append_Node_To_List (Destination_Node, Append_Node_To_List (Destination_Node,
XTN.Subitems (Connection_Node)); XTN.Subitems (Channel_Node));
Append_Node_To_List (Connection_Node, Append_Node_To_List (Channel_Node,
XTN.Subitems (Connections_Node)); XTN.Subitems (Connections_Node));
Channel_Identifier := Channel_Identifier + 1;
end if; end if;
Feature := Next_Node (Feature); Feature := Next_Node (Feature);
end loop; end loop;
......
...@@ -232,10 +232,11 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is ...@@ -232,10 +232,11 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
Error_Id_Level_Node := Make_XML_Node ("ErrorIDLevel"); Error_Id_Level_Node := Make_XML_Node ("ErrorIDLevel");
XTU.Add_Attribute ("ErrorIdentifier", XTU.Add_Attribute ("ErrorIdentifier",
"HME_DEFAULT", "HME_DEFAULT",
System_State_Node); Error_Id_Level_Node);
XTU.Add_Attribute ("ErrorLevel", XTU.Add_Attribute ("ErrorLevel",
"HM_PARTITION_LVL", "HM_PARTITION_LVL",
System_State_Node); Error_Id_Level_Node);
Append_Node_To_List (Error_Id_Level_Node, Append_Node_To_List (Error_Id_Level_Node,
XTN.Subitems (System_State_Node)); XTN.Subitems (System_State_Node));
...@@ -249,10 +250,10 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is ...@@ -249,10 +250,10 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
Error_Id_Level_Node := Make_XML_Node ("ErrorIDLevel"); Error_Id_Level_Node := Make_XML_Node ("ErrorIDLevel");
XTU.Add_Attribute ("ErrorIdentifier", XTU.Add_Attribute ("ErrorIdentifier",
"HME_DEFAULT", "HME_DEFAULT",
System_State_Node); Error_Id_Level_Node);
XTU.Add_Attribute ("ErrorLevel", XTU.Add_Attribute ("ErrorLevel",
"HM_MODULE_LVL", "HM_MODULE_LVL",
System_State_Node); Error_Id_Level_Node);
Append_Node_To_List (Error_Id_Level_Node, Append_Node_To_List (Error_Id_Level_Node,
XTN.Subitems (System_State_Node)); XTN.Subitems (System_State_Node));
...@@ -265,9 +266,9 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is ...@@ -265,9 +266,9 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
Error_Id_Level_Node := Make_XML_Node ("ErrorIDLevel"); Error_Id_Level_Node := Make_XML_Node ("ErrorIDLevel");
XTU.Add_Attribute ("ErrorIdentifier", XTU.Add_Attribute ("ErrorIdentifier",
"HME_DEFAULT", System_State_Node); "HME_DEFAULT", Error_Id_Level_Node);
XTU.Add_Attribute ("ErrorLevel", XTU.Add_Attribute ("ErrorLevel",
"HM_PROCESS_LVL", System_State_Node); "HM_PROCESS_LVL", Error_Id_Level_Node);
Append_Node_To_List (Error_Id_Level_Node, Append_Node_To_List (Error_Id_Level_Node,
XTN.Subitems (System_State_Node)); XTN.Subitems (System_State_Node));
...@@ -277,20 +278,6 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is ...@@ -277,20 +278,6 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
XTU.Add_Attribute ("Name", "moduleHm", Module_HM_Table_Node); XTU.Add_Attribute ("Name", "moduleHm", Module_HM_Table_Node);
Append_Node_To_List (Module_HM_Table_Node, XTN.Subitems (HM_Node)); Append_Node_To_List (Module_HM_Table_Node, XTN.Subitems (HM_Node));
Settings_Node := Make_XML_Node ("Settings");
XTU.Add_Attribute ("maxQueueDepth", "34", Settings_Node);
XTU.Add_Attribute ("queueThreShold", "32", Settings_Node);
XTU.Add_Attribute ("stackSize", "16384", Settings_Node);
XTU.Add_Attribute ("maxLogEntries", "100", Settings_Node);
XTU.Add_Attribute ("logEntriesThreshold", "98", Settings_Node);
XTU.Add_Attribute ("attributeMask", "0x00000001", Settings_Node);
XTU.Add_Attribute ("notificationHandler", "", Settings_Node);
XTU.Add_Attribute ("notifMaxQueueDepth", "0", Settings_Node);
XTU.Add_Attribute ("eventFilterMask", "0x00000000", Settings_Node);
XTU.Add_Attribute ("maxErrorHandlerQueueDepth", "0", Settings_Node);
XTU.Add_Attribute ("errorHandlerQueueThreshold", "0", Settings_Node);
Append_Node_To_List (Settings_Node, XTN.Subitems (Module_HM_Table_Node));
System_State_Node := Make_XML_Node ("SystemState"); System_State_Node := Make_XML_Node ("SystemState");
Append_Node_To_List (System_State_Node, Append_Node_To_List (System_State_Node,
XTN.Subitems (Module_HM_Table_Node)); XTN.Subitems (Module_HM_Table_Node));
...@@ -299,7 +286,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is ...@@ -299,7 +286,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
Add_Error_Action (System_State_Node, Add_Error_Action (System_State_Node,
"HME_NUMERIC_ERROR", ""); "HME_NUMERIC_ERROR", "");
Add_Error_Action (System_State_Node, Add_Error_Action (System_State_Node,
"HME_POWER_FAIL", "hmDH_HME_POWER_FAILT"); "HME_POWER_FAIL", "hmDH_HME_POWER_FAIL");
Add_Error_Action (System_State_Node, Add_Error_Action (System_State_Node,
"HME_KERNEL", "hmDH_HME_KERNEL"); "HME_KERNEL", "hmDH_HME_KERNEL");
Add_Error_Action (System_State_Node, Add_Error_Action (System_State_Node,
...@@ -328,7 +315,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is ...@@ -328,7 +315,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
Add_Error_Action (System_State_Node, Add_Error_Action (System_State_Node,
"HME_HM_DEADLINE_MISSED", "hmDefaultHandler"); "HME_HM_DEADLINE_MISSED", "hmDefaultHandler");
Add_Error_Action (System_State_Node, Add_Error_Action (System_State_Node,
"HME_HM_MSG", "hmDH_EventLog"); "HM_MSG", "hmDH_EventLog");
Add_Error_Action (System_State_Node, Add_Error_Action (System_State_Node,
"HME_DEFAULT", "hmDefaultHandler"); "HME_DEFAULT", "hmDefaultHandler");
...@@ -347,6 +334,20 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is ...@@ -347,6 +334,20 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
end loop; end loop;
end if; end if;
Settings_Node := Make_XML_Node ("Settings");
XTU.Add_Attribute ("maxQueueDepth", "34", Settings_Node);
XTU.Add_Attribute ("queueThreshold", "32", Settings_Node);
XTU.Add_Attribute ("stackSize", "16384", Settings_Node);
XTU.Add_Attribute ("maxLogEntries", "100", Settings_Node);
XTU.Add_Attribute ("logEntriesThreshold", "98", Settings_Node);
XTU.Add_Attribute ("attributeMask", "0x00000001", Settings_Node);
XTU.Add_Attribute ("notificationHandler", "", Settings_Node);
XTU.Add_Attribute ("notifMaxQueueDepth", "0", Settings_Node);
XTU.Add_Attribute ("eventFilterMask", "0x00000000", Settings_Node);
XTU.Add_Attribute ("maxErrorHandlerQueueDepth", "0", Settings_Node);
XTU.Add_Attribute ("errorHandlerQueueThreshold", "0", Settings_Node);
Append_Node_To_List (Settings_Node, XTN.Subitems (Module_HM_Table_Node));
Pop_Entity; Pop_Entity;
Pop_Entity; Pop_Entity;
end Visit_Processor_Instance; end Visit_Processor_Instance;
...@@ -384,33 +385,9 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is ...@@ -384,33 +385,9 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
XTU.Add_Attribute ("Name", XTU.Add_Attribute ("Name",
Get_Name_String Get_Name_String
(Map_Partition_Name (Virtual_Processor)) (Map_Partition_Name (Virtual_Processor))
& "_hm", & "_hmtable",
Partition_HM_Table_Node); Partition_HM_Table_Node);
Settings_Node := Make_XML_Node ("Settings");
XTU.Add_Attribute ("maxQueueDepth", "34", Settings_Node);
XTU.Add_Attribute ("queueThreShold", "32", Settings_Node);
XTU.Add_Attribute ("stackSize", "16384", Settings_Node);
XTU.Add_Attribute ("maxLogEntries", "100", Settings_Node);
XTU.Add_Attribute ("logEntriesThreshold", "98", Settings_Node);
XTU.Add_Attribute ("attributeMask", "0x00000001", Settings_Node);
XTU.Add_Attribute ("notificationHandler", "", Settings_Node);
XTU.Add_Attribute ("notifMaxQueueDepth", "0", Settings_Node);
XTU.Add_Attribute ("eventFilterMask", "0xFFFFFFFF", Settings_Node);
XTU.Add_Attribute ("maxErrorHandlerQueueDepth", "128", Settings_Node);
XTU.Add_Attribute ("errorHandlerQueueThreshold", "126", Settings_Node);
Append_Node_To_List (Settings_Node,
XTN.Subitems (Partition_HM_Table_Node));
Trusted_Partition_Node := Make_XML_Node ("TrustedPartition");
XTU.Add_Attribute ("NameRef",
Get_Name_String
(Map_Partition_Name
(Virtual_Processor)),
Trusted_Partition_Node);
Append_Node_To_List (Trusted_Partition_Node,
XTN.Subitems (Settings_Node));
System_State_Node := Make_XML_Node ("SystemState"); System_State_Node := Make_XML_Node ("SystemState");
Append_Node_To_List (System_State_Node, Append_Node_To_List (System_State_Node,
XTN.Subitems (Partition_HM_Table_Node)); XTN.Subitems (Partition_HM_Table_Node));
...@@ -419,7 +396,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is ...@@ -419,7 +396,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
Add_Error_Action (System_State_Node, Add_Error_Action (System_State_Node,
"HME_NUMERIC_ERROR", ""); "HME_NUMERIC_ERROR", "");
Add_Error_Action (System_State_Node, Add_Error_Action (System_State_Node,
"HME_POWER_FAIL", "hmDH_HME_POWER_FAILT"); "HME_POWER_FAIL", "hmDH_HME_POWER_FAIL");
Add_Error_Action (System_State_Node, Add_Error_Action (System_State_Node,
"HME_KERNEL", "hmDH_HME_KERNEL"); "HME_KERNEL", "hmDH_HME_KERNEL");
Add_Error_Action (System_State_Node, Add_Error_Action (System_State_Node,
...@@ -448,9 +425,34 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is ...@@ -448,9 +425,34 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
Add_Error_Action (System_State_Node, Add_Error_Action (System_State_Node,
"HME_HM_DEADLINE_MISSED", "hmDefaultHandler"); "HME_HM_DEADLINE_MISSED", "hmDefaultHandler");
Add_Error_Action (System_State_Node, Add_Error_Action (System_State_Node,
"HME_HM_MSG", "hmDH_EventLog"); "HM_MSG", "hmDH_EventLog");
Add_Error_Action (System_State_Node, Add_Error_Action (System_State_Node,
"HME_DEFAULT", "hmDefaultHandler"); "HME_DEFAULT", "hmDefaultHandler");
Settings_Node := Make_XML_Node ("Settings");
XTU.Add_Attribute ("maxQueueDepth", "34", Settings_Node);
XTU.Add_Attribute ("queueThreshold", "32", Settings_Node);
XTU.Add_Attribute ("stackSize", "16384", Settings_Node);
XTU.Add_Attribute ("maxLogEntries", "100", Settings_Node);
XTU.Add_Attribute ("logEntriesThreshold", "98", Settings_Node);
XTU.Add_Attribute ("attributeMask", "0x00000001", Settings_Node);
XTU.Add_Attribute ("notificationHandler", "", Settings_Node);
XTU.Add_Attribute ("notifMaxQueueDepth", "0", Settings_Node);
XTU.Add_Attribute ("eventFilterMask", "0xFFFFFFFF", Settings_Node);
XTU.Add_Attribute ("maxErrorHandlerQueueDepth", "128", Settings_Node);
XTU.Add_Attribute ("errorHandlerQueueThreshold", "126", Settings_Node);
Append_Node_To_List (Settings_Node,
XTN.Subitems (Partition_HM_Table_Node));
Trusted_Partition_Node := Make_XML_Node ("TrustedPartition");
XTU.Add_Attribute ("NameRef",
Get_Name_String
(Map_Partition_Name
(Virtual_Processor)),
Trusted_Partition_Node);
Append_Node_To_List (Trusted_Partition_Node,
XTN.Subitems (Settings_Node));
return Partition_HM_Table_Node; return Partition_HM_Table_Node;
end Generate_Partition_HM_Table; end Generate_Partition_HM_Table;
......
...@@ -11,7 +11,7 @@ with Ocarina.ME_AADL.AADL_Instances.Entities; ...@@ -11,7 +11,7 @@ with Ocarina.ME_AADL.AADL_Instances.Entities;
with Ocarina.Backends.Utils; with Ocarina.Backends.Utils;
with Ocarina.Backends.Messages; with Ocarina.Backends.Messages;
with Ocarina.Backends.XML_Common.Mapping; -- with Ocarina.Backends.XML_Common.Mapping;
with Ocarina.Backends.XML_Values; with Ocarina.Backends.XML_Values;
with Ocarina.Backends.XML_Tree.Nodes; with Ocarina.Backends.XML_Tree.Nodes;
with Ocarina.Backends.XML_Tree.Nutils; with Ocarina.Backends.XML_Tree.Nutils;
...@@ -23,7 +23,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Mapping is ...@@ -23,7 +23,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Mapping is
use Ocarina.ME_AADL.AADL_Instances.Entities; use Ocarina.ME_AADL.AADL_Instances.Entities;
use Ocarina.Backends.Utils; use Ocarina.Backends.Utils;
use Ocarina.Backends.Messages; use Ocarina.Backends.Messages;
use Ocarina.Backends.XML_Common.Mapping; -- use Ocarina.Backends.XML_Common.Mapping;
use Ocarina.Backends.XML_Tree.Nodes; use Ocarina.Backends.XML_Tree.Nodes;
use Ocarina.Backends.XML_Tree.Nutils; use Ocarina.Backends.XML_Tree.Nutils;
...@@ -845,99 +845,6 @@ package body Ocarina.Backends.Vxworks653_Conf.Mapping is ...@@ -845,99 +845,6 @@ package body Ocarina.Backends.Vxworks653_Conf.Mapping is
end Map_Process_Scheduling; end Map_Process_Scheduling;
--------------
-- Map_Port --
--------------
function Map_Port (F : Node_Id) return Node_Id is
N : Node_Id;
P : Node_Id;
Q : Node_Id;
R : Node_Id;
begin
if AIN.Is_Event (F) and then AIN.Is_Data (F) then
N := Make_XML_Node ("Queueing_Port");
elsif AIN.Is_Data (F) and then not AIN.Is_Event (F) then
N := Make_XML_Node ("Sampling_Port");
else
return No_Node;
end if;
-- Add the direction of the port as attribute
Set_Str_To_Name_Buffer ("Direction");
P := Make_Defining_Identifier (Name_Find);
if AIN.Is_In (F) and then not AIN.Is_Out (F) then
Set_Str_To_Name_Buffer ("DESTINATION");
elsif AIN.Is_Out (F) and then not AIN.Is_In (F) then
Set_Str_To_Name_Buffer ("SOURCE");
else
return No_Node;
end if;
Q := Make_Defining_Identifier (Name_Find);
Append_Node_To_List (Make_Assignement (P, Q), XTN.Items (N));
-- Add the name of the port as an attribute
Set_Str_To_Name_Buffer ("Name");
R := Make_Defining_Identifier (Name_Find);
Q :=
Make_Defining_Identifier (To_XML_Name (Display_Name (Identifier (F))));
Append_Node_To_List (Make_Assignement (R, Q), XTN.Items (N));
if AIN.Is_Data (F) and then not AIN.Is_Event (F) then
Set_Str_To_Name_Buffer ("RefreshRateSeconds");
R := Make_Defining_Identifier (Name_Find);
if Get_POK_Refresh_Time (F) /= Null_Time then
Q :=
Make_Literal
(XV.New_Floating_Point_Value
(To_Seconds (Get_POK_Refresh_Time (F))));
else
Q := Map_Time (Null_Time);
end if;
Append_Node_To_List (Make_Assignement (R, Q), XTN.Items (N));
elsif AIN.Is_Data (F) and then AIN.Is_Event (F) then
Set_Str_To_Name_Buffer ("MaxNbMessages");
P := Make_Defining_Identifier (Name_Find);
if Get_Queue_Size (F) /= -1 then
Q :=
Make_Literal
(XV.New_Numeric_Value
(Unsigned_Long_Long (Get_Queue_Size (F)),
1,
10));
else
Q := Make_Literal (XV.New_Numeric_Value (1, 1, 10));
end if;
Append_Node_To_List (Make_Assignement (P, Q), XTN.Items (N));
end if;
if AIN.Is_Data (F) then
Set_Str_To_Name_Buffer ("MaxMessageSize");
P := Make_Defining_Identifier (Name_Find);
if Get_Data_Size (Corresponding_Instance (F)) /= Null_Size then
Q :=
Make_Literal
(XV.New_Numeric_Value
(To_Bytes (Get_Data_Size (Corresponding_Instance (F))),
1,
10));
else
Q := Make_Literal (XV.New_Numeric_Value (1, 1, 10));
end if;
Append_Node_To_List (Make_Assignement (P, Q), XTN.Items (N));
end if;
return N;
end Map_Port;
------------------- -------------------
-- Map_Data_Size -- -- Map_Data_Size --
------------------- -------------------
...@@ -1117,19 +1024,39 @@ package body Ocarina.Backends.Vxworks653_Conf.Mapping is ...@@ -1117,19 +1024,39 @@ package body Ocarina.Backends.Vxworks653_Conf.Mapping is
Trim (Integer'Image (Partition_Identifier), Left), Trim (Integer'Image (Partition_Identifier), Left),
Partition_Node); Partition_Node);
-- Create the <Application/> sub-node.
Application_Node := Make_XML_Node ("Application");
XTU.Add_Attribute ("NameRef",
Get_Name_String
(Map_Application_Name (Runtime, True)),
Application_Node);
Append_Node_To_List (Application_Node,
XTN.Subitems (Partition_Description_Node));
-- Create the <SharedLibraryRegion/> sub-node.
Shared_Library_Region_Node := Make_XML_Node ("SharedLibraryRegion");
XTU.Add_Attribute ("NameRef", "vxSysLib", Shared_Library_Region_Node);
Append_Node_To_List (Shared_Library_Region_Node,
XTN.Subitems (Partition_Description_Node));
-- Create the <Settings/> sub-node.
Settings_Node := Make_XML_Node ("Settings"); Settings_Node := Make_XML_Node ("Settings");
Append_Node_To_List (Settings_Node, Append_Node_To_List (Settings_Node,
XTN.Subitems (Partition_Description_Node)); XTN.Subitems (Partition_Description_Node));
XTU.Add_Attribute ("RequiredMemorySize", "0x300000", Settings_Node); XTU.Add_Attribute ("RequiredMemorySize", "0x300000", Settings_Node);
XTU.Add_Attribute ("PartitionHMTable", XTU.Add_Attribute ("PartitionHMTable",
Get_Name_String (Map_Partition_Name (Runtime)) & "_hm", Get_Name_String
(Map_Partition_Name (Runtime)) & "_hmtable",
Settings_Node); Settings_Node);
XTU.Add_Attribute ("watchDogDuration", "0", Settings_Node); XTU.Add_Attribute ("watchDogDuration", "0", Settings_Node);
XTU.Add_Attribute ("allocDisable", "0", Settings_Node); XTU.Add_Attribute ("allocDisable", "0", Settings_Node);
XTU.Add_Attribute ("numWorkerTasks", "0", Settings_Node); XTU.Add_Attribute ("numWorkerTasks", "0", Settings_Node);
XTU.Add_Attribute ("numStackGuardPages", "0xffffffff", Settings_Node); XTU.Add_Attribute ("numStackGuardPages", "0xffffffff", Settings_Node);
XTU.Add_Attribute ("isrStackSize", "0xffffffff", Settings_Node); XTU.Add_Attribute ("isrStackSize", "0xffffffff", Settings_Node);
XTU.Add_Attribute ("selScrQSize", "0xffffffff", Settings_Node); XTU.Add_Attribute ("selSvrQSize", "0xffffffff", Settings_Node);
XTU.Add_Attribute ("syscallPermissions", "0xffffffff", Settings_Node);