The difference between Alpaca Devices and ASCOM Devices |
This topic explores the differences between Alpaca Devices and ASCOM Devices.
Within the library Alpaca device and ASCOM device have these meanings:
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.
The AlpacaDevice and AscomDevice classes have different primary use cases although, of course, they can be turned to many other purposes:
Data falls into three categories within the AlpacaDevice and AscomDevice 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.