Returns the value for switch device id as a double.

Namespace: ASCOM.DriverAccess
Assembly: ASCOM.DriverAccess (in ASCOM.DriverAccess.dll) Version: 6.0.0.0 (6.1.1.2619)

Syntax

C#
public double GetSwitchValue(
	short id
)
Visual Basic
Public Function GetSwitchValue ( _
	id As Short _
) As Double
Visual C++
public:
virtual double GetSwitchValue(
	short id
) sealed

Parameters

id
Type: System..::..Int16
The device number whose value should be returned

Return Value

The value for this switch, this is expected to be between MinSwitchValue(Int16) and MaxSwitchValue(Int16).

Implements

ISwitchV2..::..GetSwitchValue(Int16)

Remarks

This method was first introduced in Version 2.

Exceptions

ExceptionCondition
ASCOM..::..InvalidOperationExceptionIf the value cannot be read. This is not recommended but it is not always possible to read the value from some hardware. Once the value has been set the last value set should be returned.
ASCOM..::..InvalidValueExceptionIf id is outside the range 0 to MaxSwitch - 1

See Also