Fanned Out Command
Abstracts all the logic for executing a command on a device.
- class DishManagerCMMethod(logger, method, component_state, command_args=(), command_kwargs={}, awaited_component_state={}, timeout_s=0)[source]
Class that executes the method, args and kwargs passed to it.
This class specifically handles the case where the method responds with a result or raises an exception.
- __init__(logger, method, component_state, command_args=(), command_kwargs={}, awaited_component_state={}, timeout_s=0)[source]
- Parameters:
logger (Logger) – Logger instance
device (str) – The name for the device this command is executed on
command_name (str) – The name for the command
command (str) – Command to run as part of execute
component_state (Optional[dict]) – The component state containing the attributes to wait for updates on.
command_argument (Any) – Argument for the requested command
awaited_component_state (dict) – The component state containing the attributes and values to wait for.
timeout_s (float) – Timeout (in seconds) for the command execution. A value <= 0 will disable the timeout.
progress_callback (Callable) – Optional callback to report progress updates.
- class DishManagerCMMethodCallBack(logger, method, component_state, command_args=(), command_kwargs={}, awaited_component_state={}, timeout_s=0)[source]
Class that executes the method, args and kwargs passed to it.
This class specifically handles the case where the task_callback is used to track method result.
- __init__(logger, method, component_state, command_args=(), command_kwargs={}, awaited_component_state={}, timeout_s=0)[source]
- Parameters:
logger (Logger) – Logger instance
device (str) – The name for the device this command is executed on
command_name (str) – The name for the command
command (str) – Command to run as part of execute
component_state (Optional[dict]) – The component state containing the attributes to wait for updates on.
command_argument (Any) – Argument for the requested command
awaited_component_state (dict) – The component state containing the attributes and values to wait for.
timeout_s (float) – Timeout (in seconds) for the command execution. A value <= 0 will disable the timeout.
progress_callback (Callable) – Optional callback to report progress updates.
- class DishManagerCMMethodResultCode(logger, method, component_state, command_args=(), command_kwargs={}, awaited_component_state={}, timeout_s=0)[source]
Class that executes the method, args and kwargs passed to it.
This class specifically handles the case where method responds with a ResultCode immediately.
- __init__(logger, method, component_state, command_args=(), command_kwargs={}, awaited_component_state={}, timeout_s=0)[source]
- Parameters:
logger (Logger) – Logger instance
device (str) – The name for the device this command is executed on
command_name (str) – The name for the command
command (str) – Command to run as part of execute
component_state (Optional[dict]) – The component state containing the attributes to wait for updates on.
command_argument (Any) – Argument for the requested command
awaited_component_state (dict) – The component state containing the attributes and values to wait for.
timeout_s (float) – Timeout (in seconds) for the command execution. A value <= 0 will disable the timeout.
progress_callback (Callable) – Optional callback to report progress updates.
- class FannedOutCommand(logger, device, command_name, command, component_state, command_argument=None, awaited_component_state={}, timeout_s=0, progress_callback=None)[source]
Defines a single command to be fanned out as part of a Action.
- __init__(logger, device, command_name, command, component_state, command_argument=None, awaited_component_state={}, timeout_s=0, progress_callback=None)[source]
- Parameters:
logger (Logger) – Logger instance
device (str) – The name for the device this command is executed on
command_name (str) – The name for the command
command (str) – Command to run as part of execute
component_state (Optional[dict]) – The component state containing the attributes to wait for updates on.
command_argument (Any) – Argument for the requested command
awaited_component_state (dict) – The component state containing the attributes and values to wait for.
timeout_s (float) – Timeout (in seconds) for the command execution. A value <= 0 will disable the timeout.
progress_callback (Callable) – Optional callback to report progress updates.
- property failed: bool
Check if the fanned out command has failed.
- property finished: bool
Check if the fanned out command has finished.
- report_progress(task_callback)[source]
Report the progress of fanned out command.
- Return type:
None
- property status: FannedOutCommandStatus
Get the status of the fanned out command.
- property successful: bool
Check if the fanned out command has failed.
- class FannedOutTangoCommand(logger, device, command_name, device_component_manager, command_argument=None, awaited_component_state={}, timeout_s=0, progress_callback=None, is_device_ignored=False)[source]
- __init__(logger, device, command_name, device_component_manager, command_argument=None, awaited_component_state={}, timeout_s=0, progress_callback=None, is_device_ignored=False)[source]
- Parameters:
logger (Logger) – Logger instance
device (str) – The name for the device this command is executed on
command_name (str) – The name for the command to be executed
device_component_manager (TangoDeviceComponentManager) – The component manager of the subservient device
timeout_s (float) – Timeout (in seconds) for the command execution
command_argument (Any) – Argument for the requested command
awaited_component_state (dict) – The component state containing the attributes and values to wait for.
progress_callback (Callable) – Optional callback to report progress updates.
is_device_ignored (bool) – Toggle to ignore fanning out of command if the device is ignored.
- class FannedOutTangoLongRunningCommand(logger, device, command_name, device_component_manager, command_argument=None, awaited_component_state={}, timeout_s=0, progress_callback=None, is_device_ignored=False)[source]
- __init__(logger, device, command_name, device_component_manager, command_argument=None, awaited_component_state={}, timeout_s=0, progress_callback=None, is_device_ignored=False)[source]
- Parameters:
logger (Logger) – Logger instance
device (str) – The name for the device this command is executed on
command_name (str) – The name for the command to be executed
device_component_manager (TangoDeviceComponentManager) – The component manager of the subservient device
timeout_s (float) – Timeout (in seconds) for the command execution
command_argument (Any) – Argument for the requested command
awaited_component_state (dict) – The component state containing the attributes and values to wait for.
progress_callback (Callable) – Optional callback to report progress updates.
is_device_ignored (bool) – Toggle to ignore fanning out of command if the device is ignored.