Commit b9e37a21 authored by julien.delange's avatar julien.delange
Browse files

* po-hi-c/examples/aadlv2/rma/Makefile.am

   - Package xenomai-related test files
 
 * po-hi-c/examples/aadlv2/d3.1.3-1
   - Add tests for protected objects with xenomai




git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@2348 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent c80f965e
C_FILES = $(srcdir)/toy.c
AADL_FILES = $(srcdir)/toy_example.aadl
SCENARIO_FILE = $(srcdir)/scenario_local.aadl
SCENARIO_FILES = $(srcdir)/scenario_local.aadl \
$(srcdir)/scenario_local_xenomai_posix.aadl \
$(srcdir)/scenario_local_xenomai_native.aadl
include $(srcdir)/../../Makefile.common
EXTRA_DIST = $(AADL_FILES) $(SCENARIO_FILE) $(C_FILES)
EXTRA_DIST = $(AADL_FILES) $(SCENARIO_FILES) $(C_FILES)
CLEANDIRS = toy_example_sample_1
-- 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 $
system d3_1_3_1
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::Generator => polyorb_hi_c;
Ocarina_Config::Needed_Property_Sets =>
(value (Ocarina_Config::Data_Model),
value (Ocarina_Config::Deployment),
value (Ocarina_Config::ARINC653_Properties),
value (Ocarina_Config::Cheddar_Properties));
Ocarina_Config::AADL_Version => AADLv2;
end d3_1_3_1;
system implementation d3_1_3_1.Impl
end d3_1_3_1.Impl;
-- 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 $
system d3_1_3_1
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::Generator => polyorb_hi_c;
Ocarina_Config::Needed_Property_Sets =>
(value (Ocarina_Config::Data_Model),
value (Ocarina_Config::Deployment),
value (Ocarina_Config::ARINC653_Properties),
value (Ocarina_Config::Cheddar_Properties));
Ocarina_Config::AADL_Version => AADLv2;
end d3_1_3_1;
system implementation d3_1_3_1.Impl
end d3_1_3_1.Impl;
-- 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:28Z 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 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 => LINUX32_XENOMAI_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
{Deployment::Channel_Address => 2;
Deployment::Process_Id => 1200;};
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;
-- 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:28Z 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 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 => LINUX32_XENOMAI_POSIX;
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
{Deployment::Channel_Address => 2;
Deployment::Process_Id => 1200;};
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;
......@@ -10,6 +10,6 @@ SCENARIO_FILES = $(srcdir)/scenario.aadl \
include $(srcdir)/../../Makefile.common
EXTRA_DIST = $(AADL_FILES) $(SCENARIO_FILE) $(C_FILES)
EXTRA_DIST = $(AADL_FILES) $(SCENARIO_FILES) $(C_FILES)
CLEANDIRS = rma_impl
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