ISwitchV2GetSwitchValue Method |
Namespace: ASCOM.DeviceInterface
| Exception | Condition |
|---|---|
| InvalidOperationException | If there is a temporary condition that prevents the device value being returned. |
| InvalidValueException | If id is outside the range 0 to MaxSwitch - 1 |
| NotConnectedException | If the device is not connected |
| DriverException | An error occurred that is not described by one of the more specific ASCOM exceptions. Include sufficient detail in the message text to enable the issue to be accurately diagnosed by someone other than yourself. |
Must be implemented, must not throw a MethodNotImplementedException.
Some devices do not support reading their state although they do allow state to be set. In these cases, on startup, the driver can not know the hardware state and it is recommended that the driver either:
In both cases the driver should save a local copy of the state which it last set and return this through GetSwitch(Int16) and GetSwitchValue(Int16)
Devices are numbered from 0 to MaxSwitch - 1.
This is a Version 2 method.