Click or drag to resize

AlpacaDiscovery Class

Enables clients to discover Alpaca devices by sending one or more discovery polls. Returns information on discovered Alpaca devices and the ASCOM devices that are available.
Inheritance Hierarchy
SystemObject
  ASCOM.UtilitiesAlpacaDiscovery

Namespace:  ASCOM.Utilities
Assembly:  ASCOM.Utilities (in ASCOM.Utilities.dll) Version: 3351c4f3fa64146a7efd5b51ed4591e32a0a5484
Syntax
public class AlpacaDiscovery : IDisposable

The AlpacaDiscovery type exposes the following members.

Constructors
  NameDescription
Public methodAlpacaDiscovery
Initialise the Alpaca discovery component
Top
Properties
  NameDescription
Public propertyDiscoveryComplete
Flag that indicates when a discovery cycle is complete
Top
Methods
  NameDescription
Public methodDispose
Disposes of the discovery component and cleans up resources
Public methodGetAlpacaDevices
Returns a generic List of discovered Alpaca devices.
Public methodGetAlpacaDevicesAsArrayList
Returns an ArrayList of discovered Alpaca devices for use by COM clients
Public methodGetAscomDevices
Returns a generic list of discovered ASCOM devices of the specified device type.
Public methodGetAscomDevicesAsArrayList
Returns an ArrayList of discovered ASCOM devices, of the specified device type, for use by COM clients
Public methodStartDiscovery
Start an Alpaca device discovery based on the supplied parameters
Top
Events
  NameDescription
Public eventAlpacaDevicesUpdated
Raised every time information about discovered devices is updated
Public eventDiscoveryCompleted
Raised when the discovery is complete
Top
Remarks

The discovery process is asynchronous and is initiated by the StartDiscovery(Int32, Int32, Int32, Double, Boolean, Boolean, Boolean) method. Clients can then either work synchronously by looping and periodically polling the DiscoveryComplete property or work asynchronously by handling the AlpacaDevicesUpdated and DiscoveryCompleted events while doing other work.

The StartDiscovery(Int32, Int32, Int32, Double, Boolean, Boolean, Boolean) method is used to set the character of the discovery e.g. the discovery duration and whether to search for IPv4 and/or IPv6 devices. After the specified discovery duration, the DiscoveryComplete event fires and the DiscoveryCompleted property returns True.

Once discovery is complete, .NET clients can retrieve details of discovered Alpaca devices and associated ASCOM interface devices through the GetAlpacaDevices and GetAscomDevices(String) methods. COM clients must use the GetAlpacaDevicesAsArrayList and GetAscomDevicesAsArrayList(String) properties because COM does not support the generic classes used in the GetAlpacaDevices and GetAscomDevices(String) methods.

See Also