Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

KRL uses the "event condition action" pattern. Since there is only space for a single Boolean expression in the condition, KRL adds a prelude section in which preparatory computations can be done. It fits in between the event and condition, setting things up for the conditional action. The prelude begins in line 3 in the rule template shown below. 

rule test {
  select when sensor heartbeat
  pre {
    ...
  }
  if condition_is_true then {
    send_directive("Heartbeat")
  }
  fired {
    ...
  } else {
    ...
  } 
}


See the child pages of this page for details.

  • No labels