Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • L2SS-1914-fix_job_dispatch
  • TMSS-3170
  • TMSS-3167
  • TMSS-3161
  • TMSS-3158-Front-End-Only-Allow-Changing-Again
  • TMSS-3133
  • TMSS-3319-Fix-Templates
  • test-fix-deploy
  • TMSS-3134
  • TMSS-2872
  • defer-state
  • add-custom-monitoring-points
  • TMSS-3101-Front-End-Only
  • TMSS-984-choices
  • SDC-1400-Front-End-Only
  • TMSS-3079-PII
  • TMSS-2936
  • check-for-max-244-subbands
  • TMSS-2927---Front-End-Only-PXII
  • Before-Remove-TMSS
  • LOFAR-Release-4_4_318 protected
  • LOFAR-Release-4_4_317 protected
  • LOFAR-Release-4_4_316 protected
  • LOFAR-Release-4_4_315 protected
  • LOFAR-Release-4_4_314 protected
  • LOFAR-Release-4_4_313 protected
  • LOFAR-Release-4_4_312 protected
  • LOFAR-Release-4_4_311 protected
  • LOFAR-Release-4_4_310 protected
  • LOFAR-Release-4_4_309 protected
  • LOFAR-Release-4_4_308 protected
  • LOFAR-Release-4_4_307 protected
  • LOFAR-Release-4_4_306 protected
  • LOFAR-Release-4_4_304 protected
  • LOFAR-Release-4_4_303 protected
  • LOFAR-Release-4_4_302 protected
  • LOFAR-Release-4_4_301 protected
  • LOFAR-Release-4_4_300 protected
  • LOFAR-Release-4_4_299 protected
40 results

static

  • Clone with SSH
  • Clone with HTTPS
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.

    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 ...