explicit debug messages in fsm sync
authorVolker Birk <vb@pep-project.org>
Thu, 16 Jan 2020 15:04:04 +0100
branchsync
changeset 43377e8015c705ae
parent 4336 628cb20cd08a
child 4338 7a9de0786596
explicit debug messages in fsm
sync/gen_statemachine.ysl2
sync/sync.fsm
     1.1 --- a/sync/gen_statemachine.ysl2	Thu Jan 16 12:42:09 2020 +0100
     1.2 +++ b/sync/gen_statemachine.ysl2	Thu Jan 16 15:04:04 2020 +0100
     1.3 @@ -1361,7 +1361,7 @@
     1.4          if "condition|action|send" |
     1.5          ||
     1.6              «../../@name»_SERVICE_LOG("received event", "«@name»");
     1.7 -            `` apply "transition|action|condition|else|send";
     1.8 +            `` apply "transition|action|condition|else|send|debug";
     1.9          ||
    1.10          if "name(*[last()])!='transition'" {
    1.11              |
    1.12 @@ -1399,6 +1399,9 @@
    1.13          ||
    1.14      }
    1.15  
    1.16 +    template "debug"
    1.17 +        | KeySync_SERVICE_LOG("«.»", "«ancestor::protocol/@name»");
    1.18 +
    1.19      template "action" {
    1.20          const "fsm", "ancestor::fsm";
    1.21          ||
    1.22 @@ -1430,7 +1433,7 @@
    1.23          if (result) {
    1.24              «$fsm/@name»_SERVICE_LOG("condition applies", "«@name»");
    1.25          ||
    1.26 -        apply "transition|action|condition|else|send";
    1.27 +        apply "transition|action|condition|else|send|debug";
    1.28          | }
    1.29      }
    1.30  
    1.31 @@ -1440,7 +1443,7 @@
    1.32  
    1.33          | else {
    1.34          |> «ancestor::fsm/@name»_SERVICE_LOG("condition does not apply", "«preceding-sibling::*[last()]/@name»");
    1.35 -        apply "transition|action|condition|else|send";
    1.36 +        apply "transition|action|condition|else|send|debug";
    1.37          | }
    1.38      }
    1.39  }
     2.1 --- a/sync/sync.fsm	Thu Jan 16 12:42:09 2020 +0100
     2.2 +++ b/sync/sync.fsm	Thu Jan 16 15:04:04 2020 +0100
     2.3 @@ -38,7 +38,7 @@
     2.4  
     2.5              on Beacon {
     2.6                  if sameChallenge {
     2.7 -                    // this is our own Beacon; ignore
     2.8 +                    debug > this is our own Beacon; ignore
     2.9                  }
    2.10                  else {
    2.11                      if weAreOfferer {