Commit 18edad5e authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Prepare code for parsing the complete deployment view

parent 9e4a679a
...@@ -59,6 +59,8 @@ package body Deployment_View is ...@@ -59,6 +59,8 @@ package body Deployment_View is
is is
use type Node_Maps.Map; use type Node_Maps.Map;
use type Taste_Busses.Vector; use type Taste_Busses.Vector;
use type Bus_Connections.Vector;
Nodes : Node_Maps.Map; Nodes : Node_Maps.Map;
Busses : Taste_Busses.Vector; Busses : Taste_Busses.Vector;
Conns : Bus_Connections.Vector; Conns : Bus_Connections.Vector;
...@@ -150,6 +152,32 @@ package body Deployment_View is ...@@ -150,6 +152,32 @@ package body Deployment_View is
return Result; return Result;
end Parse_Connections; end Parse_Connections;
function Parse_Node (Depl_View_System : Node_Id)
return Taste_Node is
Processes : Node_Id;
CI : Node_Id;
Result : Taste_Node;
begin
Processes := First_Node (Subcomponents (Depl_View_System));
while Present (Processes) loop
CI := Corresponding_Instance (Processes);
if Get_Category_Of_Component (CI) = CC_Device then
-- There can be several drivers
null;
elsif Get_Category_Of_Component (CI) = CC_Process then
-- Partitions?
null;
end if;
Processes := Next_Node (Processes);
end loop;
return Result;
end Parse_Node;
begin begin
My_Root_System := Initialize (System); My_Root_System := Initialize (System);
...@@ -162,14 +190,16 @@ package body Deployment_View is ...@@ -162,14 +190,16 @@ package body Deployment_View is
while Present (Subs) loop while Present (Subs) loop
CI := Corresponding_Instance (Subs); CI := Corresponding_Instance (Subs);
if Get_Category_Of_Component (CI) = CC_System then if Get_Category_Of_Component (CI) = CC_System then -- Node
if not Is_Empty (Connections (CI)) then if not Is_Empty (Connections (CI)) then
Conns := Parse_Connections (CI); Conns := Conns & Parse_Connections (CI); -- Checkme
end if; end if;
-- Browse_Deployment_View_System if not Is_Empty (Subcomponents (CI)) then
-- (CI, Get_Name_String (Name (Identifier (Subs)))); Nodes.Insert (Key => Get_Name_String (Name (Identifier (Subs))),
elsif Get_Category_Of_Component (CI) = CC_Bus then New_Item => Parse_Node (CI));
end if;
elsif Get_Category_Of_Component (CI) = CC_Bus then -- Bus
Busses.Append (Parse_Bus (Subs, CI)); Busses.Append (Parse_Bus (Subs, CI));
end if; end if;
Subs := Next_Node (Subs); Subs := Next_Node (Subs);
......
Supports Markdown
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