Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
kazoo
Commits
18edad5e
Commit
18edad5e
authored
Nov 29, 2017
by
Maxime Perrotin
Browse files
Prepare code for parsing the complete deployment view
parent
9e4a679a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/deployment_view.adb
View file @
18edad5e
...
...
@@ -59,6 +59,8 @@ package body Deployment_View is
is
use
type
Node_Maps
.
Map
;
use
type
Taste_Busses
.
Vector
;
use
type
Bus_Connections
.
Vector
;
Nodes
:
Node_Maps
.
Map
;
Busses
:
Taste_Busses
.
Vector
;
Conns
:
Bus_Connections
.
Vector
;
...
...
@@ -150,6 +152,32 @@ package body Deployment_View is
return
Result
;
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
My_Root_System
:=
Initialize
(
System
);
...
...
@@ -162,14 +190,16 @@ package body Deployment_View is
while
Present
(
Subs
)
loop
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
Conns
:=
Parse_Connections
(
CI
);
Conns
:=
Conns
&
Parse_Connections
(
CI
);
-- Checkme
end
if
;
-- Browse_Deployment_View_System
-- (CI, Get_Name_String (Name (Identifier (Subs))));
elsif
Get_Category_Of_Component
(
CI
)
=
CC_Bus
then
if
not
Is_Empty
(
Subcomponents
(
CI
))
then
Nodes
.
Insert
(
Key
=>
Get_Name_String
(
Name
(
Identifier
(
Subs
))),
New_Item
=>
Parse_Node
(
CI
));
end
if
;
elsif
Get_Category_Of_Component
(
CI
)
=
CC_Bus
then
-- Bus
Busses
.
Append
(
Parse_Bus
(
Subs
,
CI
));
end
if
;
Subs
:=
Next_Node
(
Subs
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment