pamoja for TypeScript - v0.2.0
    Preparing search index...

    Class RuleEvaluator

    The decisions a rule file makes, reading by reading, with no link and no outputs of its own.

    Index
    • get actuators(): string[]

      The actuators the rules drive, each once, in name order: the outputs the program has to have.

      Returns string[]

    • get topics(): string[]

      The topics the rules watch, each once, in name order: the topics to subscribe to.

      Returns string[]

    • Judges one reading from one topic against every rule that watches it, and returns what fired in the order the rules are listed: empty when no rule watches the topic or the reading changed nothing.

      Throws if a rule watches the topic and the reading is not a finite number.

      Parameters

      • topic: string
      • reading: number

      Returns RuleFired[]

    • Whether a rule's condition currently holds, or null for a name no rule has.

      Parameters

      • rule: string

      Returns boolean | null

    • Writes the rules back out as the file a fleet shares.

      Returns string

    • Whether any rule watches a topic, so the program knows whether to decode a message.

      Parameters

      • topic: string

      Returns boolean

    • Loads a rule file and arms its rules, every condition starting cleared.

      Throws if the text is not a rule file, or holds a rule no engine could run, such as one that watches a filter or has nothing to do.

      Parameters

      • text: string

      Returns RuleEvaluator