control: Timer trigger can preload groups
The timer trigger is used to run actions when it expires. This commit
adds the ability for it to preload group properties so the latest values
are in the cache before it runs the actions.
This means that there doesn't need to be propertiesChanged triggers for
the groups, instead the load just reads them straight from D-Bus.
One reason to use this is so an action can be run on a slower cadence than
propertiesChanged signals would be sent. An example is a virtual sensor
that has component sensors spread out across multiple daemons. Even if
the daemons all use the same poll rates, they can be staggered between
them so virtual sensor changes could occur faster then any component
sensor read interval.
The trade off is there will be D-Bus traffic every timer interval, even
in the case the group property values don't change.
To enable this, use the following in the trigger JSON:
"preload_groups": true
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I1a92007c10fdd8017c1a89d15983ae50134c852a
3 files changed