Demo AADL Code to test OSATE 2
This simple AADL code can be used to create a model instance. Place the cursor somewhere inside the system implementation code, right click and select "Instantiate System". This will create a new file with the extension .aaxl2 that contains the instance:
PACKAGE demo_subsystem
PUBLIC
SYSTEM subsystem_test
END subsystem_test;
-- place the mouse cursor somewhere starting here
SYSTEM IMPLEMENTATION subsystem_test.impl
END subsystem_test.impl;
-- and ending here
DATA sensor_data
END sensor_data;
DATA command_data
END command_data;
PROCESS control_processing
END control_processing;
END demo_subsystem;
AADL control_processing demo code & model
This code is automatically generated with TOPCASED after the example presented here. The TOPCASED model file can be downloaded here.Note: This code is not suitable for working with OSATE 2 because it does not contain a subsystem nor a subsystem implementation!
---------------------------------------------------
-- AADL2.0
-- ADELE
-- (c)Ellidiss Technologies
-- 13Jan2012
---------------------------------------------------
PACKAGE demo_ctrl_processing
PUBLIC
DATA sensor_data
END sensor_data;
DATA command_data
END command_data;
THREAD control_out
END control_out;
THREAD IMPLEMENTATION control_out.output_processing_01
END control_out.output_processing_01;
THREAD control_in
END control_in;
THREAD IMPLEMENTATION control_in.input_processing_01
END control_in.input_processing_01;
PROCESS control_processing
FEATURES
input : IN DATA PORT demo_ctrl_processing::sensor_data;
output : OUT DATA PORT demo_ctrl_processing::command_data;
END control_processing;
PROCESS IMPLEMENTATION control_processing.speed_control
SUBCOMPONENTS
control_input : THREAD demo_ctrl_processing::control_in.input_processing_01;
control_output : THREAD demo_ctrl_processing::control_out.output_processing_01;
END control_processing.speed_control;
END demo_ctrl_processing;
No comments:
Post a Comment