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: 6.0.0.0 (6.2.0.2774)
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
Remarks

SwitchStep(Int16) must be greater than zero, two state devices should 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