FNDH device

This module implements the MCCS FNDH device.

class MccsFNDH(*args, **kwargs)

An implementation of the FNDH device for MCCS.

ClearThresholdCache()

Clear the threshold caches.

Return type:

tuple[list[ResultCode], list[Optional[str]]]

Returns:

A tuple containing a return code and a string message indicating status.

Configure(overCurrentThreshold=None, overVoltageThreshold=None, humidityThreshold=None)

Configure the Fndh device attributes.

Parameters:
  • overCurrentThreshold (Optional[float]) – the over-current threshold in Amps.

  • overVoltageThreshold (Optional[float]) – the over-voltage threshold in Volts.

  • humidityThreshold (Optional[float]) – the humidity threshold in percent.

Return type:

tuple[list[ResultCode], list[str]]

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

PortPowerState(port_id)

Check power state of a port.

Parameters:

port_id (int) – the port number (1-28)

Return type:

PowerState

Returns:

The power state of the port.

PowerOffPort(port_number)

Power down a port.

This may or may not have a Antenna attached.

Parameters:

port_number (int) – the port to power down.

Return type:

TaskFunctionType

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purposes only.

PowerOnPort(port_number)

Power up a port.

This may or may not have a Antenna attached.

Parameters:

port_number (int) – the port to power up.

Return type:

TaskFunctionType

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purposes only.

SetPortPowers(json_argument)

Set port powers.

These ports will not have a smartbox attached.

Parameters:

json_argument (str) – desired port powers of unmasked ports with smartboxes attached in json form.

Return type:

TaskFunctionType

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purposes only.

UpdateThresholdCache()

Update the threshold caches.

Return type:

tuple[list[ResultCode], list[Optional[str]]]

Returns:

A tuple containing a return code and a string message indicating status.

__init__(*args, **kwargs)

Initialise this device object.

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

  • kwargs (Any) – keyword args to the init

create_component_manager()

Create and return a component manager for this device.

Return type:

FndhComponentManager

Returns:

a component manager for this device.

delete_device()

Delete the device.

Return type:

None

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.

healthModelParams(argin)

Set the params for health transition rules.

Parameters:

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

Return type:

None

healthReport()

Get the health report.

Return type:

str

Returns:

the health report.

healthRuleVersion(value)

Set the HealthRuleVersion to use.

Parameters:

value (str) – new version to use. Currenly support v0 or v1

Raises:

ValueError – when attempting to set a version not supported.

Return type:

None

humidityThreshold(value)

Set the humidityThreshold attribute.

Parameters:

value (float) – new value for the humidityThreshold attribute

Return type:

None

init_device()

Initialise the device.

This is overridden here to change the Tango serialisation model.

Return type:

None

is_engineering()

Return a flag representing whether we are in Engineering mode.

Return type:

bool

Returns:

True if FNDH is in Engineering Mode.

is_firmware_threshold_allowed(req_type)

Return a flag representing whether we are allowed to access the attribute.

Parameters:

req_type (AttReqType) – the request type

Return type:

bool

Returns:

True if access is allowed.

numberOfStuckOffSmartboxPorts()

Return the total number of stuck off smartbox ports.

This is used for alarm configuration.

Return type:

Optional[int]

Returns:

the total number of stuck off smartbox ports.

numberOfStuckOnSmartboxPorts()

Return the total number of stuck on smartbox ports.

This is used for alarm configuration.

Return type:

Optional[int]

Returns:

the total number of stuck on smartbox ports.

overCurrentThreshold(value)

Set the overCurrentThreshold attribute.

Parameters:

value (float) – new value for the overCurrentThreshold attribute

Return type:

None

overVoltageThreshold(value)

Set the overVoltageThreshold attribute.

Parameters:

value (float) – new value for the overVoltageThreshold attribute

Return type:

None

portsWithSmartbox(port_numbers)

Set the ports with smartbox attached.

Parameters:

port_numbers (list[int]) – the port numbers with a smartbox attached.

Raises:

ValueError – if the number of smartbox exceeds the maximum allowed for a station.

Return type:

None

thresholdDifferences()

Return the differences between threshold values.

Return type:

str

Returns:

Return the differences between threshold values.

update_threshold_cache()

Update fndh thresholds cache from database.

Return type:

None