Hi there, I have a newbie developer question, apologies if it is answered in the developer manual, I couldn't find the answer there.
While my driver is performing function X (e.g. MoveFocuser()), is it possible for any of the other public functions to be called, or any of the driver variables to be changed? Just trying to understand if I can use things like FocusAbsPosN and FocusSpeedN in there and whether I have to protect against collisions (e.g. of MoveFocuser() with MoveFocuserAbs() or MoveFocuserRel()).
So if you're asking if you can build a multi-threaded INDI driver then the answer is YES.
Now to your specific example, you'd have to protect against any calls that cause conflict in the driver. So if you make a call to MoveFocuserAbs() and it started moving, then a call to MoveFocuserRel() could be rejected because motion is in progress. As mentioned in the manual, the ultimate authority rests with the driver. Noticed I said "could" above. In principle, you can abort the absolute motion and execute the relative motion if so desired.
Thanks for the very swift response . It's less that I want to develop a multi-threaded driver, more that I'm trying to be a good boy and write one that works if it ever happens to be driven from more than one entity. So provided Indiserver only runs a single thread of my driver code, I can put in place protection against sequences of calls to the public driver functions that might collide with motion of the focus motor.