Click or drag to resize

SwitchSwitchStep Method

Returns the step size that this device supports. This gives the difference between successive values of the device.

Namespace:  ASCOM.DriverAccess
Assembly:  ASCOM.DriverAccess (in ASCOM.DriverAccess.dll) Version: 3351c4f3fa64146a7efd5b51ed4591e32a0a5484
Syntax
public double SwitchStep(
	short id
)

Parameters

id
Type: SystemInt16
The device number whose value should be returned

Return Value

Type: Double
The step size for this device.

Implements

ISwitchV2SwitchStep(Int16)
Exceptions
ExceptionCondition
InvalidValueExceptionIf id is outside the range 0 to MaxSwitch - 1
NotConnectedExceptionIf the device is not connected
DriverExceptionAn error occurred that is not described by one of the more specific ASCOM exceptions. The device did not successfully complete the request.
Remarks

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.

See Also