Click or drag to resize

SwitchCanWrite Method

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

Parameters

id
Type: SystemInt16
The number of the device whose write state is to be returned

Return Value

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

Implements

ISwitchV2CanWrite(Int16)
Exceptions
ExceptionCondition
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

Must be implemented, must not throw an ASCOM.MethodNotImplementedException

This method was first introduced in Version 2.

See Also