Skip to content
Snippets Groups Projects
Select Git revision
  • L2SS-2357-fix-ruff
  • control-single-hba-and-lba
  • L2SS-1957-remove-pcon-control
  • v0.39.7-backports
  • Move-sdptr-to-v1.5.0
  • master default protected
  • fix-build-ubuntu
  • tokens-in-env-files
  • fix-build
  • L2SS-2214-deploy-cdb
  • fix-missing-init
  • add-power-hardware-apply
  • L2SS-2129-Add-Subrack-Routine
  • Also-listen-internal-to-rpc
  • fix-build-dind
  • L2SS-2153--Improve-Error-Handling
  • L2SS-2153-Add-Grpc-Gateway-support
  • L2SS-1970-apsct-lol
  • DNM-pytango10.0.1rc1-test
  • fixes-for-black-25.0
  • v0.39.15-wsrttwo protected
  • v0.39.15-wsrt protected
  • v0.39.14-wsrt protected
  • v0.51.6 protected
  • v0.51.5-1 protected
  • v0.51.5 protected
  • v0.51.4-2 protected
  • v0.51.4-3 protected
  • v0.51.4-1 protected
  • v0.51.4 protected
  • v0.51.2 protected
  • v0.51.1 protected
  • v0.50.1-2 protected
  • trigger-test-v7
  • v0.50.1-1 protected
  • trigger-test-v6
  • trigger-test-v5
  • trigger-test-v4
  • trigger-test-v3
  • trigger-test-v2
40 results

tango

  • Clone with SSH
  • Clone with HTTPS
  • PyPCC

    Python OPC-UA server to control the I2C devices in the LTS.

    • pypcc2.py: OPC-UA server that expose (visible) variables and methods.

    Prerequisites

    Requirements

    This Python3 code uses other Python3 modules:

    • opcua
    • recordclass
    • numpy

    We recommend to install a virtual environment and then install the dependencies there. For convenience we have added the relevant modules to the file requirements.txt that can be used to install them with pip3: python3 -m pip install -r requirements.txt

    Below are step-by-step instructions that show how to install the dependencies neatly in a Python3 virtual environment.

    # Create a Python3 virtual environment with the name "env"
    python3 -m venv env
    # Activate the virtual environment
    . env/bin/activate
    # Update the already installed modules in the virtual environment since they are usually outdated
    python3 -m pip install --upgrade pip wheel
    # Deactivate the virtual environment and start it again
    deactivate
    . env/bin/activate
    # And finally install the module dependencies
    python3 -m pip install -r requirements.txt

    Execute it

    The software can be simply executed with Python3: python3 pypcc2.py -c RCY,CLK,UNB2

    Optional parameters are explained when the -h or --help parameter is supplied:

    python3 pypcc2.py --help
    cryptography is not installed, use of crypto disabled
    cryptography is not installed, use of crypto disabled
    usage: pypcc2.py [-h] [-s] [--no-lib-hack] [-p PORT]
    
    optional arguments:
      -h, --help            show this help message and exit
      -s, --simulator       Do not connect to I2c, but simulate behaviour.
      -p PORT, --port PORT  Port number to listen on [4842].
      -c ..
      -t ...