Click or drag to resize
SwitchGetSwitchValue Method
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.3.0.2839)
Syntax
public double GetSwitchValue(
	short id
)

Parameters

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

Return Value

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

Implements

ISwitchV2GetSwitchValue(Int16)
Exceptions
ExceptionCondition
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.
InvalidValueExceptionIf id is outside the range 0 to MaxSwitch - 1
Remarks

This method was first introduced in Version 2.

See Also