p≡p engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

31 lines
868 B

// This file is under GNU General Public License 3.0
// see LICENSE.txt
include yslt.yml2
tstylesheet {
template "protocol/fsm[count(state)>0]" document "{@name}.dot", "text"
||
digraph finite_state_machine {
rankdir=LR;
node [shape=point];
InitState;
node [shape=doublecircle];
End;
node [shape=circle, style=filled, fillcolor=lightgrey];
`` apply "descendant::transition";
}
||
template "transition" {
const "event", "ancestor::event/@name";
choose {
when "ancestor::fsm/message[@name=$event]"
| «ancestor::state/@name» -> «@target» [ label="«ancestor::event/@name»", color=blue ];
otherwise
| «ancestor::state/@name» -> «@target» [ label="«ancestor::event/@name»", color=red ];
}
}
}