Skip to content
Snippets Groups Projects
Select Git revision
  • 1e24f45d8791b2605b2dcd623b499e3573699360
  • master default protected
  • refactor-control-power-properties
  • L2SS-2199-apply-dab-to-xy
  • stop-using-mesh-gateway
  • set_hba_element_power
  • test-pytango-10.0.3
  • revert-cs032-ccd-ip
  • deploy-components-parallel
  • fix-chrony-exporter
  • L2SS-2407-swap-iers-caltable-monitoring-port
  • L2SS-2357-fix-ruff
  • sync-up-with-meta-pypcc
  • stabilise-landing-page
  • all-stations-lofar2
  • v0.39.7-backports
  • Move-sdptr-to-v1.5.0
  • fix-build-ubuntu
  • tokens-in-env-files
  • fix-build
  • L2SS-2214-deploy-cdb
  • v0.52.8 protected
  • v0.52.7 protected
  • v0.55.5-r2 protected
  • v0.52.8-rc1 protected
  • v0.55.5 protected
  • v0.55.4 protected
  • 0.55.2.dev0
  • 0.55.1.dev0
  • 0.55.0.dev0
  • v0.54.0 protected
  • 0.53.2.dev0
  • 0.53.1.dev0
  • v0.52.3-r2 protected
  • remove-snmp-client
  • v0.52.3 protected
  • v0.52.3dev0 protected
  • 0.53.1dev0
  • v0.52.2-rc3 protected
  • v0.52.2-rc2 protected
  • v0.52.2-rc1 protected
41 results

archiver.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    archiver.py 882 B
    #! /usr/bin/env python3
    
    from .lofar2_config import configure_logging
    from tango import DeviceProxy
    
    
    def add_attribute_to_archiver(attribute: str, polling_period: float, event_period: float, archive_manager: str = 'archiving/hdbpp/confmanager01', archiver: str = 'archiving/hdbpp/eventsubscriber01'):
        am = DeviceProxy(archive_manager)
        am.write_attribute('SetAttributeName', attribute)
        am.write_attribute('SetArchiver', archiver)
        am.write_attribute('SetStrategy', 'ALWAYS')
        am.write_attribute('SetPollingPeriod', int(polling_period))
        am.write_attribute('SetPeriodEvent', int(event_period))
        am.AttributeAdd()
        am.AttributeStart(attribute)
    
    def remove_attribute_from_archiver(attribute: str, archive_manager: str = 'archiving/hdbpp/confmanager01'):
        am = DeviceProxy(archive_manager)
        am.AttributeStop(attribute)
        am.AttributeRemove(attribute)