Commit 4c39e52d authored by Maxime Perrotin's avatar Maxime Perrotin

Add Demo_ABB

parent 5cd1c9fc
......@@ -55,13 +55,11 @@
extern "C" {
#endif
@@IF@@ @_Language_@ = "C" or @_Language_@ = "CPP"
@@IF@@ @_Language_@ = C or @_Language_@ = CPP or @_Language_@ = GUI
#include "@_LOWER:Name_@.h"
@@ELSIF@@ @_Language_@ = "GUI"
#include "@_LOWER:Name_@.h"
@@ELSIF@@ @_Language_@ = "RTDS"
@@ELSIF@@ @_Language_@ = RTDS
#include "glue_@_LOWER:Name_@.h"
@@ELSIF@@ @_Language_@ = "MicroPython"
@@ELSIF@@ @_Language_@ = MicroPython
#include "@_LOWER:Name_@_mpy_bindings.h"
@@END_IF@@
......
This diff is collapsed.
Lift-dataview DEFINITIONS ::=
BEGIN
UpDown ::= ENUMERATED { up (1), down (0) }
OnOff ::= ENUMERATED { on (1), off (0) }
OpenClose ::= ENUMERATED { door-open (1), door-close (0) }
Position ::= REAL (0.0 .. 100.0)
--Flag ::= BOOLEAN
Floors ::= ENUMERATED {
floor-0 (10),
floor-1 (20),
floor-2 (30),
floor-3 (40),
floor-4 (50),
floor-5 (60)
}
-- Types used for the interfacing with the Simulink model
Lift-control ::= SEQUENCE {
direction UpDown DEFAULT down,
motor OnOff DEFAULT on,
brake OnOff DEFAULT off,
door OpenClose
}
Lift-sensor ::= SEQUENCE {
door-open BOOLEAN,
door-closed BOOLEAN,
floor-detected BOOLEAN,
pos-x Position
}
-- Types used for the user interaction
Floor-button ::= SEQUENCE {
floor Floors,
direction UpDown
}
Cabin-button ::= CHOICE {
emergency-stop BOOLEAN,
floor Floors
}
Start-condition ::= CHOICE {
forever BOOLEAN,
nb-of-cycle INTEGER (50 .. 255)
}
END
---------------------------------------------------
-- AADL2.2
-- TASTE type deploymentview
--
-- generated code: do not edit
---------------------------------------------------
PACKAGE deploymentview::DV::Node1
PUBLIC
WITH Taste;
WITH Deployment;
WITH TASTE_DV_Properties;
PROCESS demo
END demo;
PROCESS IMPLEMENTATION demo.others
END demo.others;
END deploymentview::DV::Node1;
PACKAGE deploymentview::DV
PUBLIC
WITH interfaceview::IV::Controller;
WITH interfaceview::IV::Lift_Model;
WITH interfaceview::IV::User;
WITH ocarina_processors_x86;
WITH deploymentview::DV::Node1;
WITH Taste;
WITH Deployment;
WITH interfaceview::IV;
WITH TASTE_DV_Properties;
SYSTEM Node1
END Node1;
SYSTEM IMPLEMENTATION Node1.others
SUBCOMPONENTS
IV_Controller : SYSTEM interfaceview::IV::Controller::Controller.others {
Taste::FunctionName => "Controller";
};
IV_Lift_Model : SYSTEM interfaceview::IV::Lift_Model::Lift_Model.others {
Taste::FunctionName => "Lift_Model";
};
IV_User : SYSTEM interfaceview::IV::User::User.others {
Taste::FunctionName => "User";
};
demo : PROCESS deploymentview::DV::Node1::demo.others {
Taste::coordinates => "1011 1056 1399 1417";
Deployment::Port_Number => 0;
};
x86_linux : PROCESSOR ocarina_processors_x86::x86.linux {
Taste::coordinates => "962 953 1448 1468";
};
PROPERTIES
Taste::APLC_Binding => (reference (demo)) APPLIES TO IV_Controller;
Taste::APLC_Binding => (reference (demo)) APPLIES TO IV_Lift_Model;
Taste::APLC_Binding => (reference (demo)) APPLIES TO IV_User;
Actual_Processor_Binding => (reference (x86_linux)) APPLIES TO demo;
END Node1.others;
SYSTEM deploymentview
END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.others
SUBCOMPONENTS
Node1 : SYSTEM Node1.others {
Taste::coordinates => "901 806 1509 1542";
};
interfaceview : SYSTEM interfaceview::IV::interfaceview.others;
END deploymentview.others;
PROPERTIES
Taste::coordinates => "0 0 2970 2100";
Taste::version => "2.2";
Taste::interfaceView => "InterfaceView.aadl";
Taste::HWLibraries => ("../../../../tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
END deploymentview::DV;
---------------------------------------------------
-- AADL2.2
-- TASTE type interfaceview
--
-- generated code: do not edit
---------------------------------------------------
PACKAGE interfaceview::IV::Controller
PUBLIC
WITH interfaceview::IV::Lift_Model;
WITH interfaceview::IV::User;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_Pulse
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_Pulse;
SUBPROGRAM IMPLEMENTATION PI_Pulse.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_Pulse.others;
SUBPROGRAM PI_Floor_Command
FEATURES
button : IN PARAMETER DataView::Floor_button {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_Floor_Command;
SUBPROGRAM IMPLEMENTATION PI_Floor_Command.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_Floor_Command.others;
SUBPROGRAM PI_Cabin_Command
FEATURES
button : IN PARAMETER DataView::Cabin_button {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_Cabin_Command;
SUBPROGRAM IMPLEMENTATION PI_Cabin_Command.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_Cabin_Command.others;
SUBPROGRAM PI_Manual_Control
FEATURES
cmd : IN PARAMETER DataView::Lift_control {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_Manual_Control;
SUBPROGRAM IMPLEMENTATION PI_Manual_Control.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_Manual_Control.others;
SUBPROGRAM PI_Start
FEATURES
start_param : IN PARAMETER DataView::Start_condition {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_Start;
SUBPROGRAM IMPLEMENTATION PI_Start.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_Start.others;
SUBPROGRAM RI_Operate_lift
FEATURES
lift_command : IN PARAMETER DataView::Lift_control {
Taste::encoding => NATIVE;
};
lift_sensors : OUT PARAMETER DataView::Lift_sensor {
Taste::encoding => NATIVE;
};
END RI_Operate_lift;
SUBPROGRAM IMPLEMENTATION RI_Operate_lift.others
END RI_Operate_lift.others;
SUBPROGRAM RI_door_status
FEATURES
status : IN PARAMETER DataView::OpenClose {
Taste::encoding => NATIVE;
};
END RI_door_status;
SUBPROGRAM IMPLEMENTATION RI_door_status.others
END RI_door_status.others;
SUBPROGRAM RI_floor_detected
FEATURES
floor : IN PARAMETER DataView::Floors {
Taste::encoding => NATIVE;
};
END RI_floor_detected;
SUBPROGRAM IMPLEMENTATION RI_floor_detected.others
END RI_floor_detected.others;
SUBPROGRAM RI_position
FEATURES
pos : IN PARAMETER DataView::Position {
Taste::encoding => NATIVE;
};
END RI_position;
SUBPROGRAM IMPLEMENTATION RI_position.others
END RI_position.others;
SYSTEM Controller
FEATURES
PI_Pulse : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Controller::PI_Pulse.others {
Taste::coordinates => "1783 671";
Taste::RCMoperationKind => cyclic;
Taste::RCMperiod => 50 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "Pulse";
};
PI_Floor_Command : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Controller::PI_Floor_Command.others {
Taste::coordinates => "1519 816";
Taste::RCMoperationKind => sporadic;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "Floor_Command";
};
PI_Cabin_Command : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Controller::PI_Cabin_Command.others {
Taste::coordinates => "1519 917";
Taste::RCMoperationKind => sporadic;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "Cabin_Command";
};
PI_Manual_Control : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Controller::PI_Manual_Control.others {
Taste::coordinates => "1519 1017";
Taste::RCMoperationKind => sporadic;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "Manual_Control";
};
PI_Start : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Controller::PI_Start.others {
Taste::coordinates => "1519 1467";
Taste::RCMoperationKind => sporadic;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "Start";
};
RI_Operate_lift : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Lift_Model::PI_Operate_lift.others {
Taste::coordinates => "2027 859";
Taste::RCMoperationKind => unprotected;
Taste::InterfaceName => "Operate_lift";
Taste::labelInheritance => "true";
};
RI_door_status : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::User::PI_door_status.others {
Taste::coordinates => "1519 1128";
Taste::RCMoperationKind => sporadic;
Taste::InterfaceName => "door_status";
Taste::labelInheritance => "true";
};
RI_floor_detected : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::User::PI_floor_detected.others {
Taste::coordinates => "1519 1237";
Taste::RCMoperationKind => sporadic;
Taste::InterfaceName => "floor_detected";
Taste::labelInheritance => "true";
};
RI_position : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::User::PI_position.others {
Taste::coordinates => "1519 1338";
Taste::RCMoperationKind => sporadic;
Taste::InterfaceName => "position";
Taste::labelInheritance => "true";
};
PROPERTIES
Source_Language => (RTDS);
Taste::Active_Interfaces => enabled;
END Controller;
SYSTEM IMPLEMENTATION Controller.others
SUBCOMPONENTS
starting_floor : DATA DataView::Floors {
Taste::FS_Default_Value => "floor_0";
};
END Controller.others;
END interfaceview::IV::Controller;
PACKAGE interfaceview::IV::Lift_Model
PUBLIC
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_Operate_lift
FEATURES
lift_command : IN PARAMETER DataView::Lift_control {
Taste::encoding => NATIVE;
};
lift_sensors : OUT PARAMETER DataView::Lift_sensor {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_Operate_lift;
SUBPROGRAM IMPLEMENTATION PI_Operate_lift.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_Operate_lift.others;
SYSTEM Lift_Model
FEATURES
PI_Operate_lift : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Lift_Model::PI_Operate_lift.others {
Taste::coordinates => "2306 859";
Taste::RCMoperationKind => unprotected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "Operate_lift";
};
PROPERTIES
Source_Language => (Simulink);
Taste::Active_Interfaces => enabled;
END Lift_Model;
SYSTEM IMPLEMENTATION Lift_Model.others
END Lift_Model.others;
END interfaceview::IV::Lift_Model;
PACKAGE interfaceview::IV::User
PUBLIC
WITH interfaceview::IV::Controller;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_door_status
FEATURES
status : IN PARAMETER DataView::OpenClose {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_door_status;
SUBPROGRAM IMPLEMENTATION PI_door_status.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_door_status.others;
SUBPROGRAM PI_floor_detected
FEATURES
floor : IN PARAMETER DataView::Floors {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_floor_detected;
SUBPROGRAM IMPLEMENTATION PI_floor_detected.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_floor_detected.others;
SUBPROGRAM PI_position
FEATURES
pos : IN PARAMETER DataView::Position {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_position;
SUBPROGRAM IMPLEMENTATION PI_position.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_position.others;
SUBPROGRAM RI_Floor_Command
FEATURES
button : IN PARAMETER DataView::Floor_button {
Taste::encoding => NATIVE;
};
END RI_Floor_Command;
SUBPROGRAM IMPLEMENTATION RI_Floor_Command.others
END RI_Floor_Command.others;
SUBPROGRAM RI_Cabin_Command
FEATURES
button : IN PARAMETER DataView::Cabin_button {
Taste::encoding => NATIVE;
};
END RI_Cabin_Command;
SUBPROGRAM IMPLEMENTATION RI_Cabin_Command.others
END RI_Cabin_Command.others;
SUBPROGRAM RI_Manual_Control
FEATURES
cmd : IN PARAMETER DataView::Lift_control {
Taste::encoding => NATIVE;
};
END RI_Manual_Control;
SUBPROGRAM IMPLEMENTATION RI_Manual_Control.others
END RI_Manual_Control.others;
SUBPROGRAM RI_Start
FEATURES
start_param : IN PARAMETER DataView::Start_condition {
Taste::encoding => NATIVE;
};
END RI_Start;
SUBPROGRAM IMPLEMENTATION RI_Start.others
END RI_Start.others;
SYSTEM User
FEATURES
PI_door_status : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::User::PI_door_status.others {
Taste::coordinates => "907 1128";
Taste::RCMoperationKind => sporadic;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "door_status";
};
PI_floor_detected : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::User::PI_floor_detected.others {
Taste::coordinates => "907 1237";
Taste::RCMoperationKind => sporadic;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "floor_detected";
};
PI_position : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::User::PI_position.others {
Taste::coordinates => "907 1338";
Taste::RCMoperationKind => sporadic;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "position";
};
RI_Floor_Command : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Controller::PI_Floor_Command.others {
Taste::coordinates => "907 816";
Taste::RCMoperationKind => sporadic;
Taste::InterfaceName => "Floor_Command";
Taste::labelInheritance => "true";
};
RI_Cabin_Command : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Controller::PI_Cabin_Command.others {
Taste::coordinates => "907 917";
Taste::RCMoperationKind => sporadic;
Taste::InterfaceName => "Cabin_Command";
Taste::labelInheritance => "true";
};
RI_Manual_Control : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Controller::PI_Manual_Control.others {
Taste::coordinates => "907 1017";
Taste::RCMoperationKind => sporadic;
Taste::InterfaceName => "Manual_Control";
Taste::labelInheritance => "true";
};
RI_Start : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Controller::PI_Start.others {
Taste::coordinates => "907 1467";
Taste::RCMoperationKind => sporadic;
Taste::InterfaceName => "Start";
Taste::labelInheritance => "true";
};
PROPERTIES
Source_Language => (GUI);
Taste::Active_Interfaces => enabled;
END User;
SYSTEM IMPLEMENTATION User.others
END User.others;
END interfaceview::IV::User;
PACKAGE interfaceview::IV
PUBLIC
WITH interfaceview::IV::Controller;
WITH interfaceview::IV::Lift_Model;
WITH interfaceview::IV::User;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SYSTEM interfaceview
PROPERTIES
Taste::dataView => ("DataView");
Taste::dataViewPath => ("DataView.aadl");
END interfaceview;
SYSTEM IMPLEMENTATION interfaceview.others
SUBCOMPONENTS
Controller : SYSTEM interfaceview::IV::Controller::Controller.others {
Taste::coordinates => "1519 671 2027 1599";
};
Lift_Model : SYSTEM interfaceview::IV::Lift_Model::Lift_Model.others {
Taste::coordinates => "2306 631 2835 1403";
};
User : SYSTEM interfaceview::IV::User::User.others {
Taste::coordinates => "261 606 907 1587";
};
CONNECTIONS
Controller_PI_Floor_Command_User_RI_Floor_Command : SUBPROGRAM ACCESS Controller.PI_Floor_Command -> User.RI_Floor_Command {
Taste::coordinates => "907 816 1207 816 1207 816 1519 816";
};
Controller_PI_Cabin_Command_User_RI_Cabin_Command : SUBPROGRAM ACCESS Controller.PI_Cabin_Command -> User.RI_Cabin_Command {
Taste::coordinates => "907 917 1207 917 1207 917 1519 917";
};
Controller_PI_Manual_Control_User_RI_Manual_Control : SUBPROGRAM ACCESS Controller.PI_Manual_Control -> User.RI_Manual_Control {
Taste::coordinates => "907 1017 1207 1017 1207 1017 1519 1017";
};
Controller_PI_Start_User_RI_Start : SUBPROGRAM ACCESS Controller.PI_Start -> User.RI_Start {
Taste::coordinates => "907 1467 1207 1467 1207 1467 1519 1467";
};
Lift_Model_PI_Operate_lift_Controller_RI_Operate_lift : SUBPROGRAM ACCESS Lift_Model.PI_Operate_lift -> Controller.RI_Operate_lift {
Taste::coordinates => "2027 859 2166 859 2166 859 2306 859";
};
User_PI_door_status_Controller_RI_door_status : SUBPROGRAM ACCESS User.PI_door_status -> Controller.RI_door_status {
Taste::coordinates => "1519 1128 1207 1128 1207 1128 907 1128";
};
User_PI_floor_detected_Controller_RI_floor_detected : SUBPROGRAM ACCESS User.PI_floor_detected -> Controller.RI_floor_detected {
Taste::coordinates => "1519 1237 1207 1237 1207 1237 907 1237";
};
User_PI_position_Controller_RI_position : SUBPROGRAM ACCESS User.PI_position -> Controller.RI_position {
Taste::coordinates => "1519 1338 1207 1338 1207 1338 907 1338";
};
END interfaceview.others;
PROPERTIES
Taste::dataView => ("DataView");
Taste::dataViewPath => ("DataView.aadl");
Taste::coordinates => "0 0 2970 2100";
Taste::version => "2.2";
END interfaceview::IV;
KAZOO=../../kazoo
all: c
c: test-parse-c # Polyorb_HI_C output
cp controller/controller/* output.pohic/controller/RTDS/src
cp lift_model/* output.pohic/lift_model/SIMULINK/src
make -C output.pohic
test-parse-c: clean-c
$(KAZOO) -p --gw \
-o output.pohic \