Skip to main content

OPI Generation for CS-Studio and Phoebus

Project description

OPI generation for CS-Studio and Phoebus

This repository is forked from dls-controls/cssgen, and renamed to opi-generator, with the package name of opigen.

After a thorough refactoring process, opigen now supports OPI files generation for both CS-Studio and Phoebus from the same script, which minimizes the effort required to maintain both platforms, making it more efficient and streamlined.

Installation

pip install opigen

Attribute Mapping

opigen can generate OPI files that are compatible with both CS-Studio and Phoebus by utilizing the concept of "attribute mapping". Essentially, this involves ensuring that each attribute of a widget class in CS-Studio has a corresponding counterpart in Phoebus. By accurately mapping the attribute names, opigen can seamlessly handle both systems with the same code. This approach not only simplifies the development process but also ensures cross-compatibility, making it easier for developers to create robust and adaptable OPI files that can be used across different platforms.

The command line tool opigen-export_attr_map could be used to export the attribute map from CS-Studio (.opi) to Phoebus (.bob) that are in-use.

The exported file contains an attribute map from CS-Studio (.opi) to Phoebus (.bob).

The attribute name must be mapped for Phoebus, otherwise it will be missing in the generated file.

Let's assume an use-case that bitReverse attribute of the class Byte (refers to ByteMonitor) needs to be correctly handled on both, but the system deployed attribute map does not provide it, the use will have to extend it. To extend or update it, follow these steps:

  • Create a file named attr.toml in the current working directory.
  • Create a new section with the widget class name, e.g. [Byte].
  • Add new attribute maps or override existing ones under the new section, e.g. bitReverse = "bitReverse".
  • If there is no attr.toml in the current working directory, use the one in the user home directory at ~/.opigen/attr.toml to do the extend or override if possible.
  • If attr.toml exists in both places, the one in the current working directory takes precedence.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

opigen-1.0.5-py3-none-any.whl (39.1 kB view details)

Uploaded Python 3

File details

Details for the file opigen-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: opigen-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 39.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for opigen-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7248addb7e6e29dd3c0d1a94eaea38ea2f084b64ea2ec2be3c5bf12b583bc3a5
MD5 38599fe37a336418f5846da29f4eef2e
BLAKE2b-256 8df912819fb516c6dfc776d99741a3d6210af75223fb1d57a4e89e9934143d7e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page