Generic library for creating simulated TANGO devices.
Project description
tango-simlib: Easily generate TANGO device simulators
Main website: http://tango-simlib.readthedocs.io
Introduction
tango-simlib is a library that aids the data-driven development of TANGO device simulators. It aims to make it easy to develop basic simulators while making it possible to implement more complex simulators. In addition to the simulated device interface, a separate TANGO simulation-control interface is generated, allowing the simulator to be manipulated via a back-channel to simulate e.g. failure conditions on the simulated device interface.
Using only the basic TANGO interface description captured via a POGO generated XMI file, a basic simulator with randomly varying attributes and no-op command handlers can be generated with no further coding. Attribute simulation parameters and simple command behaviour can be specified using a Simulator Description Datafile (SimDD). The format of this file is currently a working proposal and subject to change. A more formal format specification is being worked on.
Note that tango-simlib does not generate simulator code. Rather, the simulator’s behaviour is driven by the description data at run-time using Python’s dynamic programming features. If the description files (XMI or SimDD) are modified, the simulator device server only needs to be restarted for the changes to take effect.
Basic Usage
Installation
Please Note
tango-simlib is compatible with Python2.7 and Python>=3.5.
Installation requires the TANGOBINARY prerequisites to be installed.
$ sudo apt-get install -y --no-install-recommends $(grep -vE "^\s*#" apt-build-requirements.txt | tr "\n" " ")
If you cannot install the PyTango package you will not be able to install tango-simlib. For more, documentation.
Installation from source, working directory where source is checked out
$ pythonX -m pip install . # Where 'x' is the version of Python
This package is available on PYPI, allowing
$ pip install tango-simlib
Tango-YAML
After installing tango_simlib, the tango-yaml script will be available to use
$ tango-yaml -h
usage: tango_yaml [-h] {xmi,fandango,tango_device} ...
This program translates various file formats that describe Tango devices to
YAML
positional arguments:
{xmi,fandango,tango_device}
sub command help
xmi Build YAML from a XMI file
fandango Build YAML from a fandango file
tango_device Build YAML from a running Tango device
optional arguments:
-h, --help show this help message and exit
Documentation
Check out the documentation for more information. Download Manual: https://media.readthedocs.org/pdf/tango-simlib/latest/tango-simlib.pdf
License
This project is licensed under the BSD 3-Clause License - see license for details.
Contribute
Contributions are always welcome! Please ensure that you adhere to our coding standards CAM_Style_guide.
Changelog
0.6.0
0.5.0
0.4.0
0.3.0
0.2.1
- Supporting more tango data types.
DevUChar
DevShort
DevUShort
DevLong64
DevULong64
DevState
DevEncoded
Updating documentation. Addresses issue 79.
0.2.0
Adding support to register and run a TANGO device using a file as a database.
Initialising the model quantity values with the default values specified in the simulator data description files.
Parsing simulator data description files in a pre-determined precendence order.
Removing unmaintained python-devicetest dependency.
- Added a fandango json parser
This parser is used to process the TANGO device data file generated by the fandango library.
Making use of the PyTango v9.2.2 feature to create dynamic commands.
0.1.6
Force all unicode attributes in XMI files to byte strings.
0.1.5
- Updates to the SimDD
Added a new type of behaviour in the side-effect actions suite for long-running commands.
Handle vector data type from pogo
Populate tango-db with device properties
0.1.4
Package release documentation
- Updated console script names
tango-simlib-tango-launcher -> tango-simlib-launcher
tango-simlib-tango-simulator-generator -> tango-simlib-generator
0.1.3
DISH config files included in examples of device simulators
JSON Schema for SimDD configuration file validation
0.1.2
Modified the update method of the Model class to invoke the override pre-update and post-update method, respectively.
0.1.1
Handle DevEnum data type TANGO attributes
Handle Spectrum data format TANGO attributes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for tango_simlib-0.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e278561bbb27d2a2bac814008c345f638f11346928583a1728b07bccf90e040c |
|
MD5 | fbf86c75001ab47b359ae80d782a1401 |
|
BLAKE2b-256 | 4c04e840aebe21f11d8f128d4d1cae3d34f2a07cb1a79d7603e04c6745c7c126 |
Hashes for tango_simlib-0.6.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05a47ab1454de2bbe40c9d3b9ff4a76b2aec8544a4ae70ded2e8ba90d0d15610 |
|
MD5 | 05aa3bacefeec829daf4b3aaa6c19348 |
|
BLAKE2b-256 | 0a23a3835007f440be22502ed5b321699d0dfe9f2676ac48d232d1249678be4a |