Closed SloMusti closed 6 years ago
Is it enough for the state to be a single integer? Or should we support something more?
Unit-to-unit single state value is sufficient, we may wish to report more values to nodewatceher.
Added in 7b303cfa766282aa38118226576eeff63c9fd4dd.
An ubus call to set_alignment
can be used to configure current state and extra variables - the example has been updated to include this new API method, which can be called as local.set_alignment(42, [1,2,3,4])
where 42
is the current state and [1,2,3,4]
is a list of extra variables (all four must be sent otherwise the command is invalid).
At the other end, the state and variables can be read as part of the current state (under e.g. remote_status['alignment']['state']
).
Enable the state of alignment algorithm to be reported from unit to unit, state is defined here: https://github.com/IRNAS/koruza-rpi-package/blob/ca84a247669eb863fb5364a99d5a3390828be385/examples/alignment.py#L161
Report state to nodewatcher as well.