osate / osate2-ba

Old Behavior Annex plug-in for OSATE repository, kept for reference
5 stars 4 forks source link

Support of internal features #23

Open juli1 opened 10 years ago

juli1 commented 10 years ago

For now, the internal features are not supported. Supporting them would then allow the interaction between the core, the ba and other annexes. See an example of a model that uses the internal features.

package wbs::hydraulics::wheels

public

system wheel features pressure_primary : in data port base_types::integer; pressure_alternate : in data port base_types::integer; end wheel;

system implementation wheel.impl internal features failure_from_behavior : event; annex EMV2 {** use types errorlibrary; use behavior wbs::errorlib::simple;

component error behavior 
transitions
    failing_mode : operational -[ failure_from_behavior ]-> failed;
end component; 

}; annex behavior_specification { states working : initial complete state; pressure_detection : state; transitions t0 : working -[ on dispatch ]-> pressure_detection; t1 : pressure_detection -[pressure_primary > 0 or pressure_alternate > 0]->working; t2 : pressure_detection -[pressure_alternate < 0 and pressure_primary < 0]->working {failure_from_behavior!}; **}; end wheel.impl;

end wbs::hydraulics::wheels;

juli1 commented 10 years ago

Hello,

For information, I have put an example of a model with internal features on our github. Please see https://github.com/osate/examples/blob/master/core-examples/internal-features/internal-features01.aadl