Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Commit

Permalink
Merge branch 'Release-12.2' of http://github.com/tango-controls/fandango
Browse files Browse the repository at this point in the history
 into Release-12.2

erges an updated upstream into a topic branch.
  • Loading branch information
sergirubio committed Oct 19, 2016
2 parents b2535b7 + f0d70fb commit e91dd54
Showing 1 changed file with 48 additions and 2 deletions.
50 changes: 48 additions & 2 deletions doc/devices/FolderDS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,55 @@
FolderDS
========

Usage
=====

FolderAPI(ServersDict)
======================
The FolderDS/FolderAPI objects have been developed to allow the remote usage of log/config files.

You can use it to export your local files to the whole Tango Control System, so the FolderGUI can search for them.

You can also use it to write your logs into a remote machine, e.g. for saving local space or have persistent storage.

To start using the FolderDS API follow these steps:

* Create a FolderDS device:

.. code:: python
import fandango.tango as ft
ft.add_new_device('FolderDS/test','FolderDS','test/folder/tmp')
ft.put_device_property('test/folder/tmp','SaveFolder','/tmp/folderds')
ft.Astor('test/folder/tmp').start_servers()
* Load the API and save a file:

.. code:: python
import fandango.device
folders = fandango.device.FolderAPI()
folders.save('test/folder/tmp','test.txt','Hello World!')
* Retrieve the contents from a client, even from another tango_host

.. code:: python
import fandango.device
folders = fandango.device.FolderAPI()
v = folders.read('dbhost:10000/test/folder/tmp','test.txt')
print(v)
"Hello World!"
* Browse the stored files from FolderGUI (you'll need to add devices from other tango_hosts to FolderDS.ExtraDevices property)

.. code:: python
import fandango.tango as ft
devs = ft.get_class_property
import fandango.device.FolderGUI
ui = fandango.device.FolderGUI.main()
FolderAPI(fandango.ProxiesDict)
===============================

The FolderAPI object will allow to access all FolderDS instances in the system.
This will allow to easily save, read, list files in the FolderDS system.
Expand Down

0 comments on commit e91dd54

Please sign in to comment.