|
X2 Standard
Version 1.26
|
The CircuitRefreshInterface allows a power control driver to specify how often TheSkyX should re-query the device for authoritative circuit state. More...
#include <circuitrefreshinterface.h>
Public Member Functions | |
| virtual int | circuitRefreshInterval (int &nOutInterval_ms) |
| Returns the recommended refresh interval (in milliseconds) for circuit state. More... | |
The CircuitRefreshInterface allows a power control driver to specify how often TheSkyX should re-query the device for authoritative circuit state.
This interface is optional. If the driver does not support this interface, TheSkyX assumes the circuit state only changes as a result of commands issued through this driver instance and will not perform periodic refreshes.
Drivers should support this interface for hardware whose circuit state may change externally (for example, via a front panel, mobile application, web interface, scheduling logic, cloud automation, or other client connections).
The refresh interval applies to the circuit state as a whole (e.g. on/off, locked, access, etc.), and should reflect a balance between responsiveness to external changes and the cost of performing a full circuit state query.
This interface was added in TheSky build 14139. Use the TheSkyXFacadeForDriversInterface::build() method to react by either requiring a certain minimum build or gracefully degrading functionality.
Don't forget to respond accordingly in your queryAbstraction().
|
inlinevirtual |
Returns the recommended refresh interval (in milliseconds) for circuit state.
TheSkyX calls this method to determine how often it should re-query the device for authoritative circuit state. The default implementation returns 1000 ms as the default.
The driver should return an interval appropriate for the hardware's expected external change rate and communication cost.
| nOutInterval_ms | (out) The refresh interval in milliseconds. |