ska_tmc_mccsmasterleafnode.commands package

Submodules


ska_tmc_mccsmasterleafnode.commands.mccsmln_command module

Mccs Master Leaf Node Command module

class ska_tmc_mccsmasterleafnode.commands.mccs_mln_command.MccsMLNCommand(*args: Any, **kwargs: Any)

Bases: TmcLeafNodeCommand

A common command class for Mccs Master Leaf Node

init_adapter() tuple
reject_command(message)

Command will get rejected with a given message .

ska_tmc_mccsmasterleafnode.commands.off_command module

Off command class for MccsMasterLeafNode.

class ska_tmc_mccsmasterleafnode.commands.off_command.Off(*args: Any, **kwargs: Any)

Bases: MccsMLNCommand

A class for MccsMasterLeafNode’s Off() command.

Off command on MccsMasterLeafNode enables the telescope to perform further operations and observations. It Invokes Off command on Mccs Controller device.

do()

Method to invoke Off command on Mccs Controller.

off(logger: Logger, task_callback: Callable, task_abort_event: Optional[Event] = None) None

A method to invoke the Off command. It sets the task_callback status according to command progress.

Parameters:
  • logger (logging.Logger) – logger

  • task_callback (Callable, optional) – Update task state

  • task_abort_event (Event, optional) – Check for abort, defaults to None

ska_tmc_mccsmasterleafnode.commands.on_command module

On command class for MccsMasterLeafNode.

class ska_tmc_mccsmasterleafnode.commands.on_command.On(*args: Any, **kwargs: Any)

Bases: MccsMLNCommand

A class for MccsMasterLeafNode’s On() command.

On command on MccsMasterLeafNode enables the telescope to perform further operations and observations. It Invokes On command on Mccs Controller device.

do()

Method to invoke On command on Mccs Controller.

on(logger: Logger, task_callback: Callable, task_abort_event: Optional[Event] = None) None

A method to invoke the On command. It sets the task_callback status according to command progress.

Parameters:
  • logger (logging.Logger) – logger

  • task_callback (Callable, optional) – Update task state

  • task_abort_event (Event, optional) – Check for abort, defaults to None

ska_tmc_mccsmasterleafnode.commands.standby_command module

Standby command class for MccsMasterLeafNode.

class ska_tmc_mccsmasterleafnode.commands.standby_command.Standby(*args: Any, **kwargs: Any)

Bases: MccsMLNCommand

A class for MccsMasterLeafNode’s Standby() command.

Standby command on MccsMasterLeafNode enables the telescope to perform further operations and observations. It invokes Standby command on Mccs Controller device.

do()

Method to invoke Standby command on Mccs Controller.

standby(logger: Logger, task_callback: Callable, task_abort_event: Optional[Event] = None) None

This is a long running method for Standby command, it executes do hook, invokes Standby command on MCCS Controller.

Parameters:
  • logger (logging.Logger) – logger

  • task_callback (Callable, optional) – Update task state

  • task_abort_event (Event, optional) – Check for abort, defaults to None

ska_tmc_mccsmasterleafnode.commands.assign_resources_command module

AssignResources command class for MCCS Master Leaf Node.

class ska_tmc_mccsmasterleafnode.commands.assign_resources_command.AssignResources(*args: Any, **kwargs: Any)

Bases: MccsMLNCommand

A class for MCCS Master LeafNode’s AssignResources() command. Assign resources command will be sent to MCCS Controller.

assign_resources(argin: str, task_callback: Callable, task_abort_event: Event) None
This is a long running method for AssignResources command on

MCCS Master Leaf Node, it executes do hook, invokes Allocate command on

MCCS Controller.

Parameters:

argin – Input JSON string

:type argin : str :param task_callback: Update task state, defaults to None :type task_callback: Callable, optional :param task_abort_event: Check for abort, defaults to None :type task_abort_event: Event, optional

do(argin=None)

Method to invoke Allocate command on MCCS Controller

Parameters:

argin – The string in JSON format.

The JSON contains following values:

Returns:

None

update_task_status(**kwargs) None

Method to update task status with result code and exception message if any.

ska_tmc_mccsmasterleafnode.commands.release_all_resources_command module

ReleaseAllResources command class for MCCS Master Leaf Node.

class ska_tmc_mccsmasterleafnode.commands.release_all_resources_command.ReleaseAllResources(*args: Any, **kwargs: Any)

Bases: MccsMLNCommand

A class to send Release command to MCCS Controller.

do(argin=None) Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke Release command.

Parameters:

argin – The string in JSON format.

Returns:

A tuple containing a return code and “” as a string on successful release all resources. or Exception Message on failure / Rejection

