×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Client development, get available devices

  • Posts: 6
  • Thank you received: 0
Hi,

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.

Regards

Julien
6 years 10 months ago #17341

Please Log in or Create an account to join the conversation.

  • Posts: 6
  • Thank you received: 0
Hi,

Nobody knows ?

Regards

Julien
6 years 9 months ago #17621

Please Log in or Create an account to join the conversation.

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.
The following user(s) said Thank You: Julien
Last edit: 6 years 9 months ago by Jasem Mutlaq.
6 years 9 months ago #17622

Please Log in or Create an account to join the conversation.

I added another convenience function to INDI Client API to get list of devices in specific driver classes. Please check updated API.
6 years 9 months ago #17625

Please Log in or Create an account to join the conversation.

  • Posts: 6
  • Thank you received: 0
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.


Julien
6 years 9 months ago #17651

Please Log in or Create an account to join the conversation.

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.
The following user(s) said Thank You: Julien
6 years 9 months ago #17653

Please Log in or Create an account to join the conversation.

  • Posts: 6
  • Thank you received: 0
Ok, it's much clearer with the documentation :-)
6 years 9 months ago #17673

Please Log in or Create an account to join the conversation.

Time to create page: 0.645 seconds