Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Rx vs Tx reversal

...

Code Block
  rule mischief_subscriptions {
    select when mischief subscriptions
    foreach ent:things setting(thing,index)
      // introduce mischief pico to thing[index] pico
      event:send(
        { "eci": ent:mischief, "eid": "subscription",
          "domain": "wrangler", "type": "subscription",
          "attrs": { "name": "thing" + (index.as("Number")+1),
                     "Rx_role": "thingcontroller",
                     "Tx_role": "controllerthing",
                     "channel_type": "subscription",
                     "wellKnown_Tx": thing } } )
  }

...

Code Block
  rule mischief_hat_lifted {
    select when mischief hat_lifted
    foreach Subscriptions:established("RxTx_role","thing") setting (subscription)
      pre {
        thing_subs = subscription.klog("subs")
      }
      event:send(
        { "eci": subscription{"Tx"}, "eid": "hat-lifted",
          "domain": "mischief", "type": "hat_lifted" }
      )
  }

...