CSP Sub-element Master

This module implements a general Master device for a CSP Sub-element.

CspSubElementMaster

Master device for SKA CSP Subelement.

Tango Device Class

class ska_tango_base.CspSubElementMaster(*args: Any, **kwargs: Any)[source]

Master device for SKA CSP Subelement.

Properties:

  • Device Property
    PowerDelayStandbyOn
    • Delay in sec between power-up stages in Standby<-> On transitions.

    • Type:’DevFloat’

    PowerDelayStandByOff
    • Delay in sec between power-up stages in Standby-> Off transition.

    • Type:’DevFloat’

PowerDelayStandbyOn = tango.server.device_property(dtype=DevFloat, default_value=2.0)
PowerDelayStandbyOff = tango.server.device_property(dtype=DevFloat, default_value=1.5)
powerDelayStandbyOn = tango.server.attribute(dtype=DevFloat, access=tango.AttrWriteType.READ_WRITE, label=powerDelayStandbyOn, unit=sec., doc=Delay in sec between the power-up stages in Standby<->On transitions.)

Device attribute.

powerDelayStandbyOff = tango.server.attribute(dtype=DevFloat, access=tango.AttrWriteType.READ_WRITE, label=powerDelayStandbyOff, unit=sec, doc=Delay in sec between the power-up stages in Standby->Off transitions.)

Device attribute.

onProgress = tango.server.attribute(dtype=DevUShort, label=onProgress, max_value=100, min_value=0, doc=Progress percentage of the command execution.)

Device attribute.

onMaximumDuration = tango.server.attribute(dtype=DevFloat, access=tango.AttrWriteType.READ_WRITE, label=onMaximumDuration, unit=sec., doc=The expected maximum duration (sec.) to execute the On command.)

Device attribute.

onMeasuredDuration = tango.server.attribute(dtype=DevFloat, label=onMeasuredDuration, unit=sec, doc=The measured time (sec) taken to execute the command.)

Device attribute.

standbyProgress = tango.server.attribute(dtype=DevUShort, label=standbyProgress, max_value=100, min_value=0, doc=Progress percentage of the command execution.)

Device attribute.

standbyMaximumDuration = tango.server.attribute(dtype=DevFloat, access=tango.AttrWriteType.READ_WRITE, label=standbyMaximumDuration, unit=sec., doc=The expected maximum duration (sec.) to execute the Standby command.)

Device attribute.

standbyMeasuredDuration = tango.server.attribute(dtype=DevFloat, label=standbyMeasuredDuration, unit=sec, doc=The measured time (sec) taken to execute the Standby command.)

Device attribute.

offProgress = tango.server.attribute(dtype=DevUShort, label=offProgress, max_value=100, min_value=0, doc=Progress percentage of the command execution.)

Device attribute.

offMaximumDuration = tango.server.attribute(dtype=DevFloat, access=tango.AttrWriteType.READ_WRITE, label=offMaximumDuration, unit=sec., doc=The expected maximum duration (sec.) to execute the Off command.)

Device attribute.

offMeasuredDuration = tango.server.attribute(dtype=DevFloat, label=offMeasuredDuration, unit=sec, doc=The measured time (sec) taken to execute the Off command.)

Device attribute.

totalOutputDataRateToSdp = tango.server.attribute(dtype=DevFloat, label=totalOutputDataRateToSdp, unit=GB/s, doc=Report the total link expected  output data rate.)

Device attribute.

loadFirmwareProgress = tango.server.attribute(dtype=DevUShort, label=loadFirmwareProgress, max_value=100, min_value=0, doc=The command progress percentage.)

Device attribute.

loadFirmwareMaximumDuration = tango.server.attribute(dtype=DevFloat, access=tango.AttrWriteType.READ_WRITE, label=loadFirmwareMaximumDuration, unit=sec, doc=The expected maximum duration (in sec) for command execution.)

Device attribute.

loadFirmwareMeasuredDuration = tango.server.attribute(dtype=DevFloat, label=loadFirmwareMeasuredDuration, unit=sec, doc=The command execution measured duration (in sec).)

