I want to integrate INDI in an existing software. I would like to know how I can get the available devices for a given type (e.g. : telescope, camera).
So far I managed to retrieve all the devices information with the command <getProperties version="1.7"/>. But how can get the list, for example, of all available cameras ? I haven't seen any information in the data returned by getProperties that let me know the type of device.
There isn't such a call, INDI protocol is quite generic. One way to figure out the device type is by inspecting DRIVER_INFO property and check the INTERFACE value. If you're using the INDI Client API, then after you receive your device, you can call
device->getDriverInterface()
, it is ORed list of
DRIVER_INTERFACE
so you can tell which class/classes your device belongs to.
Hi
Perfect. I'm not using the API, I'm on a .NET Core application.
I already have all informations, so I only have to add a method to get the devices that correspond to an interface.
What are the values that can be found in DRIVER_INTERFACE (API doc is currently unavailable) ?
Here are the values I identified :
Telescope : 5,
Focuser : 8,
Filter : 16,
Camera : 22,
Dome : 32,
Weather : 32768
A bit strange, I would have expected the name of the interfaces or an enumeration going from 0 to N.
sorry, the API is now back online. The reason you see these values is that the actual driver class is an ORed value of the classes here. For example, a guide camera will have CCD_INTERFACE | GUIDE_INTERFACE. This is why they are not sequential.