Field station device
This module implements the MCCS FieldStation device.
- class MccsFieldStation(*args, **kwargs)
An implementation of the FieldStation device.
- Configure(configure_args)
Configure the field station.
Currently this only configures FNDH device attributes.
- Parameters:
configure_args (
str) – the configuration for the device in stringified json format- Return type:
TaskFunctionType- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- PowerOffAntenna(antenna_name)
Turn off an antenna.
- Parameters:
antenna_name (
str) – Antenna name to turn on.- Return type:
TaskFunctionType- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- PowerOnAntenna(antenna_name)
Turn on an antenna.
- Parameters:
antenna_name (
str) – Antenna name to turn on.- Return type:
TaskFunctionType- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- SetAntennaMasking(argin)
Set the masking status for antennas across this field station.
Routes each antenna to its owning smartbox and updates the port mask cache there immediately, so no Init() is required to pick up the change.
Returns
REJECTEDif none of the supplied antenna names are found on any smartbox (e.g. all names are unrecognised or the dict is empty).- Parameters:
argin (
str) – JSON string mapping antenna names to masked status, e.g.'{"sb01-01": true, "sb03-01": false}'.truemeans masked (port will not be powered on);falsemeans unmasked.- Return type:
TaskFunctionType- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purposes only. Returns
REJECTEDif no antennas would be masked.
- __init__(*args, **kwargs)
Initialise this device object.
- antennaPowerStates()
Return the logical antenna powers.
- Return type:
- Returns:
the power of the logical antennas.
- create_component_manager()
Create and return a component manager for this device.
- Return type:
- Returns:
a component manager for this device.
- execute_Off()
Execute the Off command.
- Return type:
TaskFunctionType- Returns:
the callable function.
- execute_On()
Execute the On command.
- Return type:
TaskFunctionType- Returns:
the callable function.
- execute_Standby()
Execute the Standby command.
- Return type:
TaskFunctionType- Returns:
the callable function.
- healthThresholds(argin)
Set the params for health transition rules.
Default health thresholds:
- “fndh”: (f2f, d2f, d2d),
- tuple(int, int, int): Number of fndh failed before health failed,
Number of fndh degraded before health failed, Number of fndh degraded before health degraded
- “smartboxes”: (f2f, d2f, d2d),
- tuple(int, int, int): Number of smartboxes failed before health failed,
Number of smartboxes degraded before health fail, Number of smartboxes degraded before health deg.
- outsideTemperature()
Return the OutsideTemperature.
- Return type:
- Returns:
the OutsideTemperature.
- Raises:
ValueError – if outside temperature not read yet.