Click or drag to resize

The difference between Alpaca Devices and ASCOM Devices

This topic explores the differences between Alpaca Devices and ASCOM Devices.

Alpaca devices and ASCOM devices

Within the library Alpaca device and ASCOM device have these meanings:

  • Alpaca Device - A network device or software service that runs on a particular IP address and IP port and which exposes one or more "ASCOM Devices" through the Alpaca protocol.
  • ASCOM Device - A REST endpoint provided by an "Alpaca Device" that exposes the capabilities of one of the ASCOM device interfaces defined in the DeviceInterfaces namespace, such as ICamera or ITelescope, and that enables the user to manipulate the hardware controlled by the device.

From the user's and marketing perspectives it is an easy shorthand to refer to a single purpose device as an Alpaca device. However, as developers, it is important to be mindful of the difference between the AlpacaDevice class, which provides an overview of the whole Alpaca device including all of its ASCOM devices, and the AscomDevice class, which provides information about a realisation of an ASCOM device interface.

You can construct an Alpaca client directly from an AscomDevice but you cannot construct it directly from an AlpacaDevice because information required by the client is not present in this class.

Primary Use Cases

The AlpacaDevice and AscomDevice classes have different primary use cases although, of course, they can be turned to many other purposes:

  • Alpaca Device - Displaying maps and information about discovered Alpaca devices, including the ASCOM devices available from each Alpaca device.
  • ASCOM Device - Creating Alpaca client instances.

Data Normalisation

Data falls into three categories within the AlpacaDevice and AscomDevice classes:

  • Information that is common to all ASCOM devices such as location, Alpaca server name and manufacturer, except for network information, is only available in the AlpacaDevice class
  • Information that is unique to each ASCOM device such as ASCOM device type, Alpaca device number and unique id is only available in the AscomDevice class
  • Network information that is common to all ASCOM devices such as service type, IP address, IP port and host name is replicated in both classes

This partial de-normalisation has been implemented so that an Alpaca client can be created directly from an AscomDevice instance. If fully normalised, the developer would need to use information from both an AlpacaDevice instance and an AscomDevice instance in order to create a client, and methods such the straightforward AlpacaClient.GetDevice<T>(AscomDevice ascomDevice) method would not be available.