Skip to content
Snippets Groups Projects
Commit eb042873 authored by Sophie Coudert's avatar Sophie Coudert
Browse files

update avSysML_timerRealNames.sysml test

parent 9494b616
No related branches found
No related tags found
2 merge requests!508Avatar sys ml 04 2024,!507Avatar sys ml 04 2024
......@@ -14,42 +14,42 @@ package AvatarInstance {
// COMMUNICATIONS $$$$$$$$$$$$$$$$$$$$$$$$
// Relation Sync_Relation =============
part Sync_Relation: '#Sync_Rel' = '#Sync_Rel'('@block1' = blk0, '@block2' = blk1_0, '@private'=true);
part Sync_Relation: '#Sync_Rel' = '#Sync_Rel'('@block1' = B0, '@block2' = B1_0, '@private'=true);
// Channel syn_in0_out1-------------
part syn_in0_out1 : '#Sync' = '#Sync'('@relation' = Sync_Relation);
binding : '#InSignalBinding' bind blk0.sig_in0 = syn_in0_out1;
binding : '#OutSignalBinding' bind blk1_0.sig_out1 = syn_in0_out1;
// Channel sync_in0_out1-------------
part sync_in0_out1 : '#Sync' = '#Sync'('@relation' = Sync_Relation);
binding : '#InSignalBinding' bind B0.in0 = sync_in0_out1;
binding : '#OutSignalBinding' bind B1_0.out1 = sync_in0_out1;
// Message of signal blk0.sig_in0............
// Message of signal B0.in0............
part def msg_in0 :> '#InMessage' {
private part '@channel' : '#Channel' = syn_in0_out1;
private part '@channel' : '#Channel' = sync_in0_out1;
attribute x : Integer;
attribute p : 'Point';
attribute b : Boolean;
}
// Message of signal blk1_0.sig_out1............
// Message of signal B1_0.out1............
part def msg_out1 :> '#OutMessage', msg_in0 {
attribute x redefines x;
attribute p redefines p;
attribute b redefines b;
}
// Channel syn_out0_in1-------------
part syn_out0_in1 : '#Sync' = '#Sync'('@relation' = Sync_Relation);
binding : '#OutSignalBinding' bind blk0.sig_out0 = syn_out0_in1;
binding : '#InSignalBinding' bind blk1_0.sig_in1 = syn_out0_in1;
// Channel sync_out0_in1-------------
part sync_out0_in1 : '#Sync' = '#Sync'('@relation' = Sync_Relation);
binding : '#OutSignalBinding' bind B0.out0 = sync_out0_in1;
binding : '#InSignalBinding' bind B1_0.in1 = sync_out0_in1;
// Message of signal blk1_0.sig_in1............
// Message of signal B1_0.in1............
part def msg_in1 :> '#InMessage' {
private part '@channel' : '#Channel' = syn_out0_in1;
private part '@channel' : '#Channel' = sync_out0_in1;
attribute x : Integer;
attribute p : 'Point';
attribute b : Boolean;
}
// Message of signal blk0.sig_out0............
// Message of signal B0.out0............
part def msg_out0 :> '#OutMessage', msg_in1 {
attribute x redefines x;
attribute p redefines p;
......@@ -58,8 +58,8 @@ package AvatarInstance {
// BLOCKS $$$$$$$$$$$$$$$$$$$$$$$$
// Block blk1=============
part blk1 : '#AvatarBlock' {
// Block B1=============
part B1 : '#AvatarBlock' {
// state-machine -------------------
exhibit state '@statemachine' : '#AvatarStateMachine' {
......@@ -74,8 +74,8 @@ package AvatarInstance {
// Sub-Blocks øøøøøøøøøøøøøøøøøøøøøøø
// Block blk1_0=============
part blk1_0 : '#AvatarBlock' {
// Block B1_0=============
part B1_0 : '#AvatarBlock' {
// Attributes ---------------------
attribute x : Integer := 0;
......@@ -83,11 +83,11 @@ package AvatarInstance {
attribute p : 'Point';
// Signals ---------------------
part sig_in1 : '#Channel';
part sig_out1 : '#Channel';
part in1 : '#Channel';
part out1 : '#Channel';
// Timers ---------------------
part tmr: '#AvatarTimer' = '#AvatarTimer'();
part t: '#AvatarTimer' = '#AvatarTimer'();
// state-machine -------------------
exhibit state '@statemachine' : '#AvatarStateMachine' {
......@@ -100,7 +100,7 @@ package AvatarInstance {
state receive_in1_0 : '#AvatarReceiveState' = '#AvatarReceiveState'(
'@request' = {
'#SendRequest'(
'@channel'= sig_out1,
'@channel'= out1,
'@payload' = msg_out1(
x,
p,
......@@ -115,18 +115,18 @@ package AvatarInstance {
state state1 : '#AvatarStandardState' = '#AvatarStandardState'(
'@pool' = {(
'#AvatarSetTimerRequest'(
'@channel'= tmr.'@set',
'@channel'= t.'@set',
'@payload' = '#TimerSetMsg'(10)
),
'#ReceiveRequest'(
'@index' = 2,
'@channel'= sig_in1
'@channel'= in1
)
)}
);
transition : '#AvatarTransition' first state1 if '@index' == 1
then set_tmr_0;
then set_t_0;
transition : '#AvatarTransition' first state1 if '@index' == 2
do action : '#ReceiveAction' {
......@@ -138,43 +138,43 @@ package AvatarInstance {
then done;
} then receive_in1_0;
state set_tmr_0 : '#AvatarSetTimerState';
state set_t_0 : '#AvatarSetTimerState';
transition : '#AvatarTransition' first set_tmr_0
transition : '#AvatarTransition' first set_t_0
then state2;
state expire_tmr_0 : '#AvatarExpireTimerState';
state expire_t_0 : '#AvatarExpireTimerState';
transition : '#AvatarTransition' first expire_tmr_0
transition : '#AvatarTransition' first expire_t_0
then state1;
state state2 : '#AvatarStandardState' = '#AvatarStandardState'(
'@pool' = {(
'#AvatarExpireTimerRequest'(
'@channel'= tmr.'@expire'
'@channel'= t.'@expire'
),
'#AvatarResetTimerRequest'(
'@index' = 2,
'@channel'= tmr.'@reset',
'@channel'= t.'@reset',
'@payload' = '#TimerResetMsg'()
)
)}
);
transition : '#AvatarTransition' first state2 if '@index' == 1
then expire_tmr_0;
then expire_t_0;
transition : '#AvatarTransition' first state2 if '@index' == 2
then reset_tmr_0;
then reset_t_0;
entry action startstate :'#AvatarStartState';
transition : '#AvatarTransition' first startstate
then state1;
state reset_tmr_0 : '#AvatarResetTimerState';
state reset_t_0 : '#AvatarResetTimerState';
transition : '#AvatarTransition' first reset_tmr_0
transition : '#AvatarTransition' first reset_t_0
then state2;
exit action stopstate :'#AvatarStopState';
......@@ -182,8 +182,8 @@ package AvatarInstance {
}
}
// Block blk0=============
part blk0 : '#AvatarBlock' {
// Block B0=============
part B0 : '#AvatarBlock' {
// Attributes ---------------------
attribute x : Integer default := 0;
......@@ -208,8 +208,8 @@ package AvatarInstance {
}
// Signals ---------------------
part sig_in0 : '#Channel';
part sig_out0 : '#Channel';
part in0 : '#Channel';
part out0 : '#Channel';
// state-machine -------------------
exhibit state '@statemachine' : '#AvatarStateMachine' {
......@@ -236,7 +236,7 @@ package AvatarInstance {
state prercv_in0_0 : '#AvatarPreReceiveState' = '#AvatarPreReceiveState' (
'@request' = {
'#ReceiveRequest'(
'@channel'= sig_in0
'@channel'= in0
)
}
);
......@@ -281,7 +281,7 @@ package AvatarInstance {
state presnd_out0_0 : '#AvatarPreSendState' = '#AvatarPreSendState' (
'@request' = {
'#SendRequest'(
'@channel'= sig_out0,
'@channel'= out0,
'@payload' = msg_out0(
x,
p,
......@@ -299,5 +299,5 @@ package AvatarInstance {
}
}
// Block Shortcut Links $$$$$$$$$$$$
part blk1_0 : '#AvatarBlock' :> blk1.blk1_0 = blk1.blk1_0;
part B1_0 : '#AvatarBlock' :> B1.B1_0 = B1.B1_0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment