Skip to content

AT5-770: Add TalonLRU and PowerSwitch devices + unit tests

Andrada Zoltan requested to merge at5-770-talon-lru into develop

Description of Changes:

  • Added PowerSwitch device.
    • This device monitors and controls the web power switch via the PowerSwitchComponentManager. The component manager does not currently derive from the Tango base class since we are not using the latest version, but has been writing in such a way that it could be made to inherit from BaseComponentManager in the future.
    • The component manager can be operated in simulation mode, where the PowerSwitchSimulator is used to simulate the behaviour of the power switch. Or, it can be operated with the real PowerSwitch driver. The default is that simulation mode is enabled, which allows testing of the MCS without any power switch connected. Use of the real hardware is enabled by writing to the simulationMode attribute in the PowerSwitch device. I checked with MCCS, and this is also the method they use.
    • Note that the idea to make a simulator for the power switch was inspired by how the MCCS has implemented their subrack device and component manager.
  • Added TalonLRU device, which only controls the power via the PowerSwitch device for now.
  • Integrated TalonLRU device into CbfController On/Off commands.
  • Added unit tests for the added functionality.

Unresolved items:

  • Passing username and password for the power switch as Kubernetes secrets. Currently these are just hardcoded in the code. I tried to set up a Kubernetes secret for this, but was unsuccessful.
  • Specifying use of hardware vs. simulator as part of a build target. I could not figure out how to do this cleanly, as simulationMode is a Tango attribute which cannot be specified in the database before starting the devices.
Edited by Andrada Zoltan

Merge request reports