Skip to content
Snippets Groups Projects
Select Git revision
  • a9e6f340858df0aaa19b472cb408ec6ced21a178
  • main default protected
  • convert-cookiecutter
  • expand-documentation
  • enable-security-dashboard
  • fix-clang-tidy
6 results

hello.cpp

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)