I'm moving my first steps into client development with INDI. I have tried the example client and I understood they way it works, but some questions are bugging me.
- the sample client shows the connection to a single driver, but how about I have to orchestrate many drivers? Should I put as many watchDevice as needed?
- the same sample client specifies the driver to connect and talk to, but how do I collect at the beginning the instrument types available? That's to say, I have one mount, two cameras, two focusers, one dome, etc...together with the driver name
- what if I don't want to specify a property, but I rather want to get all from a driver?
clear skies
Nicola
The following user(s) said Thank You: Jasem Mutlaq
Hello Nicola and welcome to INDI! Very good question so this is why in KStars, we use different method. Check out the
Client Manager
code. Specifically, see this section:
Here we receive everything. If a new device is discovered, we get it in newDevice(...), if a new property is defined then it's newProperty(...) and so forth. We don't use watchXXX for the same reasons you mentioned. They're good if you want to specifically target a device/property, but for a generic client you can follow KStars's approach.