sync/gen_statemachine.ysl2
changeset 610 1e3d39516f43
parent 609 a22a400611ca
child 617 0caa732cf9a4
     1.1 --- a/sync/gen_statemachine.ysl2	Thu May 12 11:21:57 2016 +0200
     1.2 +++ b/sync/gen_statemachine.ysl2	Thu May 12 12:58:40 2016 +0200
     1.3 @@ -8,9 +8,6 @@
     1.4  
     1.5  tstylesheet {
     1.6  
     1.7 -    key "ActionByNames", "/protocol/fsm/state/event//action", "@name";
     1.8 -    variable "UniqueActions", "/protocol/fsm/state/event//action[generate-id()=generate-id(key('ActionByNames',@name)[1])]";
     1.9 -
    1.10      template "/protocol/fsm" {
    1.11          document "../src/sync_fsm.h", "text"
    1.12          ||
    1.13 @@ -52,13 +49,6 @@
    1.14  
    1.15          void fsm_«@name»_inject(PEP_SESSION session, «@name»_event event);
    1.16  
    1.17 -        // decoders
    1.18 -
    1.19 -        `` apply "$UniqueActions[starts-with(@name,'send')]",0 mode="proto" with "pfx", "'decode'"
    1.20 -
    1.21 -        // encoders 
    1.22 -
    1.23 -        `` apply "$UniqueActions[starts-with(@name,'send')]",0 mode="proto" with "pfx", "'encode'"
    1.24          ||
    1.25          ||
    1.26          #include "sync_fsm.h"
    1.27 @@ -112,23 +102,6 @@
    1.28          > );\n
    1.29      }
    1.30  
    1.31 -    def "xsl:typeOfActionParam" {
    1.32 -        param "n", "name(.)";
    1.33 -        result "name(ancestor::event/child::parm[child::*[position()=2 and name(.)=$n]]/child::*[position()=1])";
    1.34 -    }
    1.35 -
    1.36 -    template "action", mode="proto" {
    1.37 -        param "pfx";
    1.38 -        > void «$pfx»«substring-after(@name, 'send')»(
    1.39 -        if "count(parm/*) = 0"
    1.40 -            > void
    1.41 -        for "set:distinct(parm/*)" {
    1.42 -            > «xsl:typeOfActionParam()» «name(.)»
    1.43 -            if "position() != last()" > ,
    1.44 -        }
    1.45 -        | );
    1.46 -    }
    1.47 -
    1.48      template "transition" | return «@target»;
    1.49  }
    1.50