Download presentation
Presentation is loading. Please wait.
1
C++ Tango REST API implementation
Joint Institute for Nuclear Research, Dubna, Russia RestDS – C++ Tango REST API implementation Georgy Sedykh, Evgeny Gorbachev TANGO ICALEPCS 2017
2
Web clients 1. Web technologies progress 2. Advantages: Universal
Flixible Well-looking Convenient Universal tools for communication between Tango Controls and Web clients are required
3
REST Global identification of resources (URL);
REST (Representational State Transfer) – architectural principles to design web services that focus on system’s resources. Global identification of resources (URL); Manipulation of resources through the standard protocol (HTTP); Stateless;
4
Tango REST API RC4 * Describes how to:
Operate with different tango hosts; Browse Tango units (devices, attributes, properties, commands, pipes); Write/Read attributes; Execute commands; Write/Read pipes; Get/Set properties; Use authentication mechanisms; Transmit arguments as http parameters; Parse Response JSON; Use Error codes; Attribute Command Pipe Property REST Service URL REST API Version Tango host Tango device ID *
5
RestDS – Tango module, designed to provide access to tango control system units through http requests; Features: Developed in C++ with Boost and OpenSSL; Windows and Linux supported; Lightweight; Tango device server; Both http and https protocols supported; Basic http authentication supported; Uses server-side role-based Tango access control and logging system (More info: TUPHA171 – Development of NICA Control System: Access Control and Logging); Git: Tango REST API RC4 partial support (so far without pipes);
6
RestDS :: Examples To read attribute:
GET http(s)://host:port/tango/rest/rc4/devices/domain/family/member/attributes/name/value To write attribute: POST / PUT http(s)://host:port/tango/rest/rc4/devices/domain/family/member/attributes/name + arguments as POST parameters. To execute command without arguments: POST / PUT http(s)://host:port/tango/rest/rc4/devices/domain/family/member/commands/name To execute command with arguments: POST / PUT http(s)://host:port/tango/rest/rc4/devices/domain/family/member/commands/name + arguments as POST parameters.
7
Response as JSON object if success Or http error code if failed..
RestDS :: Operation diagram Web Client RestDS HTTP code OK Response as JSON object if success Host:port Threads number Authentication Security (SSL) { “name”: “T56”, “quality”: “VALID”, “timestamp”: , “value”: , } Or http error code if failed.. 400 – Bad request 403 – Forbidden 401 – Unauthorized 404 – Not found
8
Web client examples :: Thermometry
9
Web client examples :: Satellite refrigerators control
10
Summary: Web client applications are cross-platform, well-looking and convenient; Web clients will be widely distributed within the NICA Control system. RestDS Tango module was developed to provide universal way to communicate between web client and Tango-based control system.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.