SignalId
class optris_sdk.alarms.SignalId
Which observation a rule watches.
Addressed rather than named, so a rule on a region's mean temperature, on the camera's chip temperature and on a PIF input are the same shape.
SignalId — properties
domain
Which family of signals: DOMAIN_REGION and friends.
field
Which value within that family: FIELD_MAX and friends.
index
The region slot, PIF channel or user slot, as applicable.
SignalId — methods
__repr__()
region(cls, field)
A region's statistic.
No index: camera.alarms.add(rule, region_id=...) fills the
slot in from the region it attaches the rule to, and a number
passed here would be discarded. A signal slot is not a region
id, and writing one as though it were is the mistake this
constructor removes the opportunity for.
device(cls, field)
Something the camera reports about itself.
pif(cls, field, channel)
A PIF channel.
user(cls, slot)
A value the application publishes itself.
slot is what Alarms.register_signal returned. There
is no field to choose: a published value is the whole of the
signal, so the field is fixed at FIELD_VALUE.
That field is 400 and not 0, and it is why this constructor
exists rather than leaving a caller to build the id. A user
signal addressed with field 0 reads as a region's minimum,
matches nothing in the user domain, and
Alarms.read_signal then reports it as having no value
-- which is indistinguishable from a signal nobody has
published to yet.