Commit fa1c8c22 authored by yoogx's avatar yoogx

* Add_Attribute: new variant to store Value_Id, update code to

          display hexdecimal values
parent ae96f77e
......@@ -41,6 +41,7 @@ with Ocarina.ME_AADL.AADL_Instances.Entities;
with Ocarina.Backends.Utils;
with Ocarina.Backends.Properties;
with Ocarina.Backends.XML_Values;
with Ocarina.Backends.XML_Tree.Nodes;
with Ocarina.Backends.XML_Tree.Nutils;
with Ocarina.Backends.Deos_Conf.Mapping;
......@@ -56,6 +57,7 @@ package body Ocarina.Backends.Deos_Conf.Partitions is
use Ocarina.Backends.XML_Tree.Nutils;
use Ocarina.Backends.Properties;
use Ocarina.Backends.Deos_Conf.Mapping;
use Ocarina.Backends.XML_Values;
package AIN renames Ocarina.ME_AADL.AADL_Instances.Nodes;
package AINU renames Ocarina.ME_AADL.AADL_Instances.Nutils;
......@@ -125,9 +127,7 @@ package body Ocarina.Backends.Deos_Conf.Partitions is
XTU.Add_Attribute ("Name", "Initial RAM Pool", N);
XTU.Add_Attribute ("Type", "Initial RAM Pool", N);
XTU.Add_Attribute ("Address",
Trim
(Unsigned_Long_Long'Image
(Get_Base_Address (Segment)), Left),
New_Numeric_Value (Get_Base_Address (Segment), 1, 16),
N);
XTU.Add_Attribute ("Size",
Trim
......
......@@ -41,6 +41,7 @@ with Utils; use Utils;
with Ocarina.Backends.Utils;
with Ocarina.ME_AADL.AADL_Tree.Nodes; use Ocarina.ME_AADL.AADL_Tree.Nodes;
use Ocarina.Backends.Utils;
with Ocarina.Backends.XML_Values; use Ocarina.Backends.XML_Values;
package body Ocarina.Backends.XML_Tree.Nutils is
......@@ -666,4 +667,9 @@ package body Ocarina.Backends.XML_Tree.Nutils is
Append_Node_To_List (Make_Assignement (R, Q), XTN.Items (N));
end Add_Attribute;
procedure Add_Attribute (Key : String; Value : Value_Id; N : Node_Id) is
begin
Add_Attribute (Key, Image (Value), N);
end Add_Attribute;
end Ocarina.Backends.XML_Tree.Nutils;
......@@ -47,15 +47,14 @@ package Ocarina.Backends.XML_Tree.Nutils is
type Token_Type is
(
-- Token name Token type
-- Keywords
Tok_Null, -- NULL **** First Keyword
Tok_Typedef, -- TYPEDEF
Tok_Slash, -- /
Tok_Less, -- <
Tok_Equal, -- =
Tok_Greater); -- >
-- Token name Token type
-- Keywords
Tok_Null, -- NULL **** First Keyword
Tok_Typedef, -- TYPEDEF
Tok_Slash, -- /
Tok_Less, -- <
Tok_Equal, -- =
Tok_Greater); -- >
Token_Image : array (Token_Type) of Name_Id;
......@@ -186,5 +185,6 @@ Tok_Slash, -- /
function Make_Assignement (Left : Node_Id; Right : Node_Id) return Node_Id;
procedure Add_Attribute (Key : String; Value : String; N : Node_Id);
procedure Add_Attribute (Key : String; Value : Value_Id; N : Node_Id);
end Ocarina.Backends.XML_Tree.Nutils;
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