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

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

Syntax

C#
bool Connected { get; set; }
Visual Basic
Property Connected As Boolean
	Get
	Set
Visual C++
property bool Connected {
	bool get ();
	void set (bool value);
}

Field Value

true if connected; otherwise, false.

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.

Note.

The Connected property is not implemented in Version 1 drivers; these use the Link property and will raise a Not Implemented exception for this property. Version 2 drivers must implement both Connected and Link. Applications should check that InterfaceVersion returns 2 or more before using Connected.

Exceptions

ExceptionCondition
ASCOM..::..DriverExceptionMust throw an exception if the call was not successful

See Also