I am slowly learning how to use Tango-CS. I have successfully installed all necessary tools on a VM. I have even managed to set up a few C++ device servers and instances of these. I can operate (start/stop) the device servers via Astor, and also configure them via Jive.
I am now creating a replica device server in Python. I can start/stop these device servers via the terminal with a command like:
python PythonDS.py test
After which, Astor lights ‘green’ for this device server. However I am unable to actually start the device server from within Astor itself (in the same way I can turn on device servers for C++). The error I get is:
PythonDS: not found in ‘StartDsPath’ property: - /home/andrea/Documents/AAVS/Tango/dev
This is the path where all my device servers (C++ executables or python files are located), and I have setup Tango to look for device servers there (via StartDsPath). So Astor startup works for C++, but not for Python.
I have been unsuccessful so far. Let us assume I have generated a new python device server from POGO. I add nothing to the standard POGO template. This file is called PSDS.py
I can configure this server in Jive, and start it via “python PSDS.py test” - that works fine, and Astor can detect it as running (green) as well.
Now assuming I do not start it via command line, I can still create the new server via Jive.
I have an additional file called PSDS (no extension) with the code:
#!/usr/bin/env python
# PSDS device server launch script
from PSDS import main
if __name__ == '__main__':
main()
Astor can now find the device, and adds it to my list of devices. However the device is Red, and can’t start from within Astor. If I start the device server from command line, it turns green.
So with Python device servers, you definitely need some sort of external batch file, or python command etc. Astor alone can’t be the “batch” process itself.
That’s not a problem of course - I can create a shell script like the one above, no problem.