SwitchSwitchStep Method |
Namespace: ASCOM.DriverAccess
| Exception | Condition |
|---|---|
| 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. The device did not successfully complete the request. |
SwitchStep(Int16) must be greater than zero, two state devices must return 1.0.
The number of states is determined from (MaxSwitchValue(Int16) - MinSwitchValue(Int16) ) / SwitchStep(Int16) + 1, this must be an integer, value 2 for a boolean device and more than 2 for a multi-state device.
SwitchStep, MinSwitchValue and MaxSwitchValue can be used to determine the way the device is controlled and/or displayed, for example by setting the number of decimal places or number of states for a display.
This method was first introduced in Version 2.