SignalId
pub struct SignalId
Which observation a rule watches.
The signal is addressed rather than named, which is what lets one rule shape serve every domain.
SignalId — fields
domain: SignalDomain
Where the observation comes from.
field: SignalField
Which quantity of it.
index: u32
Which one: a PIF channel number, a motion zone id, or the slot
from crate::Camera::register_signal.
For SignalDomain::Region leave this zero and pass the region
id to crate::Camera::add_rule, which fills it in.
SignalId — methods
pub fn new(domain: SignalDomain, field: SignalField) -> Self
A signal in a domain, on a field.
pub fn region(field: SignalField) -> Self
A statistic of the region a rule is attached to.
The index is filled in by crate::Camera::add_rule from the
region id you give it, so the common case never has to look a
slot up.
pub fn device(field: SignalField) -> Self
A camera telemetry reading.
pub fn pif(field: SignalField, channel: u8) -> Self
A process-interface channel.
pub fn motion(field: SignalField, zone_id: u32) -> Self
A motion zone.
pub fn user(slot: u32) -> Self
A value the application publishes, by the slot
crate::Camera::register_signal returned.