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, **kwargs)

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

#

CspMasterFQDN

Used by autodoc_mock_imports.

class InitCommand(*args, **kwargs)

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.
Standby(argin)

Sets Standby Mode on the CSP Element.

activityMessage

Used by autodoc_mock_imports.

always_executed_hook()

Internal construct of TANGO.

cspHealthState

Used by autodoc_mock_imports.

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.

class tmcprototype.cspmasterleafnode.src.cspmasterleafnode.csp_master_leaf_node.On(*args, **kwargs)

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 tmcprototype.cspmasterleafnode.src.cspmasterleafnode.csp_master_leaf_node.Off(*args, **kwargs)

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)
class tmcprototype.cspmasterleafnode.src.cspmasterleafnode.csp_master_leaf_node.Standby(*args, **kwargs)

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. :param 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. :return: 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

class tmcprototype.cspmasterleafnode.src.cspmasterleafnode.off_command.Off(*args, **kwargs)

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)
class tmcprototype.cspmasterleafnode.src.cspmasterleafnode.on_command.On(*args, **kwargs)

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 tmcprototype.cspmasterleafnode.src.cspmasterleafnode.standby_command.Standby(*args, **kwargs)

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. :param 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. :return: 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