SwitchGetSwitch Method |
Namespace: ASCOM.DriverAccess
| Exception | Condition |
|---|---|
| InvalidValueException | If id is outside the range 0 to MaxSwitch - 1 |
| InvalidOperationException | If the state cannot be read. This is not recommended but it is not always possible to read the state from some hardware. Once the state has been set the last state set must be returned. |
| NotConnectedException | If the device is not connected |
| DriverException | An error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request. |
Must be implemented, must not throw an ASCOM.MethodNotImplementedException
All devices must implement this. A multi-state device will return true if the device is at the maximum value, false if the value is at the minimum and either true or false as specified by the driver developer for intermediate values.