Expand description
The C ABI for rules between nodes.
A rule file is judged here reading by reading, with no link: the host hands over the
topic and the reading each message carried, and learns which rules set or cleared and
what each calls for, which the host then carries out. That is the deciding half of the
Rust RuleEngine, which owns a link and actuators and so cannot cross a C ABI.
What fired crosses as JSON, an array of objects with the rule by name, the edge
(set or cleared), the reading, and its actions, each written exactly as the
rule file writes an action: { "drive": ..., "on": ... } or
{ "publish": ..., "payload": ... }.
Structs§
- Pamoja
Rule Evaluator - An opaque handle to a set of rules armed to judge readings.
Functions§
- pamoja_
rule_ ⚠evaluator_ actuators_ json - Lists the actuators the rules drive, which are the outputs the host has to have.
- pamoja_
rule_ ⚠evaluator_ evaluate - Judges one reading from one topic against every rule that watches it.
- pamoja_
rule_ ⚠evaluator_ free - Releases an evaluator handle.
- pamoja_
rule_ ⚠evaluator_ from_ json - Loads a rule file and arms its rules, every condition starting cleared.
- pamoja_
rule_ ⚠evaluator_ is_ set - Reports whether a rule’s condition currently holds.
- pamoja_
rule_ ⚠evaluator_ to_ json - Writes the rules back out as the file a fleet shares.
- pamoja_
rule_ ⚠evaluator_ topics_ json - Lists the topics the rules watch, which are the topics to subscribe to.
- pamoja_
rule_ ⚠evaluator_ watches - Reports whether any rule watches a topic, so the host knows whether to decode a message before handing it over.