Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
Ocarina
Commits
a3bc642c
Commit
a3bc642c
authored
Apr 10, 2015
by
yoogx
Browse files
Merge branch 'master' of
https://github.com/OpenAADL/ocarina
parents
1158948c
efca9967
Changes
8
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
a3bc642c
...
...
@@ -335,6 +335,7 @@ fi],
AC_SUBST(PYTHON_PRJ)
AC_SUBST(PYTHON_TARGET)
AC_SUBST(PYTHON_RUNTIME)
AM_CONDITIONAL(INSTALL_PYTHON,[test x"$PYTHON_RUNTIME" = xpython])
##########################################
# Some version control stuff
...
...
resources/runtime/Makefile.am
View file @
a3bc642c
SUBDIRS
=
cheddar aadl_xml
${PYTHON_RUNTIME}
SUBDIRS
=
cheddar aadl_xml
python
@DEBUG_FALSE@
DEBUG_FLAG
=
--disable-debug
@DEBUG_TRUE@
DEBUG_FLAG
=
--enable-debug
...
...
resources/runtime/python/Makefile.am
View file @
a3bc642c
AUTOMAKE_OPTIONS
=
no-dependencies
PYTHON_FILES
=
$(srcdir)
/ocarina.py
\
PYTHON_FILES
=
$(srcdir)
/ocarina.py
if
INSTALL_PYTHON
PYTHON_FILES
+
=
\
$(top_builddir)/src/python/ocarina_me_aadl_aadl_instances_nodes.py
\
$(top_builddir)/src/python/ocarina_me_aadl_aadl_tree_nodes.py
endif
EXTRA_DIST
=
$(PYTHON_FILES)
...
...
src/backends/ocarina-backends-c_common-mapping.adb
View file @
a3bc642c
...
...
@@ -3037,15 +3037,7 @@ package body Ocarina.Backends.C_Common.Mapping is
if
Get_Connection_Pattern
(
E
)
=
Inter_Process
and
then
POK_Flavor
=
DEOS
then
if
Is_In
(
E
)
then
Get_Name_String
(
Display_Name
(
Identifier
(
E
)));
else
Get_Name_String
(
Display_Name
(
Identifier
(
Item
(
AIN
.
First_Node
(
Destinations
(
E
))))));
end
if
;
Get_Name_String
(
Display_Name
(
Identifier
(
E
)));
N
:=
Name_Find
;
else
N
:=
Map_Port
(
E
,
Containing_Component
);
...
...
src/backends/ocarina-backends-deos_conf-mapping.adb
View file @
a3bc642c
...
...
@@ -2,6 +2,7 @@ with Ada.Strings; use Ada.Strings;
with
Ada
.
Strings
.
Fixed
;
use
Ada
.
Strings
.
Fixed
;
with
Ocarina
.
Namet
;
use
Ocarina
.
Namet
;
with
Utils
;
use
Utils
;
with
Ocarina
.
ME_AADL
;
with
Ocarina
.
ME_AADL
.
AADL_Tree
.
Nodes
;
with
Ocarina
.
ME_AADL
.
AADL_Tree
.
Entities
;
...
...
@@ -974,26 +975,18 @@ package body Ocarina.Backends.Deos_Conf.Mapping is
function
Map_Sampling_Port
(
Port
:
Node_Id
)
return
Node_Id
is
Sampling_Port
:
Node_Id
;
Size
:
Unsigned_Long_Long
;
Source_Port
:
Node_Id
;
Source_Process
:
Node_Id
;
Source_Runtime
:
Node_Id
;
begin
Sampling_Port
:=
Make_XML_Node
(
"SamplingPort"
);
Size
:=
To_Bytes
(
Get_Data_Size
(
Corresponding_Instance
(
Port
)));
if
Is_In
(
Port
)
then
XTU
.
Add_Attribute
(
"Name"
,
Get_Name_String
(
AIN
.
Name
(
Identifier
(
Port
))),
Sampling_Port
);
else
XTU
.
Add_Attribute
(
"Name"
,
Get_Name_String
(
AIN
.
Name
(
Identifier
(
Item
(
AIN
.
First_Node
(
Destinations
(
Port
)))))),
Sampling_Port
);
end
if
;
XTU
.
Add_Attribute
(
"Name"
,
Get_Name_String
(
Map_Port_Name
(
Port
)),
Sampling_Port
);
XTU
.
Add_Attribute
(
"MaxMessageSize"
,
Trim
(
Unsigned_Long_Long
'
Image
(
Size
),
Left
),
...
...
@@ -1004,8 +997,31 @@ package body Ocarina.Backends.Deos_Conf.Mapping is
elsif
Is_Out
(
Port
)
then
XTU
.
Add_Attribute
(
"Direction"
,
"SOURCE"
,
Sampling_Port
);
end
if
;
XTU
.
Add_Attribute
(
"SourcePartitionName"
,
""
,
Sampling_Port
);
XTU
.
Add_Attribute
(
"SourcePortName"
,
""
,
Sampling_Port
);
if
Is_In
(
Port
)
then
Source_Port
:=
Item
(
AIN
.
First_Node
(
Sources
(
Port
)));
Source_Process
:=
Parent_Component
(
Source_Port
);
Source_Runtime
:=
Parent_Subcomponent
(
Get_Partition_Runtime
(
Source_Process
));
XTU
.
Add_Attribute
(
"SourcePortName"
,
Get_Name_String
(
Map_Port_Name
(
Source_Port
)),
Sampling_Port
);
XTU
.
Add_Attribute
(
"SourcePartitionName"
,
Get_Name_String
(
Display_Name
(
Identifier
(
Source_Runtime
))),
Sampling_Port
);
else
XTU
.
Add_Attribute
(
"SourcePartitionName"
,
""
,
Sampling_Port
);
XTU
.
Add_Attribute
(
"SourcePortName"
,
""
,
Sampling_Port
);
end
if
;
XTU
.
Add_Attribute
(
"CustomIOFunction"
,
""
,
Sampling_Port
);
XTU
.
Add_Attribute
(
"AccessRateInNanoseconds"
,
"12500000"
,
Sampling_Port
);
return
Sampling_Port
;
...
...
@@ -1019,6 +1035,9 @@ package body Ocarina.Backends.Deos_Conf.Mapping is
Queuing_Port
:
Node_Id
;
Size
:
Unsigned_Long_Long
;
Queue_Size
:
Long_Long
;
Source_Port
:
Node_Id
;
Source_Process
:
Node_Id
;
Source_Runtime
:
Node_Id
;
begin
Queuing_Port
:=
Make_XML_Node
(
"QueuingPort"
);
Size
:=
To_Bytes
(
Get_Data_Size
...
...
@@ -1029,21 +1048,10 @@ package body Ocarina.Backends.Deos_Conf.Mapping is
Queue_Size
:=
1
;
end
if
;
if
Is_In
(
Port
)
then
XTU
.
Add_Attribute
(
"Name"
,
Get_Name_String
(
AIN
.
Name
(
Identifier
(
Port
))),
Queuing_Port
);
else
XTU
.
Add_Attribute
(
"Name"
,
Get_Name_String
(
AIN
.
Name
(
Identifier
(
Item
(
AIN
.
First_Node
(
Destinations
(
Port
)))))),
Queuing_Port
);
end
if
;
XTU
.
Add_Attribute
(
"Name"
,
Get_Name_String
(
Map_Port_Name
(
Port
)),
Queuing_Port
);
XTU
.
Add_Attribute
(
"MaxMessageSize"
,
Trim
(
Unsigned_Long_Long
'
Image
(
Size
),
Left
),
...
...
@@ -1059,8 +1067,31 @@ package body Ocarina.Backends.Deos_Conf.Mapping is
elsif
Is_Out
(
Port
)
then
XTU
.
Add_Attribute
(
"Direction"
,
"SOURCE"
,
Queuing_Port
);
end
if
;
XTU
.
Add_Attribute
(
"SourcePartitionName"
,
""
,
Queuing_Port
);
XTU
.
Add_Attribute
(
"SourcePortName"
,
""
,
Queuing_Port
);
if
Is_In
(
Port
)
then
Source_Port
:=
Item
(
AIN
.
First_Node
(
Sources
(
Port
)));
Source_Process
:=
Parent_Component
(
Source_Port
);
Source_Runtime
:=
Parent_Subcomponent
(
Get_Partition_Runtime
(
Source_Process
));
XTU
.
Add_Attribute
(
"SourcePortName"
,
Get_Name_String
(
Map_Port_Name
(
Source_Port
)),
Queuing_Port
);
XTU
.
Add_Attribute
(
"SourcePartitionName"
,
Get_Name_String
(
Display_Name
(
Identifier
(
Source_Runtime
))),
Queuing_Port
);
else
XTU
.
Add_Attribute
(
"SourcePartitionName"
,
""
,
Queuing_Port
);
XTU
.
Add_Attribute
(
"SourcePortName"
,
""
,
Queuing_Port
);
end
if
;
XTU
.
Add_Attribute
(
"CustomIOFunction"
,
""
,
Queuing_Port
);
return
Queuing_Port
;
end
Map_Queuing_Port
;
...
...
@@ -1138,12 +1169,18 @@ package body Ocarina.Backends.Deos_Conf.Mapping is
Left
),
Partition_Node
);
XTU
.
Add_Attribute
(
"ExecutableImageName"
,
Get_Name_String
(
AIN
.
Name
(
Identifier
(
Parent_Subcomponent
(
Runtime
))))
&
".exe"
,
Partition_Node
);
if
Get_Source_Name
(
Runtime
)
=
No_Name
then
XTU
.
Add_Attribute
(
"ExecutableImageName"
,
Get_Name_String
(
AIN
.
Name
(
Identifier
(
Parent_Subcomponent
(
Runtime
))))
&
".exe"
,
Partition_Node
);
else
XTU
.
Add_Attribute
(
"ExecutableImageName"
,
Get_Name_String
(
Get_Source_Name
(
Runtime
)),
Partition_Node
);
end
if
;
XTU
.
Add_Attribute
(
"MainProcessStackSizeInPages"
,
"1"
,
Partition_Node
);
XTU
.
Add_Attribute
(
"BreakAtStartup"
,
"no"
,
Partition_Node
);
XTU
.
Add_Attribute
(
"InDebugSet"
,
"no"
,
Partition_Node
);
...
...
@@ -1191,4 +1228,19 @@ package body Ocarina.Backends.Deos_Conf.Mapping is
return
Partition_Node
;
end
Map_Partition
;
-------------------
-- Map_Port_Name --
-------------------
function
Map_Port_Name
(
E
:
Node_Id
)
return
Name_Id
is
N
:
Name_Id
;
begin
Get_Name_String
(
Display_Name
(
Identifier
(
E
)));
N
:=
Name_Find
;
return
(
To_Lower
(
N
));
end
Map_Port_Name
;
end
Ocarina
.
Backends
.
Deos_Conf
.
Mapping
;
src/backends/ocarina-backends-deos_conf-mapping.ads
View file @
a3bc642c
...
...
@@ -47,4 +47,6 @@ package Ocarina.Backends.Deos_Conf.Mapping is
function
Map_Queuing_Port
(
Port
:
Node_Id
)
return
Node_Id
;
function
Map_Port_Name
(
E
:
Node_Id
)
return
Name_Id
;
end
Ocarina
.
Backends
.
Deos_Conf
.
Mapping
;
src/backends/ocarina-backends-deos_conf-partitions.adb
View file @
a3bc642c
...
...
@@ -446,6 +446,10 @@ package body Ocarina.Backends.Deos_Conf.Partitions is
Sampling_Ports
:
Node_Id
:=
No_Node
;
Queuing_Ports
:
Node_Id
:=
No_Node
;
begin
Sampling_Ports
:=
Make_XML_Node
(
"SamplingPorts"
);
Queuing_Ports
:=
Make_XML_Node
(
"QueuingPorts"
);
Corresponding_Process
:=
Find_Associated_Process
(
E
);
if
Corresponding_Process
/=
No_Node
then
...
...
@@ -506,8 +510,6 @@ package body Ocarina.Backends.Deos_Conf.Partitions is
--
if
not
AINU
.
Is_Empty
(
Features
(
Corresponding_Process
))
then
Sampling_Ports
:=
Make_XML_Node
(
"SamplingPorts"
);
Queuing_Ports
:=
Make_XML_Node
(
"QueuingPorts"
);
F
:=
First_Node
(
Features
(
Corresponding_Process
));
while
Present
(
F
)
loop
...
...
@@ -516,7 +518,6 @@ package body Ocarina.Backends.Deos_Conf.Partitions is
then
if
Is_Data
(
F
)
and
then
not
Is_Event
(
F
)
and
then
not
(
Is_In
(
F
)
and
then
Is_Out
(
F
))
then
Append_Node_To_List
(
Map_Sampling_Port
(
F
),
...
...
@@ -524,7 +525,6 @@ package body Ocarina.Backends.Deos_Conf.Partitions is
end
if
;
if
Is_Data
(
F
)
and
then
Is_Event
(
F
)
and
then
not
(
Is_In
(
F
)
and
then
Is_Out
(
F
))
then
Append_Node_To_List
(
Map_Queuing_Port
(
F
),
...
...
src/backends/ocarina-backends-vxworks653_conf-naming.adb
View file @
a3bc642c
...
...
@@ -226,6 +226,8 @@ package body Ocarina.Backends.Vxworks653_Conf.Naming is
Feature
:
Node_Id
;
Size
:
Unsigned_Long_Long
;
Queue_Size
:
Long_Long
;
Refresh_Period
:
Time_Type
;
Refresh_Period_Second
:
Float
;
begin
-- Application Node that is the child of Applications
...
...
@@ -333,14 +335,23 @@ package body Ocarina.Backends.Vxworks653_Conf.Naming is
(
Size
),
Left
),
Port_Node
);
XTU
.
Add_Attribute
(
"Name"
,
"1"
,
Port_Node
);
XTU
.
Add_Attribute
(
"RefreshRate"
,
"1"
,
Port_Node
);
if
Is_In
(
Feature
)
and
then
not
Is_Out
(
Feature
)
then
Refresh_Period
:=
Get_POK_Refresh_Time
(
Feature
);
Refresh_Period_Second
:=
1000.0
/
(
Float
(
To_Milliseconds
(
Refresh_Period
))
*
Float
(
100.0
));
XTU
.
Add_Attribute
(
"Direction"
,
"DESTINATION"
,
Port_Node
);
XTU
.
Add_Attribute
(
"RefreshRate"
,
Trim
(
Float
'
Image
(
Refresh_Period_Second
),
Left
),
Port_Node
);
end
if
;
if
not
Is_In
(
Feature
)
and
then
...
...
@@ -349,6 +360,10 @@ package body Ocarina.Backends.Vxworks653_Conf.Naming is
XTU
.
Add_Attribute
(
"Direction"
,
"SOURCE"
,
Port_Node
);
XTU
.
Add_Attribute
(
"RefreshRate"
,
"INFINITE_TIME"
,
Port_Node
);
end
if
;
Append_Node_To_List
(
Port_Node
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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