Custom Command Classes
Custom command classes for commands requiring overrides to do().
- class AbortCommand(command_tracker, component_manager, callback, logger=None)[source]
A custom class for Abort Command.
- __init__(command_tracker, component_manager, callback, logger=None)[source]
Initialise a new AbortCommand instance.
- Parameters:
command_tracker – the device’s command tracker
component_manager – the device’s component manager
callback – callback to be called when this command starts and finishes
logger (
Optional[Logger]) – a logger for this command object to use
- do(*args, **kwargs)[source]
Stateless hook for command functionality.
- Parameters:
args (
Any) – positional args to the component manager methodkwargs (
Any) – keyword args to the component manager method
- Return type:
tuple[ResultCode,str]- Returns:
A tuple containing the result code (e.g. STARTED) and a string message containing a command_id (if the command has been accepted) or an informational message (if the command was rejected)
- class ApplyPointingModelCommand(component_manager, logger=None)[source]
Class for handling band pointing parameters given a JSON input.
- __init__(component_manager, logger=None)[source]
Initialise a new ApplyPointingModelCommand instance.
- Parameters:
component_manager – the device to which this command belongs.
logger (
Optional[Logger]) – a logger for this command to use.
- do(*args, **kwargs)[source]
Implement ApplyPointingModel command functionality.
- Parameters:
args (
Any) –JSON object with a schema similar to this:
{”interface”: “…”, “antenna”: “….”, “band”: “Band_…”, “attrs”: {…}, “coefficients”: {
”IA”: {…}, … … “HESE8”:{…}
}, “rms_fits”: {
”xel_rms”: {…}, “el_rms”: {…}, “sky_rms”: {…}
}
}
- Return type:
tuple[ResultCode,str]- Returns:
A tuple containing a return code and a string message indicating status.
- class ResetComponentConnectionCommand(component_manager, logger=None)[source]
Class for handling the ResetComponentConnection command.
- __init__(component_manager, logger=None)[source]
Initialise a new ResetComponentConnectionCommand instance.
- Parameters:
component_manager – the device to which this command belongs.
logger (
Optional[Logger]) – a logger for this command to use.
- do(*args, **kwargs)[source]
Implement ResetComponentConnection command functionality.
- Parameters:
args (
Any) – list of Subservient device names.- Return type:
tuple[ResultCode,str]- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- class ResetTrackTableCommand(component_manager, logger=None)[source]
Class for handling the ResetTrackTable command.
- class SetFrequencyCommand(component_manager, logger=None)[source]
Class for handling the SetFrequency command.
- class SetHPolAttenuationCommand(component_manager, logger=None)[source]
Class for handling the SetHPolAttenuation command.
- __init__(component_manager, logger=None)[source]
Initialise a new SetHPolAttenuation instance.
- Parameters:
component_manager – the device to which this command belongs.
logger (
Optional[Logger]) – a logger for this command to use.
- do(*args, **kwargs)[source]
Implement SetHPolAttenuation command functionality.
- Parameters:
args (
Any) – RFCM H-polarization attenuation value (dB)- Return type:
tuple[ResultCode,str]- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- class SetKValueCommand(component_manager, logger=None)[source]
Class for handling the SetKValue command.
- class SetVPolAttenuationCommand(component_manager, logger=None)[source]
Class for handling the SetVPolAttenuation command.
- __init__(component_manager, logger=None)[source]
Initialise a new SetVPolAttenuation instance.
- Parameters:
component_manager – the device to which this command belongs.
logger (
Optional[Logger]) – a logger for this command to use.
- do(*args, **kwargs)[source]
Implement SetVPolAttenuation command functionality.
- Parameters:
args (
Any) – RFCM V-polarization attenuation value (dB)- Return type:
tuple[ResultCode,str]- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- class StowCommand(command_name, command_tracker, component_manager, method_name, callback=None, logger=None, validator=None)[source]
A custom class for Stow Command.
- do(*args, **kwargs)[source]
Stateless hook for command functionality.
- Parameters:
args (
Any) – positional args to the component manager methodkwargs (
Any) – keyword args to the component manager method
- Return type:
tuple[ResultCode,str]- Returns:
A tuple containing the result code (e.g. STARTED) and a string message if the command has been accepted or failed