Observing Component Commands

This module includes the ComponentCommand specialized classes.

AssignResources

class ska_csp_lmc_common.commands.observing_commands.ComponentAssign(receiver: ObservingComponent, resources: str, logger: Logger | None = None)

Bases: ComponentCommand

Class to handle the AssignResources command on a CSP sub-system component.

_run(argument: Dict, callback: Callable | None = None) None

The method is specialized to invoke the AssignResources command on the CSP sub-system component:

self._component.assignresources(argument, callback=callback)

succeeded() bool

Return whether the command executed on a CSP sub-system completes successfully.

The AssignResources command on a sub-system ends with success when the following condition is satisfied:

self._component.obs_state == ObsState.IDLE

ReleaseResources

class ska_csp_lmc_common.commands.observing_commands.ComponentRelease(component: ObservingComponent, resources: Any | None = None, logger: Logger | None = None)

Bases: ComponentCommand

Class to handle ReleaseResources command on a CSP sub-system component.

_run(argument: dict, callback: Callable) None

The method is specialized to invoke the ReleaseResources command on the CSP sub-system component:

self._component.releaseresources(argument, callback=callback)

succeeded() bool

Return whether the command executed on a CSP sub-system completes successfully.

The ReleaseResources command on a sub-system ends with success when the following condition is satisfied:

self._component.obs_state == ObsState.EMPTY or self._component.obs_state == ObsState.IDLE

ReleaseAllResources

class ska_csp_lmc_common.commands.observing_commands.ComponentReleaseAll(component: ObservingComponent, logger: Logger | None = None)

Bases: ComponentCommand

Class to handle Subarray ReleaseAllResources command.

_run(argument: Any | None = None, callback: Callable | None = None) None

The method is specialized to invoke the ReleaseAllResources command on the CSP sub-system component:

self._component.releaseallresources(callback=callback)

succeeded()

Return whether the command executed on a CSP sub-system completes successfully.

The ReleaseAllResources command on a sub-system ends with success when the following condition is satisfied:

component.obs_state == ObsState.EMPTY

Configure

class ska_csp_lmc_common.commands.observing_commands.ComponentConfigure(component: ObservingComponent, resources, logger: Logger | None = None)

Bases: ComponentCommand

Class to handle Configure command on a CSP sub-system component.

_run(argument: Dict, callback: Callable | None = None) None

Invoke the command on the CSP sub-system.

succeeded() bool

Return whether the command executed on a CSP sub-system completes successfully. The Configure command on a sub-system ends with success when the following condition is satisfied:

self._component.obs_state == ObsState.READY

failure_detected()

Return whether a failure was detected during command execution.

Failure conditions are: - Timeout expired - Failure in command execution on a sub-system - Sub-system reports FAULT obsState.

Scan

class ska_csp_lmc_common.commands.observing_commands.ComponentScan(component: ObservingComponent, resources: Any, logger: Logger | None = None)

Bases: ComponentCommand

Class to handle Scan command on a CSP sub-system component.

_run(argument: Any, callback: Callable | None = None) None

The method is specialized to invoke the Scan command on the CSP sub-system component.

command_ended()

Helper function called when the command ends on the sub-system component. It evaluates the command execution time and invokes the observer.

notify method.

succeeded() None

This command does not specialize the succeeded method.

failure_detected() None

Return whether a failure was detected during command execution.

Failure conditions are: - Timeout expired - Failure in command execution on a sub-system - Sub-system reports FAULT obsState.

EndScan

class ska_csp_lmc_common.commands.observing_commands.ComponentEndScan(component: ObservingComponent, logger: Logger | None = None)

Bases: ComponentCommand

Class to handle the EndScan command on a sub-system component.

succeeded()

Return whether the command executed on a CSP sub-system completes successfully.

The EndScan command on a sub-system ends with success when the following condition is satisfied:

self._component.obs_state == ObsState.READY

failure_detected()

Return whether a failure was detected during command execution.

Failure conditions are: - Timeout expired - Failure in command execution on a sub-system - Sub-system reports FAULT obsState.

Abort

class ska_csp_lmc_common.commands.observing_commands.ComponentAbort(component: ObservingComponent, logger: Logger | None = None)

Bases: ComponentCommand

Class to handle Abort command on a sub-system component.

succeeded()

Return whether the command executed on a CSP sub-system completes successfully.

The Abort command on a sub-system ends with success when the following condition is satisfied:

self._component.obs_state == ObsState.ABORTED

ObsReset

class ska_csp_lmc_common.commands.observing_commands.ComponentObsReset(component: ObservingComponent, logger: Logger | None = None)

Bases: ComponentCommand

Class to handle Subarray ObsReset command.

succeeded() bool

Return whether the command executed on a CSP sub-system completes successfully.

The Abort command on a sub-system ends with success when the following condition is satisfied:

self._component.obs_state == ObsState.IDLE

Restart

class ska_csp_lmc_common.commands.observing_commands.ComponentRestart(component: ObservingComponent, logger: Logger | None = None)

Bases: ComponentCommand

Class to handle Subarray Restart command.

succeeded() bool

Return whether the command executed on a CSP sub-system completes successfully.

The Restart command on a sub-system ends with success when the following condition is satisfied:

self._component.obs_state == ObsState.EMPTY