Click or drag to resize

AscomDriverConnected Property

Set True to connect to the device hardware. Set False to disconnect from the device hardware. You can also read the property to check whether it is connected. This reports the current hardware state.

Namespace:  ASCOM.DriverAccess
Assembly:  ASCOM.DriverAccess (in ASCOM.DriverAccess.dll) Version: 3351c4f3fa64146a7efd5b51ed4591e32a0a5484
Syntax
public bool Connected { get; set; }

Property Value

Type: Boolean
true if connected to the hardware; otherwise, false.
Exceptions
ExceptionCondition
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

Do not use a NotConnectedException here. That exception is for use in other methods that require a connection in order to succeed.

The Connected property sets and reports the state of connection to the device hardware. For a hub this means that Connected will be true when the first driver connects and will only be set to false when all drivers have disconnected. A second driver may find that Connected is already true and setting Connected to false does not report Connected as false. This is not an error because the physical state is that the hardware connection is still true.

Multiple calls setting Connected to true or false will not cause an error.

See Also