Device attribute.

init_command_objects()[source]

Sets up the command objects

class InitCommand(target, state_model, logger=None)[source]

A class for the CspSubElementMaster’s init_device() “command”.

Create a new InitCommand

Parameters
  • target (object) – the object that this command acts upon; for example, the SKASubarray device for which this class implements the command

  • state_model (DeviceStateModel) – the state model that this command uses to check that it is allowed to run, and that it drives with actions.

  • logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.

do()[source]

Stateless hook for device initialisation.

Returns

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

Return type

(ResultCode, str)

always_executed_hook()[source]

Method always executed before any TANGO command is executed.

delete_device()[source]

Hook to delete resources allocated in init_device.

This method allows for any memory or other resources allocated in the init_device method to be released. This method is called by the device destructor and by the device Init command.

read_powerDelayStandbyOn()[source]

Return the powerDelayStandbyOn attribute.

write_powerDelayStandbyOn(value)[source]

Set the powerDelayStandbyOn attribute.

read_onProgress()[source]

Return the onProgress attribute.

read_onMaximumDuration()[source]

Return the onMaximumDuration attribute.

write_onMaximumDuration(value)[source]

Set the onMaximumDuration attribute.

read_onMeasuredDuration()[source]

Return the onMeasuredDuration attribute.

read_standbyProgress()[source]

Return the standbyProgress attribute.

read_standbyMaximumDuration()[source]

Return the standbyMaximumDuration attribute.

write_standbyMaximumDuration(value)[source]

Set the standbyMaximumDuration attribute.

read_standbyMeasuredDuration()[source]

Return the standbyMeasuredDuration attribute.

read_offProgress()[source]

Return the offProgress attribute.

read_offMaximumDuration()[source]

Return the offMaximumDuration attribute.

write_offMaximumDuration(value)[source]

Set the offMaximumDuration attribute.

read_offMeasuredDuration()[source]

Return the offMeasuredDuration attribute.

read_totalOutputDataRateToSdp()[source]

Return the totalOutputDataRateToSdp attribute.

read_powerDelayStandbyOff()[source]

Return the powerDelayStandbyOff attribute.

write_powerDelayStandbyOff(value)[source]

Set the powerDelayStandbyOff attribute.

read_loadFirmwareProgress()[source]

Return the loadFirmwareProgress attribute.

read_loadFirmwareMaximumDuration()[source]

Return the loadFirmwareMaximumDuration attribute.

write_loadFirmwareMaximumDuration(value)[source]

Set the loadFirmwareMaximumDuration attribute.

read_loadFirmwareMeasuredDuration()[source]

Return the loadFirmwareMeasuredDuration attribute.

class LoadFirmwareCommand(target, state_model, logger=None)[source]

A class for the CspSubElementMaster’s LoadFirmware command.

Creates a new BaseCommand object for a device.

Parameters
  • state_model (SKABaseClassStateModel or a subclass of same) – the state model that this command uses, for example to raise a fatal error if the command errors out.

  • target (object) – the object that this base command acts upon. For example, the device that this BaseCommand implements the command for.

  • logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.

do(argin)[source]

Stateless hook for device LoadFirmware() command.

Returns

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

Return type

(ResultCode, str)

check_allowed()[source]

Check if the command is in the proper state (State/adminMode) to be executed. The master device has to be in OFF/MAINTENACE to process the LoadFirmware command.

Raises

CommandError if command not allowed

Returns

True if the command is allowed.

Return type

boolean

class PowerOnDevicesCommand(target, state_model, logger=None)[source]

A class for the CspSubElementMaster’s PowerOnDevices command.

Creates a new BaseCommand object for a device.

Parameters
  • state_model (SKABaseClassStateModel or a subclass of same) – the state model that this command uses, for example to raise a fatal error if the command errors out.

  • target (object) – the object that this base command acts upon. For example, the device that this BaseCommand implements the command for.

  • logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.

do(argin)[source]

Stateless hook for device PowerOnDevices() command.

