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 REJECTED if 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}'. true means masked (port will not be powered on); false means 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 REJECTED if no antennas would be masked.

__init__(*args, **kwargs)

Initialise this device object.

Parameters:
  • args (Any) – positional args to the init

  • kwargs (Any) – keyword args to the init

antennaPowerStates()

Return the logical antenna powers.

Return type:

str

Returns:

the power of the logical antennas.

create_component_manager()

Create and return a component manager for this device.

Return type:

FieldStationComponentManager

Returns:

a component manager for this device.

delete_device()

Delete the device.

Return type:

None

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.

healthReport()

Get the health report.

Return type:

str

Returns:

the health report.

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.

Parameters:

argin (str) – JSON-string of dictionary of health thresholds

Return type:

None

init_device()

Initialise the device.

Return type:

None

outsideTemperature()

Return the OutsideTemperature.

Return type:

float

Returns:

the OutsideTemperature.

Raises:

ValueError – if outside temperature not read yet.