AT5-770: Add TalonLRU and PowerSwitch devices + unit tests
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 fromBaseComponentManager
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 realPowerSwitch
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 thesimulationMode
attribute in thePowerSwitch
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.
- This device monitors and controls the web power switch via the
- Added
TalonLRU
device, which only controls the power via thePowerSwitch
device for now. - Integrated
TalonLRU
device intoCbfController
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