Returns

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

Return type

(ResultCode, str)

check_allowed()[source]

Check if the command is in the proper state to be executed. The master device has to be in ON to process the PowerOnDevices command.

: raises: CommandError if command not allowed : return: True if the command is allowed. : rtype: boolean

class PowerOffDevicesCommand(target, state_model, logger=None)[source]

A class for the CspSubElementMaster’s PowerOffDevices command.

Creates a new BaseCommand object for a device.

Parameters
  • state_model (SKABaseClassStateModel or a subclass of same) – the state model that this command uses, for example to raise a fatal error if the command errors out.

  • target (object) – the object that this base command acts upon. For example, the device that this BaseCommand implements the command for.

  • logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.

do(argin)[source]

Stateless hook for device PowerOffDevices() command.

Returns

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

Return type

(ResultCode, str)

check_allowed()[source]

Check if the command is in the proper state to be executed. The master device has to be in ON to process the PowerOffDevices command.

: raises: CommandError if command not allowed : return: True if the command is allowed. : rtype: boolean

class ReInitDevicesCommand(target, state_model, logger=None)[source]

A class for the CspSubElementMaster’s ReInitDevices command.

Creates a new BaseCommand object for a device.

Parameters
  • state_model (SKABaseClassStateModel or a subclass of same) – the state model that this command uses, for example to raise a fatal error if the command errors out.

  • target (object) – the object that this base command acts upon. For example, the device that this BaseCommand implements the command for.

  • logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.

do(argin)[source]

Stateless hook for device ReInitDevices() command.

Returns

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

Return type

(ResultCode, str)

check_allowed()[source]

Check if the command is in the proper state to be executed. The master device has to be in ON to process the ReInitDevices command.

: raises: CommandError if command not allowed : return: True if the command is allowed. : rtype: boolean

is_LoadFirmware_allowed()[source]

Check if the LoadFirmware command is allowed in the current state.

Raises

CommandError if command not allowed

Returns

True if command is allowed

Return type

boolean

LoadFirmware(argin)[source]

Deploy new versions of software and firmware and trigger a restart so that a Component initializes using a newly deployed version.

Parameters

argin ('DevVarStringArray') – A list of three strings: - The file name or a pointer to the filename specified as URL. - the list of components that use software or firmware package (file), - checksum or signing Ex: [‘file://firmware.txt’,’test/dev/1, test/dev/2, test/dev/3’, ‘918698a7fea3fa9da5996db001d33628’]

Returns

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

Return type

(ResultCode, str)

is_PowerOnDevices_allowed()[source]

Check if the PowerOnDevice command is allowed in the current state.

:raises tango.DevFailed if command not allowed :return True if command is allowed :rtype: boolean

PowerOnDevices(argin)[source]

Power-on a selected list of devices.

Parameters

argin ('DevVarStringArray') – List of devices (FQDNs) to power-on.

Returns

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

Return type

(ResultCode, str)

is_PowerOffDevices_allowed()[source]

Check if the PowerOffDevices command is allowed in the current state.

Raises

tango.DevFailed if command not allowed

Returns

True if command is allowed

Return type

boolean

PowerOffDevices(argin)[source]

Power-off a selected list of devices.

Parameters

argin ('DevVarStringArray') – List of devices (FQDNs) to power-off.

Returns

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

Return type

(ResultCode, str)

is_ReInitDevices_allowed()[source]

Check if the ReInitDevices command is allowed in the current state.

Raises

tango.DevFailed if command not allowed

Returns

True if command is allowed

Return type

boolean

ReInitDevices(argin)[source]

Reinitialize the devices passed in the input argument. The exact functionality may vary for different devices and sub-systems, each TANGO Device/Server should define what does ReInitDevices means. Ex: ReInitDevices FPGA -> reset ReInitDevices Master -> Restart ReInitDevices Leaf PC -> reboot

Parameters

argin ('DevVarStringArray') – List of devices (FQDNs) to re-initialize.

Returns

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

Return type

(ResultCode, str)