Commit d1c0a477 authored by yoogx's avatar yoogx

* Update model to AADLv2

parent 4a980abc
AADL_VERSION=-aadlv1
AADL_VERSION=-aadlv2
OCARINA_FLAGS= -f -g petri_nets
----------
-- Data --
----------
data Alpha_Type
properties
Data_Model::Data_Representation => integer;
end Alpha_Type;
-------------------
-- Subprograms --
-------------------
subprogram collecte_donnee
features
d_source : out parameter Alpha_Type;
end collecte_donnee;
subprogram traite
features
d_info : in parameter Alpha_Type;
d_ordre : out parameter Alpha_Type;
end traite;
subprogram action
features
d_action : in parameter Alpha_Type;
end action;
---------------
-- Threads --
---------------
-- interfaces
thread capteur
features
evenement : out event data port Alpha_Type;
end capteur;
thread controle
features
info_capteur : in event data port Alpha_Type;
comm_servo : out event data port Alpha_Type;
end controle;
thread servomoteur
features
ordre : in event data port Alpha_Type;
end servomoteur;
-- implementations
thread implementation capteur.i
calls {
D_Spg : subprogram collecte_donnee;
};
connections
parameter D_Spg.d_source -> evenement;
properties
Dispatch_Protocol => Periodic;
Period => 110 ms;
end capteur.i;
thread implementation controle.i
calls {
T_Spg : subprogram traite;
};
connections
parameter info_capteur -> T_Spg.d_info;
parameter T_Spg.d_ordre -> comm_servo;
properties
Dispatch_Protocol => Sporadic;
Period => 110 ms;
Deployment::Priority => 2;
end controle.i;
thread implementation servomoteur.i
calls main : {
A_Spg : subprogram action;
};
connections
parameter ordre -> A_Spg.d_action;
properties
Dispatch_Protocol => Aperiodic;
Deployment::Priority => 1;
end servomoteur.i;
-----------------
-- Processes --
-----------------
-- interfaces
process p_capteur
features
evenement : out event data port Alpha_Type;
end p_capteur;
process p_controle
features
info_capteur_droit : in event data port Alpha_Type;
comm_servo_droit : out event data port Alpha_Type;
info_capteur_gauche : in event data port Alpha_Type;
comm_servo_gauche : out event data port Alpha_Type;
end p_controle;
process p_servomoteur
features
ordre : in event data port Alpha_Type;
end p_servomoteur;
-- implementations
process implementation p_capteur.i
subcomponents
th_c : thread capteur.i;
connections
event data port th_c.evenement -> evenement;
end p_capteur.i;
process implementation p_controle.i
subcomponents
th_ctrl_droit : thread controle.i;
th_ctrl_gauche : thread controle.i;
connections
event data port info_capteur_droit -> th_ctrl_droit.info_capteur;
event data port th_ctrl_droit.comm_servo -> comm_servo_droit;
event data port info_capteur_gauche -> th_ctrl_gauche.info_capteur;
event data port th_ctrl_gauche.comm_servo -> comm_servo_gauche;
end p_controle.i;
process implementation p_servomoteur.i
subcomponents
th_servomoteur : thread servomoteur.i;
connections
event data port ordre -> th_servomoteur.ordre;
end p_servomoteur.i;
--------------
-- System --
--------------
processor the_processor
end the_processor;
-- interface
system robot
end robot;
-- implementation
system implementation robot.i
subcomponents
proc_capteur_droit : process p_capteur.i;
proc_capteur_gauche : process p_capteur.i;
proc_controle : process p_controle.i;
proc_servomoteur_droit : process p_servomoteur.i;
proc_servomoteur_gauche : process p_servomoteur.i;
CPU1 : processor the_processor;
connections
event data port proc_capteur_droit.evenement -> proc_controle.info_capteur_droit;
event data port proc_capteur_gauche.evenement -> proc_controle.info_capteur_gauche;
event data port proc_controle.comm_servo_droit -> proc_servomoteur_droit.ordre;
event data port proc_controle.comm_servo_gauche -> proc_servomoteur_gauche.ordre;
properties
actual_processor_binding => reference CPU1 applies to proc_capteur_droit;
actual_processor_binding => reference CPU1 applies to proc_capteur_gauche;
actual_processor_binding => reference CPU1 applies to proc_controle;
actual_processor_binding => reference CPU1 applies to proc_servomoteur_droit;
actual_processor_binding => reference CPU1 applies to proc_servomoteur_gauche;
end robot.i;
package Robot
public
with Deployment;
with Data_Model;
----------
-- Data --
----------
data Alpha_Type
properties
Data_Model::Data_Representation => integer;
end Alpha_Type;
-------------------
-- Subprograms --
-------------------
subprogram collecte_donnee
features
d_source : out parameter Alpha_Type;
end collecte_donnee;
subprogram traite
features
d_info : in parameter Alpha_Type;
d_ordre : out parameter Alpha_Type;
end traite;
subprogram action
features
d_action : in parameter Alpha_Type;
end action;
---------------
-- Threads --
---------------
-- interfaces
thread capteur
features
evenement : out event data port Alpha_Type;
end capteur;
thread controle
features
info_capteur : in event data port Alpha_Type;
comm_servo : out event data port Alpha_Type;
end controle;
thread servomoteur
features
ordre : in event data port Alpha_Type;
end servomoteur;
-- implementations
thread implementation capteur.i
calls C: {
D_Spg : subprogram collecte_donnee;
};
connections
parameter D_Spg.d_source -> evenement;
properties
Dispatch_Protocol => Periodic;
Period => 110 ms;
end capteur.i;
thread implementation controle.i
calls C: {
T_Spg : subprogram traite;
};
connections
parameter info_capteur -> T_Spg.d_info;
parameter T_Spg.d_ordre -> comm_servo;
properties
Dispatch_Protocol => Sporadic;
Period => 110 ms;
Deployment::Priority => 2;
end controle.i;
thread implementation servomoteur.i
calls main : {
A_Spg : subprogram action;
};
connections
parameter ordre -> A_Spg.d_action;
properties
Dispatch_Protocol => Aperiodic;
Deployment::Priority => 1;
end servomoteur.i;
-----------------
-- Processes --
-----------------
-- interfaces
process p_capteur
features
evenement : out event data port Alpha_Type;
end p_capteur;
process p_controle
features
info_capteur_droit : in event data port Alpha_Type;
comm_servo_droit : out event data port Alpha_Type;
info_capteur_gauche : in event data port Alpha_Type;
comm_servo_gauche : out event data port Alpha_Type;
end p_controle;
process p_servomoteur
features
ordre : in event data port Alpha_Type;
end p_servomoteur;
-- implementations
process implementation p_capteur.i
subcomponents
th_c : thread capteur.i;
connections
port th_c.evenement -> evenement;
end p_capteur.i;
process implementation p_controle.i
subcomponents
th_ctrl_droit : thread controle.i;
th_ctrl_gauche : thread controle.i;
connections
port info_capteur_droit -> th_ctrl_droit.info_capteur;
port th_ctrl_droit.comm_servo -> comm_servo_droit;
port info_capteur_gauche -> th_ctrl_gauche.info_capteur;
port th_ctrl_gauche.comm_servo -> comm_servo_gauche;
end p_controle.i;
process implementation p_servomoteur.i
subcomponents
th_servomoteur : thread servomoteur.i;
connections
port ordre -> th_servomoteur.ordre;
end p_servomoteur.i;
--------------
-- System --
--------------
processor the_processor
end the_processor;
-- interface
system robot
end robot;
-- implementation
system implementation robot.i
subcomponents
proc_capteur_droit : process p_capteur.i;
proc_capteur_gauche : process p_capteur.i;
proc_controle : process p_controle.i;
proc_servomoteur_droit : process p_servomoteur.i;
proc_servomoteur_gauche : process p_servomoteur.i;
CPU1 : processor the_processor;
connections
port proc_capteur_droit.evenement -> proc_controle.info_capteur_droit;
port proc_capteur_gauche.evenement -> proc_controle.info_capteur_gauche;
port proc_controle.comm_servo_droit -> proc_servomoteur_droit.ordre;
port proc_controle.comm_servo_gauche -> proc_servomoteur_gauche.ordre;
properties
actual_processor_binding => reference (CPU1) applies to proc_capteur_droit;
actual_processor_binding => reference (CPU1) applies to proc_capteur_gauche;
actual_processor_binding => reference (CPU1) applies to proc_controle;
actual_processor_binding => reference (CPU1) applies to proc_servomoteur_droit;
actual_processor_binding => reference (CPU1) applies to proc_servomoteur_gauche;
end robot.i;
end Robot;
robot.aadl:178:05: Warning: actual_processor_binding is not a list while the corresponding property name at deployment_properties.aadl:14:02 is a list.
robot.aadl:178:05: Warning: The value of actual_processor_binding has been converted into a list.
robot.aadl:179:05: Warning: actual_processor_binding is not a list while the corresponding property name at deployment_properties.aadl:14:02 is a list.
robot.aadl:179:05: Warning: The value of actual_processor_binding has been converted into a list.
robot.aadl:181:05: Warning: actual_processor_binding is not a list while the corresponding property name at deployment_properties.aadl:14:02 is a list.
robot.aadl:181:05: Warning: The value of actual_processor_binding has been converted into a list.
robot.aadl:183:05: Warning: actual_processor_binding is not a list while the corresponding property name at deployment_properties.aadl:14:02 is a list.
robot.aadl:183:05: Warning: The value of actual_processor_binding has been converted into a list.
robot.aadl:184:05: Warning: actual_processor_binding is not a list while the corresponding property name at deployment_properties.aadl:14:02 is a list.
robot.aadl:184:05: Warning: The value of actual_processor_binding has been converted into a list.
------------------------------------------
------ Ocarina Petri Nets Generator ------
------------------------------------------
robot.aadl:165:03: warning: CPU1 references a component type
robot.aadl:170:05: warning: CPU1 references a component type
ocarina: Total: 0 error and 1 warning
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~ Timed Petri Nets ~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net AADL_TO_TPN_GENERATED
pr proc_controle_th_ctrl_gauche_Preemp1 > proc_servomoteur_gauche_th_servomoteur_Preemp1
pr proc_controle_th_ctrl_gauche_Preemp1 > proc_servomoteur_gauche_th_servomoteur_Begin
pr proc_controle_th_ctrl_gauche_Preemp1 > proc_servomoteur_droit_th_servomoteur_Preemp1
pr proc_controle_th_ctrl_gauche_Preemp1 > proc_servomoteur_droit_th_servomoteur_Begin
pr proc_controle_th_ctrl_gauche_Preemp1 > proc_capteur_gauche_th_c_Preemp1
pr proc_controle_th_ctrl_gauche_Preemp1 > proc_capteur_gauche_th_c_Begin
pr proc_controle_th_ctrl_gauche_Preemp1 > proc_capteur_droit_th_c_Preemp1
pr proc_controle_th_ctrl_gauche_Preemp1 > proc_capteur_droit_th_c_Begin
pr proc_controle_th_ctrl_gauche_Begin > proc_servomoteur_gauche_th_servomoteur_Preemp1
pr proc_controle_th_ctrl_gauche_Begin > proc_servomoteur_gauche_th_servomoteur_Begin
pr proc_controle_th_ctrl_gauche_Begin > proc_servomoteur_droit_th_servomoteur_Preemp1
pr proc_controle_th_ctrl_gauche_Begin > proc_servomoteur_droit_th_servomoteur_Begin
pr proc_controle_th_ctrl_gauche_Begin > proc_capteur_gauche_th_c_Preemp1
pr proc_controle_th_ctrl_gauche_Begin > proc_capteur_gauche_th_c_Begin
pr proc_controle_th_ctrl_gauche_Begin > proc_capteur_droit_th_c_Preemp1
pr proc_controle_th_ctrl_gauche_Begin > proc_capteur_droit_th_c_Begin
pr proc_controle_th_ctrl_droit_Preemp1 > proc_servomoteur_gauche_th_servomoteur_Preemp1
pr proc_controle_th_ctrl_droit_Preemp1 > proc_servomoteur_gauche_th_servomoteur_Begin
pr proc_controle_th_ctrl_droit_Preemp1 > proc_servomoteur_droit_th_servomoteur_Preemp1
pr proc_controle_th_ctrl_droit_Preemp1 > proc_servomoteur_droit_th_servomoteur_Begin
pr proc_controle_th_ctrl_droit_Preemp1 > proc_capteur_gauche_th_c_Preemp1
pr proc_controle_th_ctrl_droit_Preemp1 > proc_capteur_gauche_th_c_Begin
pr proc_controle_th_ctrl_droit_Preemp1 > proc_capteur_droit_th_c_Preemp1
pr proc_controle_th_ctrl_droit_Preemp1 > proc_capteur_droit_th_c_Begin
pr proc_controle_th_ctrl_droit_Begin > proc_servomoteur_gauche_th_servomoteur_Preemp1
pr proc_controle_th_ctrl_droit_Begin > proc_servomoteur_gauche_th_servomoteur_Begin
pr proc_controle_th_ctrl_droit_Begin > proc_servomoteur_droit_th_servomoteur_Preemp1
pr proc_controle_th_ctrl_droit_Begin > proc_servomoteur_droit_th_servomoteur_Begin
pr proc_controle_th_ctrl_droit_Begin > proc_capteur_gauche_th_c_Preemp1
pr proc_controle_th_ctrl_droit_Begin > proc_capteur_gauche_th_c_Begin
pr proc_controle_th_ctrl_droit_Begin > proc_capteur_droit_th_c_Preemp1
pr proc_controle_th_ctrl_droit_Begin > proc_capteur_droit_th_c_Begin
pr proc_servomoteur_gauche_th_servomoteur_Preemp1 > proc_capteur_gauche_th_c_Preemp1
pr proc_servomoteur_gauche_th_servomoteur_Preemp1 > proc_capteur_gauche_th_c_Begin
pr proc_servomoteur_gauche_th_servomoteur_Preemp1 > proc_capteur_droit_th_c_Preemp1
pr proc_servomoteur_gauche_th_servomoteur_Preemp1 > proc_capteur_droit_th_c_Begin
pr proc_servomoteur_gauche_th_servomoteur_Begin > proc_capteur_gauche_th_c_Preemp1
pr proc_servomoteur_gauche_th_servomoteur_Begin > proc_capteur_gauche_th_c_Begin
pr proc_servomoteur_gauche_th_servomoteur_Begin > proc_capteur_droit_th_c_Preemp1
pr proc_servomoteur_gauche_th_servomoteur_Begin > proc_capteur_droit_th_c_Begin
pr proc_servomoteur_droit_th_servomoteur_Preemp1 > proc_capteur_gauche_th_c_Preemp1
pr proc_servomoteur_droit_th_servomoteur_Preemp1 > proc_capteur_gauche_th_c_Begin
pr proc_servomoteur_droit_th_servomoteur_Preemp1 > proc_capteur_droit_th_c_Preemp1
pr proc_servomoteur_droit_th_servomoteur_Preemp1 > proc_capteur_droit_th_c_Begin
pr proc_servomoteur_droit_th_servomoteur_Begin > proc_capteur_gauche_th_c_Preemp1
pr proc_servomoteur_droit_th_servomoteur_Begin > proc_capteur_gauche_th_c_Begin
pr proc_servomoteur_droit_th_servomoteur_Begin > proc_capteur_droit_th_c_Preemp1
pr proc_servomoteur_droit_th_servomoteur_Begin > proc_capteur_droit_th_c_Begin
tr proc_capteur_droit_th_c_Init_Dispatch [0,w[ proc_capteur_droit_th_c_Halted proc_capteur_gauche_th_c_Halted proc_controle_th_ctrl_droit_Halted proc_controle_th_ctrl_gauche_Halted proc_servomoteur_droit_th_servomoteur_Halted proc_servomoteur_gauche_th_servomoteur_Halted -> proc_capteur_droit_th_c_Wait_For_Dispatch proc_capteur_gauche_th_c_Wait_For_Dispatch proc_controle_th_ctrl_droit_Wait_For_Dispatch proc_controle_th_ctrl_gauche_Wait_For_Dispatch proc_servomoteur_droit_th_servomoteur_Wait_For_Dispatch proc_servomoteur_gauche_th_servomoteur_Wait_For_Dispatch
tr proc_capteur_droit_th_c_Period_Event [110,110] proc_capteur_droit_th_c_Hyperperiod -> proc_capteur_droit_th_c_Clock
pl proc_capteur_droit_th_c_Halted (1)
......@@ -144,7 +106,7 @@ pl proc_capteur_droit_th_c_evenement_Bus (0)
pl proc_capteur_gauche_th_c_evenement_Bus (0)
pl proc_controle_th_ctrl_droit_comm_servo_Bus (0)
pl proc_controle_th_ctrl_gauche_comm_servo_Bus (0)
robot.aadl:165:03: warning: CPU1 references a component type
robot.aadl:170:05: warning: CPU1 references a component type
ocarina: Total: 0 error and 1 warning
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~ Colored Petri Nets ~~~~~~~~~~~
......@@ -156,34 +118,34 @@ CM(11:declaration,1,3,1,19:Msg_Types is [msg];)
CM(11:declaration,1,4,1,6:Domain)
CM(11:declaration,1,5,1,32:mess is <Threads_Ids,Msg_Types>;)
CM(11:declaration,1,6,1,3:Var)
CM(11:declaration,1,7,1,57: x, y, x580, x641, x714, x773, x884, x946 in Threads_Ids;)
CM(11:declaration,1,7,1,57: x, y, x584, x646, x720, x780, x892, x954 in Threads_Ids;)
CM(11:declaration,1,8,1,16: m in Msg_Types;)
CN(10:transition,1123)
CT(4:name,1123,37:proc_capteur_droit_th_c_Init_Dispatch)
CA(3:arc,1128,1115,1123)
CT(9:valuation,1128,6:<x580>)
CT(9:valuation,1128,6:<x584>)
CA(3:arc,2597,1294,1123)
CT(9:valuation,2597,6:<x641>)
CT(9:valuation,2597,6:<x646>)
CA(3:arc,2607,1473,1123)
CT(9:valuation,2607,6:<x714>)
CT(9:valuation,2607,6:<x720>)
CA(3:arc,2637,1751,1123)
CT(9:valuation,2637,6:<x773>)
CT(9:valuation,2637,6:<x780>)
CA(3:arc,2667,2029,1123)
CT(9:valuation,2667,6:<x884>)
CT(9:valuation,2667,6:<x892>)
CA(3:arc,2697,2259,1123)
CT(9:valuation,2697,6:<x946>)
CT(9:valuation,2697,6:<x954>)
CA(3:arc,1133,1123,1119)
CT(9:valuation,1133,6:<x580>)
CT(9:valuation,1133,6:<x584>)
CA(3:arc,2602,1123,1298)
CT(9:valuation,2602,6:<x641>)
CT(9:valuation,2602,6:<x646>)
CA(3:arc,2612,1123,1477)
CT(9:valuation,2612,6:<x714>)
CT(9:valuation,2612,6:<x720>)
CA(3:arc,2642,1123,1755)
CT(9:valuation,2642,6:<x773>)
CT(9:valuation,2642,6:<x780>)
CA(3:arc,2672,1123,2033)
CT(9:valuation,2672,6:<x884>)
CT(9:valuation,2672,6:<x892>)
CA(3:arc,2702,1123,2263)
CT(9:valuation,2702,6:<x946>)
CT(9:valuation,2702,6:<x954>)
CN(5:place,1115)
CT(4:name,1115,30:proc_capteur_droit_th_c_Halted)
CT(6:domain,1115,11:Threads_Ids)
......
Markdown is supported
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