how to create a device alias?
|
|
---|---|
Hi, I would like to create an alias to access a device through a tool which does not accept dot character. I red https://tango-controls.readthedocs.io/en/latest/development/general-guidelines/naming.html#device-and-attribute-name-alias and https://github.com/tango-controls/tango-webapp/issues/104. I understand well this last ticket is not jive doc but waltz doc (formerly webapp). However, it is the only way I found to add an alias so I hoped it should give it a try with jive. Just in case, here is the steps I followed : - open sys/database/2 device - open command "DbPutDeviceAlias" - enter in line 0: "er/ca/rac05-elr.01-rdp1" (name of the device copy-paste from jive to avoid error) - enter in line 1 "redpitaya" (desired alias) - click on "execute" button - then I got the following error:
Could you help me with this? Thanks.
- Philippe
|
|
|
---|---|
Hi Philippe, I never really played with aliases but I think you can do it from jive simply by right-clicking on a device node and by selecting "Define device alias" right-click menu item. About the error reported by the Database server, it looks like this error is returned when the length of the DevVarStringArray passed in argument to DbPutDeviceAlias command is < 2. So it looks like there was a problem in the transmission of your DevVarStringArray parameters… What did you use to send this command? AtkPanel? I hope this helps, Kind regards, Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |
|
|
---|---|
Hi Reynald, thank you for your answer.ReynaldIf I understand well, this should display the alias in the "Alias" tab of jive. I tried to create "redpitaya" device alias but nothing is displayed into this tab so I understand I missed something… :s ReynaldYes, I opened AtkPanel through jive. When reading https://github.com/tango-controls/TangoDatabase/blob/master/DataBase.cpp I understood 1st parameter Str[0] should be "device name" while 2d parameter should be "device alias". I do not understand what should be added as argin (which would be a third parameter if I understand the DbPutDeviceAlias method). If you confirm DbPutDeviceAlias is the good method to use to add a device alias, then I will continue with an issue on https://github.com/tango-controls/TangoDatabase. Thank you for these bits of information. Regards.
- Philippe
|
|
|
---|---|
Hi Philippe :) An easy way to define an alias is to open Jive. Deploy the tree until your server instance ("er/ca/rac05-elr.01-rdp1" in your case), and then right click on it. Normally, you should see "Define Server Alias". Put the alias you want, and then it shall appear on the "Alias Tab" after refresh. On jive, if you open an ATK on the databaseDS, and you execute command, you should send parameter as follow : ["er/ca/rac05-elr.01-rdp1","myNewAlias"] This works on my base. Hope it helps :) Regards, Florian Pourchayre Thales Group |
|
|
---|---|
Thank you for your answer Florian. In fact, it seems it took a while to appear but my alias is here. Thanks to both Florian and Reynald. :)
- Philippe
|