rtype:

(ResultCode, str)

release_all_resources(argin: str, task_callback: Callable, task_abort_event: Event) None

This is a long running method for ReleaseAllResources command, it executes do hook, invokes Release command on MCCS Master Leaf Node.

Parameters:

argin – Input JSON string

:type argin : str :param task_callback: Update task state, defaults to None :type task_callback: Callable, optional :param task_abort_event: Check for abort, defaults to None :type task_abort_event: Event, optional

update_task_status(**kwargs) None

Method to update task status with result code and exception message if any for release resource.

Module contents

Init module for Mccs Master Leaf Node

class ska_tmc_mccsmasterleafnode.commands.AssignResources(*args: Any, **kwargs: Any)

Bases: MccsMLNCommand

A class for MCCS Master LeafNode’s AssignResources() command. Assign resources command will be sent to MCCS Controller.

assign_resources(argin: str, task_callback: Callable, task_abort_event: Event) None
This is a long running method for AssignResources command on

MCCS Master Leaf Node, it executes do hook, invokes Allocate command on

MCCS Controller.

Parameters:

argin – Input JSON string

:type argin : str :param task_callback: Update task state, defaults to None :type task_callback: Callable, optional :param task_abort_event: Check for abort, defaults to None :type task_abort_event: Event, optional

do(argin=None)

Method to invoke Allocate command on MCCS Controller

Parameters:

argin – The string in JSON format.

The JSON contains following values:

Returns:

None

update_task_status(**kwargs) None

Method to update task status with result code and exception message if any.

class ska_tmc_mccsmasterleafnode.commands.Off(*args: Any, **kwargs: Any)

Bases: MccsMLNCommand

A class for MccsMasterLeafNode’s Off() command.

Off command on MccsMasterLeafNode enables the telescope to perform further operations and observations. It Invokes Off command on Mccs Controller device.

do()

Method to invoke Off command on Mccs Controller.

off(logger: Logger, task_callback: Callable, task_abort_event: Optional[Event] = None) None

A method to invoke the Off command. It sets the task_callback status according to command progress.

Parameters:
  • logger (logging.Logger) – logger

  • task_callback (Callable, optional) – Update task state

  • task_abort_event (Event, optional) – Check for abort, defaults to None

class ska_tmc_mccsmasterleafnode.commands.On(*args: Any, **kwargs: Any)

Bases: MccsMLNCommand

A class for MccsMasterLeafNode’s On() command.

On command on MccsMasterLeafNode enables the telescope to perform further operations and observations. It Invokes On command on Mccs Controller device.

do()

Method to invoke On command on Mccs Controller.

on(logger: Logger, task_callback: Callable, task_abort_event: Optional[Event] = None) None

A method to invoke the On command. It sets the task_callback status according to command progress.

Parameters:
  • logger (logging.Logger) – logger

  • task_callback (Callable, optional) – Update task state

  • task_abort_event (Event, optional) – Check for abort, defaults to None

class ska_tmc_mccsmasterleafnode.commands.ReleaseAllResources(*args: Any, **kwargs: Any)

Bases: MccsMLNCommand

A class to send Release command to MCCS Controller.

do(argin=None) Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke Release command.

Parameters:

argin – The string in JSON format.

Returns:

A tuple containing a return code and “” as a string on successful release all resources. or Exception Message on failure / Rejection

rtype:

(ResultCode, str)

release_all_resources(argin: str, task_callback: Callable, task_abort_event: Event) None

This is a long running method for ReleaseAllResources command, it executes do hook, invokes Release command on MCCS Master Leaf Node.

Parameters:

argin – Input JSON string

:type argin : str :param task_callback: Update task state, defaults to None :type task_callback: Callable, optional :param task_abort_event: Check for abort, defaults to None :type task_abort_event: Event, optional

update_task_status(**kwargs) None

Method to update task status with result code and exception message if any for release resource.

class ska_tmc_mccsmasterleafnode.commands.Standby(*args: Any, **kwargs: Any)

Bases: MccsMLNCommand

A class for MccsMasterLeafNode’s Standby() command.

Standby command on MccsMasterLeafNode enables the telescope to perform further operations and observations. It invokes Standby command on Mccs Controller device.

do()

Method to invoke Standby command on Mccs Controller.

standby(logger: Logger, task_callback: Callable, task_abort_event: Optional[Event] = None) None

This is a long running method for Standby command, it executes do hook, invokes Standby command on MCCS Controller.

Parameters:
  • logger (logging.Logger) – logger

  • task_callback (Callable, optional) – Update task state

  • task_abort_event (Event, optional) – Check for abort, defaults to None