[RFC] DefaultDevice: Add Generic Nickname support#2343
[RFC] DefaultDevice: Add Generic Nickname support#2343perfinion wants to merge 1 commit intoindilib:masterfrom
Conversation
This extends the DefaultDevice class to support nicknames. Nicknames are stored in ~/.indi/INDINicknames.xml in a format like the below. Nicknames are assoicated with a driver and stable device identifier. The device identifier must be stable across boots and not dependent on which port the device is plugged into. Usually this will be some form of serial number of the device, but specifics are left up to each driver. Since each identifier is per-driver, devices from different drivers can share the same nickname. The INDI framework must not try to interpret the identifier, only compare for equality since different devices might have serial numbers in different formats. Since the device-name can't be changed once the driver is running, changes to nicknames can only take effect at the next INDI startup. The NicknameTP should be added with addNicknameControl(). <INDINicknames> <nickname driver="AcmeFocuser" identifier="SN123">MainScope</nickname> <nickname driver="AcmeFocuser" identifier="SN456">GuideScope</nickname> <nickname driver="AcmeDustCap" identifier="CAP-1-2-3">MainScope</nickname> </INDINicknames> Signed-off-by: Jason Zaman <jason@perfinion.com>
|
@knro @tbowers7 Here is a Request For Comments for indilib/indi-3rdparty#1226 It builds and I've tested the XML parsing in a separate test program, but I have not finished integrating it into Also regarding the XML, I wonder if it is better to have |
|
Great! Yes, if it is similar to ParkData.xml, it's best. I also think this feature should be disabled by default until enabled by the child driver via addNicknameControl or similar. Please let me know once you are able to test if full with the ASI driver as well so we know it works for 3rd party drivers. |
This extends the DefaultDevice class to support nicknames.
Nicknames are stored in ~/.indi/INDINicknames.xml in a format like the below. Nicknames are assoicated with a driver and stable device identifier.
The device identifier must be stable across boots and not dependent on which port the device is plugged into. Usually this will be some form of serial number of the device, but specifics are left up to each driver.
Since each identifier is per-driver, devices from different drivers can share the same nickname. The INDI framework must not try to interpret the identifier, only compare for equality since different devices might have serial numbers in different formats.
Since the device-name can't be changed once the driver is running, changes to nicknames can only take effect at the next INDI startup.
The NicknameTP should be added with addNicknameControl().