.. _doocs_design: DOOCS to Karabo Enhancement Design ================================== Motivation ++++++++++ * The main motivation of this enhancement design is to provide user friendly interface to our instrument scientists to import DOOCS data/devices to the Karabo ecosystem without involving much effort from the Controls group side. * To have one-to-one connection between DOOCS and Karabo which enables load / throughput tuning between the two control systems at the single tuning point. * To have unified interface which shows the list of all the devices "cloned" in Karabo. Implementation overview +++++++++++++++++++++++ Overview of the implemented design is shown in the figure below: .. figure:: img/design.png :height: 400px :width: 800 px :align: center :alt: alternate text :figclass: align-center * **Dedicated "DOOCS" topic**: Dedicated "DOOCS" topic has been created to have a one-to-one connection between DOOCS and Karabo, which enables load/throughput tuning between the two control systems at the single tuning point. * **Devices involved**: The concept is surrounded around the following devices: * `DOOCS Mirror `_ device: It is a generic DOOCS bridge, which imports DOOCS data(slow or fast data, and images) to Karabo ecosystem. * `Doocs Manager `_ device: It is responsible for managing and instanating the DoocsMirror device upon the request of DoocsRequestor. * `Doocs Requestor `_ device: It acts as the request gateway for a DOOCS location and properties, whether or not they have been requested already (whether through the same Karabo topic or another). There is one DoocsRequestor device per Karabo topic. * Device Clone: It is used to clone to DoocsMirrors device from one topic to another. Workflow ++++++++ The workflow diagram is shown in the figure below: .. figure:: img/workflow.png :height: 400px :width: 800 px :align: center :alt: alternate text :figclass: align-center * User requests needed "bridge" of the DOOCS location using the interface of the *DoocsRequestor* located in the specific Karabo topic. * The *DoocsRequestor* passes the request to the *DOOCSManager* device located in the dedicated "DOOCS" topic. * *DoocsManager* checks if for the requested location/properties corresponding *DoocsMirror* device is already instantiated and instantiate new one if needed. * *DoocsMirror* devices take care of the communication between DOOCS and Karabo. They are instantiated in the "DOOCS" topic and cloned to the specific Karabo topic.