Replicate Jive's Server Wizard workflow programmatically

Hi!

First thing first - thank you all for the amazing work you've done with TANGO Controls! Really cool stuff ;)

And here is a problem I'm not sure how to solve properly. Basically I need to perform all the steps of Jive's Server Wizard programmatically. Currently I'm having something like this: https://gist.github.com/SF-300/0b9f7c41ada5b14ba0e401cdc4338de4. And now I'm a little bit lost. What are these "ior"(CORBA's Interoperable Object Reference?) and "pid"(process id from UNIX?) fields in DbDevExportInfo class/struct? Where can I obtain them from when actual TAGNO server program is running on some other machine? Or am I completely missing the point and there is a better way to achieve this?

Any help would be greatly aprreciated. Thanks in advance!
Hi Vladimir,

As pointed out in the pytango server quick tour, the following code should be enough to register a new server in the tango database:

>>> import tango

>>> dev_info = tango.DbDevInfo()
>>> dev_info.server = "PowerSupply/test"
>>> dev_info._class = "PowerSupply"
>>> dev_info.name = "test/power_supply/1"

>>> db = tango.Database()
>>> db.add_device(dev_info)

Then write the device properties (using db.put_device_property), start the server and it should be good to go.

To answer your question, the export phase is done by the server itself so you can ignore this part.

Hope that helps,
/Vincent

 
Register or login to create to post a reply.