Command Actions (Thread Task)
Module containing the fanned out command actions.
- class AbortScanSequence(logger, dish_manager_cm, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
Sequence to stop dish movement.
Reset the track table and then clear the scan_id
- __init__(logger, dish_manager_cm, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
- Parameters:
logger (logging.Logger) – Logger instance.
dish_manager_cm (DishManagerComponentManager) – The DishManagerComponentManager instance.
timeout_s (float) – Timeout (in seconds) for this action to complete. Defaults to DEFAULT_ACTION_TIMEOUT_S.
action_on_success (Optional[Action]) – Optional Action to execute automatically if this action succeeds.
action_on_failure (Optional[Action]) – Optional Action to execute automatically if this action fails.
waiting_callback (Optional[Callable]) – Optional callback executed periodically while waiting on commands.
- class ConfigureBandAction(logger, dish_manager_cm, requested_cmd, band=None, synchronise=None, data=None, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
Configure band on DS and SPFRx.
- __init__(logger, dish_manager_cm, requested_cmd, band=None, synchronise=None, data=None, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
- Parameters:
logger (logging.Logger) – Logger instance.
dish_manager_cm (DishManagerComponentManager) – The DishManagerComponentManager instance.
timeout_s (float) – Timeout (in seconds) for this action to complete. Defaults to DEFAULT_ACTION_TIMEOUT_S.
action_on_success (Optional[Action]) – Optional Action to execute automatically if this action succeeds.
action_on_failure (Optional[Action]) – Optional Action to execute automatically if this action fails.
waiting_callback (Optional[Callable]) – Optional callback executed periodically while waiting on commands.
- execute(task_callback, task_abort_event, completed_response_msg='')[source]
Execute the defined action using the assigned handler.
- Parameters:
task_callback (Callable) – Callback function used for reporting.
task_abort_event (Any) – Event or flag used to signal that the task should be aborted.
completed_response_msg (str) – Optional message to use upon successful completion.
- Raises:
NotImplementedError – If the action has no assigned handler.
- class ConfigureBandActionSequence(logger, dish_manager_cm, requested_cmd, band=None, synchronise=None, data=None, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
Sequence to set the dish power, configure a band, and then go to operate mode.
- __init__(logger, dish_manager_cm, requested_cmd, band=None, synchronise=None, data=None, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
- Parameters:
logger (logging.Logger) – Logger instance.
dish_manager_cm (DishManagerComponentManager) – The DishManagerComponentManager instance.
timeout_s (float) – Timeout (in seconds) for this action to complete. Defaults to DEFAULT_ACTION_TIMEOUT_S.
action_on_success (Optional[Action]) – Optional Action to execute automatically if this action succeeds.
action_on_failure (Optional[Action]) – Optional Action to execute automatically if this action fails.
waiting_callback (Optional[Callable]) – Optional callback executed periodically while waiting on commands.
- class InterlockAckAction(logger, dish_manager_cm, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
Acknowledge Interlock on DSC.
- __init__(logger, dish_manager_cm, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
- Parameters:
logger (logging.Logger) – Logger instance.
dish_manager_cm (DishManagerComponentManager) – The DishManagerComponentManager instance.
timeout_s (float) – Timeout (in seconds) for this action to complete. Defaults to DEFAULT_ACTION_TIMEOUT_S.
action_on_success (Optional[Action]) – Optional Action to execute automatically if this action succeeds.
action_on_failure (Optional[Action]) – Optional Action to execute automatically if this action fails.
waiting_callback (Optional[Callable]) – Optional callback executed periodically while waiting on commands.
- class SetMaintenanceModeAction(logger, dish_manager_cm, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
Transition the dish to MAINTENANCE mode.
- __init__(logger, dish_manager_cm, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
- Parameters:
logger (logging.Logger) – Logger instance.
dish_manager_cm (DishManagerComponentManager) – The DishManagerComponentManager instance.
timeout_s (float) – Timeout (in seconds) for this action to complete. Defaults to DEFAULT_ACTION_TIMEOUT_S.
action_on_success (Optional[Action]) – Optional Action to execute automatically if this action succeeds.
action_on_failure (Optional[Action]) – Optional Action to execute automatically if this action fails.
waiting_callback (Optional[Callable]) – Optional callback executed periodically while waiting on commands.
- execute(task_callback, task_abort_event, completed_response_msg='')[source]
Execute the defined action using the assigned handler.
- Parameters:
task_callback (Callable) – Callback function used for reporting.
task_abort_event (Any) – Event or flag used to signal that the task should be aborted.
completed_response_msg (str) – Optional message to use upon successful completion.
- Raises:
NotImplementedError – If the action has no assigned handler.
- class SetOperateModeAction(logger, dish_manager_cm, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
Transition the dish to OPERATE mode.
- __init__(logger, dish_manager_cm, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
- Parameters:
logger (logging.Logger) – Logger instance.
dish_manager_cm (DishManagerComponentManager) – The DishManagerComponentManager instance.
timeout_s (float) – Timeout (in seconds) for this action to complete. Defaults to DEFAULT_ACTION_TIMEOUT_S.
action_on_success (Optional[Action]) – Optional Action to execute automatically if this action succeeds.
action_on_failure (Optional[Action]) – Optional Action to execute automatically if this action fails.
waiting_callback (Optional[Callable]) – Optional callback executed periodically while waiting on commands.
- execute(task_callback, task_abort_event, completed_response_msg='')[source]
Execute the defined action using the assigned handler.
- Parameters:
task_callback (Callable) – Callback function used for reporting.
task_abort_event (Any) – Event or flag used to signal that the task should be aborted.
completed_response_msg (str) – Optional message to use upon successful completion.
- Raises:
NotImplementedError – If the action has no assigned handler.
- class SetStandbyFPModeAction(logger, dish_manager_cm, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
Transition the dish to STANDBY_FP mode.
- __init__(logger, dish_manager_cm, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
- Parameters:
logger (logging.Logger) – Logger instance.
dish_manager_cm (DishManagerComponentManager) – The DishManagerComponentManager instance.
timeout_s (float) – Timeout (in seconds) for this action to complete. Defaults to DEFAULT_ACTION_TIMEOUT_S.
action_on_success (Optional[Action]) – Optional Action to execute automatically if this action succeeds.
action_on_failure (Optional[Action]) – Optional Action to execute automatically if this action fails.
waiting_callback (Optional[Callable]) – Optional callback executed periodically while waiting on commands.
- class SetStandbyLPModeAction(logger, dish_manager_cm, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
Transition the dish to STANDBY_LP mode.
- __init__(logger, dish_manager_cm, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
- Parameters:
logger (logging.Logger) – Logger instance.
dish_manager_cm (DishManagerComponentManager) – The DishManagerComponentManager instance.
timeout_s (float) – Timeout (in seconds) for this action to complete. Defaults to DEFAULT_ACTION_TIMEOUT_S.
action_on_success (Optional[Action]) – Optional Action to execute automatically if this action succeeds.
action_on_failure (Optional[Action]) – Optional Action to execute automatically if this action fails.
waiting_callback (Optional[Callable]) – Optional callback executed periodically while waiting on commands.
- execute(task_callback, task_abort_event, completed_response_msg='')[source]
Execute the defined action using the assigned handler.
- Parameters:
task_callback (Callable) – Callback function used for reporting.
task_abort_event (Any) – Event or flag used to signal that the task should be aborted.
completed_response_msg (str) – Optional message to use upon successful completion.
- Raises:
NotImplementedError – If the action has no assigned handler.
- class SlewAction(logger, dish_manager_cm, target, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
Slew the dish to the specified target coordinates.
- __init__(logger, dish_manager_cm, target, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
- Parameters:
logger (logging.Logger) – Logger instance.
dish_manager_cm (DishManagerComponentManager) – The DishManagerComponentManager instance.
action_on_success (Optional[Action]) – Optional Action to execute automatically if this action succeeds.
action_on_failure (Optional[Action]) – Optional Action to execute automatically if this action fails.
waiting_callback (Optional[Callable]) – Optional callback executed periodically while waiting on commands.
- Target:
The target coordinates to slew to.
- execute(task_callback, task_abort_event, completed_response_msg='')[source]
Execute the defined action using the assigned handler.
- Parameters:
task_callback (Callable) – Callback function used for reporting.
task_abort_event (Any) – Event or flag used to signal that the task should be aborted.
completed_response_msg (str) – Optional message to use upon successful completion.
- Raises:
NotImplementedError – If the action has no assigned handler.
- class TrackAction(logger, dish_manager_cm, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
Transition the dish to Track mode.
- __init__(logger, dish_manager_cm, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
- Parameters:
logger (logging.Logger) – Logger instance.
dish_manager_cm (DishManagerComponentManager) – The DishManagerComponentManager instance.
action_on_success (Optional[Action]) – Optional Action to execute automatically if this action succeeds.
action_on_failure (Optional[Action]) – Optional Action to execute automatically if this action fails.
waiting_callback (Optional[Callable]) – Optional callback executed periodically while waiting on commands.
- execute(task_callback, task_abort_event, completed_response_msg='')[source]
Execute the defined action using the assigned handler.
- Parameters:
task_callback (Callable) – Callback function used for reporting.
task_abort_event (Any) – Event or flag used to signal that the task should be aborted.
completed_response_msg (str) – Optional message to use upon successful completion.
- Raises:
NotImplementedError – If the action has no assigned handler.
- class TrackLoadStaticOffAction(logger, dish_manager_cm, off_xel, off_el, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
TrackLoadStaticOff action.
- __init__(logger, dish_manager_cm, off_xel, off_el, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
- Parameters:
logger (logging.Logger) – Logger instance.
dish_manager_cm (DishManagerComponentManager) – The DishManagerComponentManager instance.
timeout_s (float) – Timeout (in seconds) for this action to complete. Defaults to DEFAULT_ACTION_TIMEOUT_S.
action_on_success (Optional[Action]) – Optional Action to execute automatically if this action succeeds.
action_on_failure (Optional[Action]) – Optional Action to execute automatically if this action fails.
waiting_callback (Optional[Callable]) – Optional callback executed periodically while waiting on commands.
- class TrackStopAction(logger, dish_manager_cm, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
Stop Tracking.
- __init__(logger, dish_manager_cm, timeout_s=120, action_on_success=None, action_on_failure=None, waiting_callback=None)[source]
- Parameters:
logger (logging.Logger) – Logger instance.
dish_manager_cm (DishManagerComponentManager) – The DishManagerComponentManager instance.
timeout_s (float) – Timeout (in seconds) for this action to complete. Defaults to DEFAULT_ACTION_TIMEOUT_S.
action_on_success (Optional[Action]) – Optional Action to execute automatically if this action succeeds.
action_on_failure (Optional[Action]) – Optional Action to execute automatically if this action fails.
waiting_callback (Optional[Callable]) – Optional callback executed periodically while waiting on commands.
- apply_pointing_model(band_param_name, band_name, task_callback, logger, dish_manager_cm)[source]
Apply pointing model parameters for a given band if they exist and are not all zeros.
- Args:
band_param_name: The key in component_state for this band. band_name: Name/identifier of the band (for logging). task_callback: Callback to update task status on failure. logger: Logger instance for info/debug/error messages. dish_manager_cm: Component manager with component_state and update_pointing_model_params().
- Returns:
TaskStatus.FAILED and error string if an error occurs, otherwise None.