Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
PolyORB-HI-C
Commits
47f1455b
Commit
47f1455b
authored
Mar 14, 2017
by
yoogx
Browse files
* Reorganize examples to reduce code dupluiation
For issue
#18
parent
9024aa14
Changes
16
Hide whitespace changes
Inline
Side-by-side
examples/aadlv2/d3.1.3-1/Makefile.am
View file @
47f1455b
C_FILES
=
$(srcdir)
/toy.c
AADL_FILES
=
$(srcdir)
/toy_example.aadl
\
$(srcdir)
/toy_example_xenomai_native.aadl
\
$(srcdir)
/toy_example_xenomai_posix.aadl
AADL_FILES
=
$(srcdir)
/toy_example.aadl
SCENARIO_FILES
=
$(srcdir)
/scenario_local.aadl
\
$(srcdir)
/scenario_local_xenomai_posix.aadl
\
...
...
@@ -11,4 +9,4 @@ include $(srcdir)/../../Makefile.common
EXTRA_DIST
=
$(AADL_FILES)
$(SCENARIO_FILES)
$(C_FILES)
CLEANDIRS
=
toy_example_
sample_1
CLEANDIRS
=
toy_example_
native toy_example_xenomai toy_example_xenomai_posix
examples/aadlv2/d3.1.3-1/scenario_local.aadl
View file @
47f1455b
-- This is a scenario file describing the AADL
-- This is a scenario file describing the AADL
-- application d3_1_3_1
-- $Id: scenario_local.aadl 407 2007-06-19 15:24:28Z delange $
...
...
@@ -8,10 +8,11 @@ properties
Ocarina_Config::Timeout_Property => 4000ms;
Ocarina_Config::Referencial_Files =>
("gnc_tmtc_pos", "gnc_tmtc_pos.ref");
Ocarina_Config::AADL_Files =>
Ocarina_Config::AADL_Files =>
("toy_example.aadl");
Ocarina_Config::Root_System_Name => "toy_example.native";
Ocarina_Config::Generator => polyorb_hi_c;
Ocarina_Config::Needed_Property_Sets =>
Ocarina_Config::Needed_Property_Sets =>
(value (Ocarina_Config::Data_Model),
value (Ocarina_Config::Deployment),
value (Ocarina_Config::Cheddar_Properties));
...
...
@@ -20,4 +21,3 @@ end d3_1_3_1;
system implementation d3_1_3_1.Impl
end d3_1_3_1.Impl;
examples/aadlv2/d3.1.3-1/scenario_local_xenomai_native.aadl
View file @
47f1455b
-- This is a scenario file describing the AADL
-- This is a scenario file describing the AADL
-- application d3_1_3_1
-- $Id: scenario_local.aadl 407 2007-06-19 15:24:28Z delange $
...
...
@@ -8,10 +8,10 @@ properties
Ocarina_Config::Timeout_Property => 4000ms;
Ocarina_Config::Referencial_Files =>
("gnc_tmtc_pos", "gnc_tmtc_pos.ref");
Ocarina_Config::AADL_Files =>
(
"toy_example
_
xenomai
_native.aadl")
;
Ocarina_Config::AADL_Files =>
("toy_example.aadl");
Ocarina_Config::Root_System_Name =>
"toy_example
.
xenomai
"
;
Ocarina_Config::Generator => polyorb_hi_c;
Ocarina_Config::Needed_Property_Sets =>
Ocarina_Config::Needed_Property_Sets =>
(value (Ocarina_Config::Data_Model),
value (Ocarina_Config::Deployment),
value (Ocarina_Config::ARINC653_Properties),
...
...
@@ -21,4 +21,3 @@ end d3_1_3_1;
system implementation d3_1_3_1.Impl
end d3_1_3_1.Impl;
examples/aadlv2/d3.1.3-1/scenario_local_xenomai_posix.aadl
View file @
47f1455b
-- This is a scenario file describing the AADL
-- This is a scenario file describing the AADL
-- application d3_1_3_1
-- $Id: scenario_local.aadl 407 2007-06-19 15:24:28Z delange $
...
...
@@ -8,10 +8,11 @@ properties
Ocarina_Config::Timeout_Property => 4000ms;
Ocarina_Config::Referencial_Files =>
("gnc_tmtc_pos", "gnc_tmtc_pos.ref");
Ocarina_Config::AADL_Files =>
("toy_example_xenomai_posix.aadl");
Ocarina_Config::AADL_Files =>
("toy_example.aadl");
Ocarina_Config::Root_System_Name => "toy_example.xenomai_posix";
Ocarina_Config::Generator => polyorb_hi_c;
Ocarina_Config::Needed_Property_Sets =>
Ocarina_Config::Needed_Property_Sets =>
(value (Ocarina_Config::Data_Model),
value (Ocarina_Config::Deployment),
value (Ocarina_Config::ARINC653_Properties),
...
...
@@ -21,4 +22,3 @@ end d3_1_3_1;
system implementation d3_1_3_1.Impl
end d3_1_3_1.Impl;
examples/aadlv2/d3.1.3-1/toy_example.aadl
View file @
47f1455b
--
This
AADL
model
is
derived
from
the
AADL
model
published
in
the
--
IST
-
ASSERT
d3
.3.1
-
3
deliverable
.
--
$
Id
:
toy_example
.
aadl
407
2007
-
06
-
19
15
:
24
:
28
Z
delange
$
package
TOY_Example
package
Toy_Example
public
with
Cheddar_Properties
,
Deployment
,
Data_Model
;
-----------------
--
Subprograms
--
-----------------
subprogram
Update
features
this
:
requires
data
access
POS
.
Impl
;
properties
source_language
=>
C
;
source_name
=>
"user_update"
;
source_text
=>
(
"toy.c"
);
end
Update
;
--
This
subprogram
updates
the
internal
value
of
POS
subprogram
Read_POS
features
this
:
requires
data
access
POS
.
Impl
;
properties
source_language
=>
C
;
source_name
=>
"user_read"
;
source_text
=>
(
"toy.c"
);
end
Read_POS
;
--
This
subprogram
displays
the
internal
value
of
POS
subprogram
GNC_Job
properties
source_language
=>
C
;
source_name
=>
"user_gnc_job"
;
source_text
=>
(
"toy.c"
);
end
GNC_Job
;
--
This
subprogram
consumes
the
CPU
during
a
given
amount
of
time
subprogram
TMTC_Job
properties
source_language
=>
C
;
source_name
=>
"user_tmtc_job"
;
source_text
=>
(
"toy.c"
);
end
TMTC_Job
;
--
This
subprogram
consumes
the
CPU
during
a
given
amount
of
time
--
The
two
subprogram
below
are
used
for
analyze
purpose
subprogram
GNC_Identity
properties
source_language
=>
C
;
source_name
=>
"user_gnc_identity"
;
source_text
=>
(
"toy.c"
);
end
GNC_Identity
;
subprogram
TMTC_Identity
properties
source_language
=>
C
;
source_name
=>
"user_tmtc_identity"
;
source_text
=>
(
"toy.c"
);
end
TMTC_Identity
;
--------------------------
--
Subprogram
Wrappers
--
--------------------------
subprogram
GNC_Thread_Wrapper
features
GNC_POS
:
requires
data
access
POS
.
Impl
;
end
GNC_Thread_Wrapper
;
subprogram
implementation
GNC_Thread_Wrapper
.
Impl
calls
Mycalls
:
{
Welcome
:
subprogram
GNC_Identity
;
Update_POS
:
subprogram
POS
.
Update
;
GNC_Job
:
subprogram
GNC_Job
;
Read_POS
:
subprogram
POS
.
Read
;
Bye
:
subprogram
GNC_Identity
;
};
connections
Cnx_GNC_1
:
data
access
GNC_POS
->
Update_POS
.
this
;
Cnx_GNC_2
:
data
access
GNC_POS
->
Read_POS
.
this
;
end
GNC_Thread_Wrapper
.
Impl
;
subprogram
TMTC_Thread_Wrapper
features
TMTC_POS
:
requires
data
access
POS
.
Impl
;
end
TMTC_Thread_Wrapper
;
subprogram
implementation
TMTC_Thread_Wrapper
.
Impl
calls
Mycalls
:
{
Welcome
:
subprogram
TMTC_Identity
;
TMTC_Job
:
subprogram
TMTC_Job
;
Update
:
subprogram
POS
.
Update
;
Bye
:
subprogram
TMTC_Identity
;
};
connections
Cnx_TMTC_1
:
data
access
TMTC_POS
->
Update
.
this
;
end
TMTC_Thread_Wrapper
.
Impl
;
-------------
--
Threads
--
-------------
thread
GNC_Thread
features
GNC_POS
:
requires
data
access
POS
.
Impl
;
end
GNC_Thread
;
thread
implementation
GNC_Thread
.
Impl
calls
Mycalls
:
{
GNC_Thread_Wrapper
:
subprogram
GNC_Thread_Wrapper
.
Impl
;
};
connections
Cnx_GNC_1
:
data
access
GNC_POS
->
GNC_Thread_Wrapper
.
GNC_POS
;
properties
Dispatch_Protocol
=>
Periodic
;
Period
=>
1000
ms
;
Compute_Execution_time
=>
0
ms
..
600
ms
;
Deadline
=>
1000
ms
;
Cheddar_Properties
::
Fixed_Priority
=>
250
;
end
GNC_thread
.
Impl
;
thread
TMTC_Thread
features
TMTC_POS
:
requires
data
access
POS
.
Impl
;
end
TMTC_Thread
;
thread
implementation
TMTC_Thread
.
Impl
calls
Mycalls
:
{
TMTC_Thread_Wrapper
:
subprogram
TMTC_Thread_Wrapper
.
Impl
;
};
connections
Cnx_TMTC_1
:
data
access
TMTC_POS
->
TMTC_Thread_Wrapper
.
TMTC_POS
;
properties
Dispatch_Protocol
=>
Periodic
;
Period
=>
100
ms
;
Compute_Execution_time
=>
0
ms
..
50
ms
;
Deadline
=>
100
ms
;
Cheddar_Properties
::
Fixed_Priority
=>
190
;
end
TMTC_Thread
.
Impl
;
---------------
--
Processes
--
---------------
process
Toy_Example_Proc
end
Toy_Example_Proc
;
process
implementation
Toy_Example_Proc
.
Impl
subcomponents
GNC_Th
:
thread
GNC_thread
.
Impl
;
TMTC_Th
:
thread
TMTC_Thread
.
Impl
;
POS_Data
:
data
POS
.
Impl
;
connections
Cnx_Proc_2
:
data
access
POS_Data
->
GNC_Th
.
GNC_POS
;
Cnx_Proc_3
:
data
access
POS_Data
->
TMTC_Th
.
TMTC_POS
;
end
Toy_Example_Proc
.
Impl
;
---------------
--
Processor
--
---------------
processor
the_processor
properties
Deployment
::
Execution_Platform
=>
native
;
Priority_Range
=>
0
..
255
;
end
the_processor
;
------------
--
System
--
------------
system
toy_example
end
toy_example
;
system
implementation
toy_example
.
sample_1
subcomponents
P1
:
processor
the_processor
;
GNC_TMTC_POS
:
process
Toy_Example_Proc
.
Impl
;
properties
Actual_Processor_Binding
=>
reference
(
P1
)
applies
to
GNC_TMTC_POS
;
end
toy_example
.
sample_1
;
----------
--
Data
--
----------
--
POS_Internal_Type
is
the
internal
type
of
the
POS
shared
variable
data
POS_Internal_Type
properties
Data_Model
::
Data_Representation
=>
Integer
;
end
POS_Internal_Type
;
--
POS
is
a
shared
variable
between
the
nodes
GNC
and
TMTC
.
Its
--
internal
type
is
defined
in
POS
.
Impl
.
Therefore
,
POS
.
Impl
is
the
--
data
component
types
that
should
be
used
in
the
remaining
of
the
--
model
.
data
POS
features
Update
:
provides
subprogram
access
Update
;
Read
:
provides
subprogram
access
Read_POS
;
properties
Priority
=>
250
;
end
POS
;
data
implementation
POS
.
Impl
subcomponents
Field
:
data
POS_Internal_Type
;
spgUpdate
:
subprogram
Update
;
spgRead
:
subprogram
Read_POS
;
connections
Cnx_Pos_1
:
subprogram
access
SpgUpdate
->
Update
;
Cnx_Pos_2
:
subprogram
access
SpgRead
->
Read
;
properties
Data_Model
::
Data_Representation
=>
Struct
;
end
POS
.
Impl
;
end
TOY_Example
;
with
Deployment
;
with
Data_Model
;
----------
--
Data
--
----------
--
POS_Internal_Type
is
the
internal
type
of
the
POS
shared
variable
data
POS_Internal_Type
properties
Data_Model
::
Data_Representation
=>
Integer
;
end
POS_Internal_Type
;
--
POS
is
a
shared
variable
between
the
nodes
GNC
and
TMTC
.
Its
--
internal
type
is
defined
in
POS
.
Impl
.
Therefore
,
POS
.
Impl
is
the
--
data
component
types
that
should
be
used
in
the
remaining
of
the
--
model
.
data
POS
features
Update
:
provides
subprogram
access
Update
;
Read
:
provides
subprogram
access
Read_POS
;
properties
Priority
=>
250
;
end
POS
;
data
implementation
POS
.
Impl
subcomponents
Field
:
data
POS_Internal_Type
;
spgUpdate
:
subprogram
Update
;
spgRead
:
subprogram
Read_POS
;
connections
Cnx_Pos_1
:
subprogram
access
SpgUpdate
->
Update
;
Cnx_Pos_2
:
subprogram
access
SpgRead
->
Read
;
properties
Data_Model
::
Data_Representation
=>
Struct
;
end
POS
.
Impl
;
-----------------
--
Subprograms
--
-----------------
subprogram
Update
features
this
:
requires
data
access
POS
.
Impl
;
properties
source_language
=>
C
;
source_name
=>
"user_update"
;
source_text
=>
(
"toy.c"
);
end
Update
;
--
This
subprogram
updates
the
internal
value
of
POS
subprogram
Read_POS
features
this
:
requires
data
access
POS
.
Impl
;
properties
source_language
=>
C
;
source_name
=>
"user_read"
;
source_text
=>
(
"toy.c"
);
end
Read_POS
;
--
This
subprogram
displays
the
internal
value
of
POS
subprogram
GNC_Job
properties
source_language
=>
C
;
source_name
=>
"user_gnc_job"
;
source_text
=>
(
"toy.c"
);
end
GNC_Job
;
--
This
subprogram
consumes
the
CPU
during
a
given
amount
of
time
subprogram
TMTC_Job
properties
source_language
=>
C
;
source_name
=>
"user_tmtc_job"
;
source_text
=>
(
"toy.c"
);
end
TMTC_Job
;
--
This
subprogram
consumes
the
CPU
during
a
given
amount
of
time
--
The
two
subprogram
below
are
used
for
analyze
purpose
subprogram
GNC_Identity
properties
source_language
=>
C
;
source_name
=>
"user_gnc_identity"
;
source_text
=>
(
"toy.c"
);
end
GNC_Identity
;
subprogram
TMTC_Identity
properties
source_language
=>
C
;
source_name
=>
"user_tmtc_identity"
;
source_text
=>
(
"toy.c"
);
end
TMTC_Identity
;
-------------------------
--
Subprogram
Wrappers
--
-------------------------
subprogram
GNC_Thread_Wrapper
features
GNC_POS
:
requires
data
access
POS
.
Impl
;
end
GNC_Thread_Wrapper
;
subprogram
implementation
GNC_Thread_Wrapper
.
Impl
calls
Mycalls
:
{
Welcome
:
subprogram
GNC_Identity
;
Update_POS
:
subprogram
POS
.
Update
;
GNC_Job
:
subprogram
GNC_Job
;
Read_POS
:
subprogram
POS
.
Read
;
Bye
:
subprogram
GNC_Identity
;
};
connections
Cnx_GNC_1
:
data
access
GNC_POS
->
Update_POS
.
this
;
Cnx_GNC_2
:
data
access
GNC_POS
->
Read_POS
.
this
;
end
GNC_Thread_Wrapper
.
Impl
;
subprogram
TMTC_Thread_Wrapper
features
TMTC_POS
:
requires
data
access
POS
.
Impl
;
end
TMTC_Thread_Wrapper
;
subprogram
implementation
TMTC_Thread_Wrapper
.
Impl
calls
Mycalls
:
{
Welcome
:
subprogram
TMTC_Identity
;
TMTC_Job
:
subprogram
TMTC_Job
;
Update
:
subprogram
POS
.
Update
;
Bye
:
subprogram
TMTC_Identity
;
};
connections
Cnx_TMTC_1
:
data
access
TMTC_POS
->
Update
.
this
;
end
TMTC_Thread_Wrapper
.
Impl
;
-------------
--
Threads
--
-------------
thread
GNC_Thread
features
GNC_POS
:
requires
data
access
POS
.
Impl
;
end
GNC_Thread
;
thread
implementation
GNC_Thread
.
Impl
calls
Mycalls
:
{
GNC_Thread_Wrapper
:
subprogram
GNC_Thread_Wrapper
.
Impl
;
};
connections
Cnx_GNC_1
:
data
access
GNC_POS
->
GNC_Thread_Wrapper
.
GNC_POS
;
properties
Dispatch_Protocol
=>
Periodic
;
Period
=>
1000
ms
;
Compute_Execution_Time
=>
0
ms
..
600
ms
;
Deadline
=>
1000
ms
;
Priority
=>
250
;
end
GNC_thread
.
Impl
;
thread
TMTC_Thread
features
TMTC_POS
:
requires
data
access
POS
.
Impl
;
end
TMTC_Thread
;
thread
implementation
TMTC_Thread
.
Impl
calls
Mycalls
:
{
TMTC_Thread_Wrapper
:
subprogram
TMTC_Thread_Wrapper
.
Impl
;
};
connections
Cnx_TMTC_1
:
data
access
TMTC_POS
->
TMTC_Thread_Wrapper
.
TMTC_POS
;
properties
Dispatch_Protocol
=>
Periodic
;
Period
=>
100
ms
;
Compute_Execution_Time
=>
0
ms
..
50
ms
;
Deadline
=>
100
ms
;
Priority
=>
190
;
end
TMTC_Thread
.
Impl
;
---------------
--
Processes
--
---------------
process
Toy_Example_Proc
end
Toy_Example_Proc
;
process
implementation
Toy_Example_Proc
.
Impl
subcomponents
GNC_Th
:
thread
GNC_thread
.
Impl
;
TMTC_Th
:
thread
TMTC_Thread
.
Impl
;
POS_Data
:
data
POS
.
Impl
;
connections
Cnx_Proc_2
:
data
access
POS_Data
->
GNC_Th
.
GNC_POS
;
Cnx_Proc_3
:
data
access
POS_Data
->
TMTC_Th
.
TMTC_POS
;
end
Toy_Example_Proc
.
Impl
;
---------------
--
Processor
--
---------------
processor
the_processor
properties
Deployment
::
Execution_Platform
=>
native
;
Priority_Range
=>
0
..
255
;
end
the_processor
;
------------
--
System
--
------------
system
toy_example
end
toy_example
;
system
implementation
toy_example
.
native
subcomponents
P1
:
processor
the_processor
;
GNC_TMTC_POS
:
process
Toy_Example_Proc
.
Impl
;
properties
Actual_Processor_Binding
=>
reference
(
P1
)
applies
to
GNC_TMTC_POS
;
end
toy_example
.
native
;
system
implementation
toy_example
.
xenomai
extends
toy_example
::
toy_example
.
native
properties
Deployment
::
Execution_Platform
=>
LINUX32_XENOMAI_NATIVE
applies
to
P1
;
end
toy_example
.
xenomai
;
system
implementation
toy_example
.
xenomai_posix
extends
toy_example
::
toy_example
.
native
properties
Deployment
::
Execution_Platform
=>
LINUX32_XENOMAI_POSIX
applies
to
P1
;
end
toy_example
.
xenomai_posix
;
end
Toy_Example
;
examples/aadlv2/d3.1.3-1/toy_example_xenomai_native.aadl
deleted
100644 → 0
View file @
9024aa14
--
This
AADL
model
is
derived
from
the
AADL
model
published
in
the
--
IST
-
ASSERT
d3
.3.1
-
3
deliverable
.
--
$
Id
:
toy_example
.
aadl
407
2007
-
06
-
19
15
:
24
:
28
Z
delange
$
package
TOY_Example
public
with
Cheddar_Properties
,
Deployment
,
Data_Model
;
-----------------
--
Subprograms
--
-----------------
subprogram
Update
features
this
:
requires
data
access
POS
.
Impl
;
properties
source_language
=>
C
;
source_name
=>
"user_update"
;
source_text
=>
(
"toy.c"
);
end
Update
;
--
This
subprogram
updates
the
internal
value
of
POS
subprogram
Read_POS
features
this
:
requires
data
access
POS
.
Impl
;
properties
source_language
=>
C
;
source_name
=>
"user_read"
;
source_text
=>
(
"toy.c"
);
end
Read_POS
;
--
This
subprogram
displays
the
internal
value
of
POS
subprogram
GNC_Job
properties
source_language
=>
C
;
source_name
=>
"user_gnc_job"
;
source_text
=>
(
"toy.c"
);
end
GNC_Job
;
--
This
subprogram
consumes
the
CPU
during
a
given
amount
of
time
subprogram
TMTC_Job
properties
source_language
=>
C
;
source_name
=>
"user_tmtc_job"
;
source_text
=>
(
"toy.c"
);
end
TMTC_Job
;
--
This
subprogram
consumes
the
CPU
during
a
given
amount
of
time
--
The
two
subprogram
below
are