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: 3351c4f3fa64146a7efd5b51ed4591e32a0a5484
Syntax
public double GetSwitchValue(
	short id
)

Parameters

id
Type: SystemInt16
The device number whose value must 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 must be returned.
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

This method was first introduced in Version 2.

See Also