CSP Master Leaf Node

CSP Master Leaf node monitors the CSP Master and issues control actions during an observation.

class tmcprototype.cspmasterleafnode.src.cspmasterleafnode.csp_master_leaf_node.CspMasterLeafNode(*args: Any, **kwargs: Any)

Properties:

  • CspMasterFQDN - Property to provide FQDN of CSP Master Device

Attributes:

  • cspHealthState - Forwarded attribute to provide CSP Master Health State

  • activityMessage - Attribute to provide activity message

class InitCommand(*args: Any, **kwargs: Any)

A class for the TMC CSP Master Leaf Node’s init_device() method.

do()

Initializes the attributes and properties of the CspMasterLeafNode.

Returns

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

Return type

(ResultCode, str)

Raises

DevFailed if error occurs while creating the device proxy for CSP Master or subscribing the evennts.

class OffCommand(*args: Any, **kwargs: Any)

A class for CspMasterLeafNode’s Off() command.

do()

Invokes Off command on the CSP Element.

Parameters

argin – None.

Returns

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

Return type

(ResultCode, str)

off_cmd_ended_cb(event)

Callback function immediately executed when the asynchronous invoked command returns. Checks whether the Off command has been successfully invoked on CSPMaster.

Parameters

event – a CmdDoneEvent object. This class is used to pass data to the callback method in asynchronous callback model for command execution.

Type

CmdDoneEvent object It has the following members:

  • device : (DeviceProxy) The DeviceProxy object on which the call was executed.

  • cmd_name : (str) The command name

  • argout_raw : (DeviceData) The command argout

  • argout : The command argout

  • err : (bool) A boolean flag set to true if the command failed. False otherwise

  • errors : (sequence<DevError>) The error stack

  • ext

Returns

none

class OnCommand(*args: Any, **kwargs: Any)

A class for CspMasterLeafNode’s On() command.

do()

Invokes On command on the CSP Element.

Parameters

argin – None

Returns

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

Return type

(ResultCode, str)

Raises

DevFailed on communication failure with CspMaster or CspMaster is in error state.

on_cmd_ended_cb(event)

Callback function immediately executed when the asynchronous invoked command returns. Checks whether the On command has been successfully invoked on CSPMaster.

Parameters

event – a CmdDoneEvent object. This class is used to pass data to the callback method in asynchronous callback model for command execution.

Type

CmdDoneEvent object It has the following members:

  • device : (DeviceProxy) The DeviceProxy object on which the call was executed.

  • cmd_name : (str) The command name

  • argout_raw : (DeviceData) The command argout

  • argout : The command argout

  • err : (bool) A boolean flag set to true if the command failed. False otherwise

  • errors : (sequence<DevError>) The error stack

  • ext

Returns

none

class StandbyCommand(*args: Any, **kwargs: Any)

A class for CspMasterLeafNode’s Standby() command.

check_allowed()

Checks whether this command is allowed to be run in current device state.

Returns

True if this command is allowed to be run in current device state.

Return type

boolean

Raises

DevFailed if this command is not allowed to be run in current device state.

do(argin)

It invokes the STANDBY command on CSP Master.

Parameters

argin – DevStringArray.

If the array length is 0, the command applies to the whole CSP Element. If the array length is > 1 , each array element specifies the FQDN of the CSP SubElement to put in STANDBY mode.

Returns

None

Raises

DevFailed on communication failure with CspMaster or CspMaster is in error state.

standby_cmd_ended_cb(event)

Callback function immediately executed when the asynchronous invoked command returns. Checks whether the StandBy command has been successfully invoked on CSPMaster.

Parameters

event – a CmdDoneEvent object. This class is used to pass data to the callback method in asynchronous callback model for command execution.

Type

CmdDoneEvent object It has the following members:

  • device : (DeviceProxy) The DeviceProxy object on which the call was executed.

  • cmd_name : (str) The command name

  • argout_raw : (DeviceData) The command argout

  • argout : The command argout

  • err : (bool) A boolean flag set to true if the command failed. False otherwise

  • errors : (sequence<DevError>) The error stack

  • ext

Returns

none

always_executed_hook()

Internal construct of TANGO.

csp_cbf_health_state_cb(evt)

Retrieves the subscribed cspCbfHealthState attribute of CSPMaster.

Parameters

evt – A TANGO_CHANGE event on cspCbfHealthState attribute.

Returns

None

csp_pss_health_state_cb(evt)

Retrieves the subscribed cspPssHealthState attribute of CSPMaster.

Parameters

evt – A TANGO_CHANGE event on cspPssHealthState attribute.

Returns

None

csp_pst_health_state_cb(evt)

Retrieves the subscribed cspPstHealthState attribute of CSPMaster.

Parameters

evt – A TANGO_CHANGE event on cspPstHealthState attribute.

Returns

None

delete_device()

Internal construct of TANGO.

init_command_objects()

Initialises the command handlers for commands supported by this device.

is_Standby_allowed()

Checks whether this command is allowed to be run in current device state

Returns

True if this command is allowed to be run in current device state

Return type

boolean

Raises

DevFailed if this command is not allowed to be run in current device state

read_activityMessage()

Internal construct of TANGO. Returns the activityMessage.

write_activityMessage(value)

Internal construct of TANGO. Sets the activityMessage.

tmcprototype.cspmasterleafnode.src.cspmasterleafnode.csp_master_leaf_node.main(args=None, **kwargs)

Runs the CspMasterLeafNode.

Parameters
  • args – Arguments internal to TANGO

  • kwargs – Arguments internal to TANGO

Returns

CspMasterLeafNode TANGO object.