Commit 6c44b2ef authored by Julien's avatar Julien

Add Map_Partition_Name for vxworks653 conf,

introduce the ability to use the
Source_Name property to indicate the partition
project.
parent d4653207
......@@ -1106,10 +1106,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Mapping is
XTU.Add_Attribute ("Name",
Get_Name_String
(AIN.Name
(Identifier
(Parent_Subcomponent
(Runtime)))),
(Map_Partition_Name (Runtime)),
Partition_Node);
--
-- Integer'Image adds a space in the beginning. To avoid that,
......@@ -1150,13 +1147,24 @@ package body Ocarina.Backends.Vxworks653_Conf.Mapping is
XTN.Subitems (Partition_Description_Node));
XTU.Add_Attribute ("NameRef",
Get_Name_String
(AIN.Name
(Identifier
(Parent_Subcomponent
(Runtime)))),
(Map_Partition_Name (Runtime)),
Partition_Node);
return Partition_Node;
end Map_Partition;
function Map_Partition_Name (Runtime : Node_Id) return Name_Id is
Result : Name_Id;
begin
Result := Get_Source_Name (Runtime);
if Result = No_Name then
Result := AIN.Name
(Identifier
(Parent_Subcomponent
(Runtime)));
end if;
return Result;
end Map_Partition_Name;
end Ocarina.Backends.Vxworks653_Conf.Mapping;
......@@ -47,4 +47,6 @@ package Ocarina.Backends.Vxworks653_Conf.Mapping is
function Map_Queuing_Port (Port : Node_Id) return Node_Id;
function Map_Partition_Name (Runtime : Node_Id) return Name_Id;
end Ocarina.Backends.Vxworks653_Conf.Mapping;
......@@ -237,10 +237,8 @@ package body Ocarina.Backends.Vxworks653_Conf.Naming is
Application_Node := Make_XML_Node ("Application");
XTU.Add_Attribute ("Name",
Get_Name_String
(AIN.Name
(AIN.Identifier
(Parent_Subcomponent
(AADL_Virtual_Processor)))),
(Map_Partition_Name
(AADL_Virtual_Processor)),
Application_Node);
Append_Node_To_List (Application_Node,
XTN.Subitems (XML_Node));
......
......@@ -8,7 +8,7 @@ with Ocarina.ME_AADL.AADL_Instances.Entities;
with Ocarina.Backends.XML_Tree.Nodes;
with Ocarina.Backends.XML_Tree.Nutils;
-- with Ocarina.Backends.Vxworks653_Conf.Mapping;
with Ocarina.Backends.Vxworks653_Conf.Mapping;
package body Ocarina.Backends.Vxworks653_Conf.Payloads is
......@@ -20,9 +20,8 @@ package body Ocarina.Backends.Vxworks653_Conf.Payloads is
use Ocarina.Backends.XML_Tree.Nutils;
-- use Ocarina.Backends.Properties;
-- use Ocarina.Backends.Vxworks653_Conf.Mapping;
use Ocarina.Backends.Vxworks653_Conf.Mapping;
package AIN renames Ocarina.ME_AADL.AADL_Instances.Nodes;
package AINU renames Ocarina.ME_AADL.AADL_Instances.Nutils;
package XTN renames Ocarina.Backends.XML_Tree.Nodes;
......@@ -200,10 +199,8 @@ package body Ocarina.Backends.Vxworks653_Conf.Payloads is
:= Make_XML_Node ("PartitionPayload");
Add_Attribute ("NameRef",
Get_Name_String
(AIN.Name
(AIN.Identifier
(Parent_Subcomponent
(Corresponding_Instance (S))))),
(Map_Partition_Name
(Corresponding_Instance (S))),
Partition_Payload_Node);
Append_Node_To_List (Partition_Payload_Node,
XTN.Subitems (Payloads_Node));
......
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