Reports if the specified switch device can be written to, default true. This is false if the device cannot be written to, for example a limit switch or a sensor.

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

Syntax

C#
public bool CanWrite(
	short id
)
Visual Basic
Public Function CanWrite ( _
	id As Short _
) As Boolean
Visual C++
public:
virtual bool CanWrite(
	short id
) sealed

Parameters

id
Type: System..::..Int16
The number of the device whose write state is to be returned

Return Value

true if the device can be written to, otherwise false.

Implements

ISwitchV2..::..CanWrite(Int16)

Remarks

Must be implemented, must not throw an ASCOM.MethodNotImplementedException

This method was first introduced in Version 2.

Exceptions

ExceptionCondition
InvalidValueExceptionIf id is outside the range 0 to MaxSwitch - 1

See Also