Helper_Dish_Device
This module implements the Helper Dish Device for testing an integrated TMC
- class ska_tmc_simulators.helper_dish_device.HelperDishDevice(*args: Any, **kwargs: Any)
Bases:
HelperDishLNDeviceA device exposing commands and attributes of the Dish device.
- InitCommand = None
- init_device()
- b1CapabilityState(value: CapabilityStates) None
Sets the b1CapabilityState.
- Args:
value (CapabilityStates): The b1 capability state to set.
- b2CapabilityState(value: CapabilityStates) None
Sets the b2CapabilityState.
- Args:
value (CapabilityStates): The b2 capability state to set.
- b3CapabilityState(value: CapabilityStates) None
Sets the b3CapabilityState.
- Args:
value (CapabilityStates): The b3 capability state to set.
- b4CapabilityState(value: CapabilityStates) None
Sets the b4CapabilityState.
- Args:
value (CapabilityStates): The b4 capability state to set.
- b5aCapabilityState(value: CapabilityStates) None
Sets the b5aCapabilityState.
- Args:
value (CapabilityStates): The b5a capability state to set.
- b5bCapabilityState(value: CapabilityStates) None
Sets the b5bCapabilityState.
- Args:
value (CapabilityStates): The b5b capability state to set.
- lrcProtocolVersions() tuple[int, int]
Return supported protocol versions.
- Returns:
A tuple containing the lower and upper bounds of supported long running command protocol versions.
- read_isAdminModeEnabled()
Raise an AttributeError indicating ‘isAdminModeEnabled’ is unavailable.
- Raises:
AttributeError – Always raised to block access to the attribute.
- write_isAdminModeEnabled(value: bool)
Raise an AttributeError indicating that ‘isAdminModeEnabled’ cannot be modified.
- Parameters:
value – The value attempted to set for isAdminModeEnabled.
- Raises:
AttributeError – Always raised to access to the attribute..
- read_band1PointingModelParams() List[float]
This method reads the band1PointingModelParams attribute of a dish.
- Return type:
List
- write_band1PointingModelParams(value)
This method writes band1PointingModelParams attribute of dish.
- Parameters:
value – _band1PointingModelParams as given is the json
- Value dtype:
List
- Return type:
None
- read_band2PointingModelParams() List[float]
This method reads the band2PointingModelParams attribute of a dish.
- Return type:
List
- write_band2PointingModelParams(value)
This method writes band2PointingModelParams attribute of dish.
- Parameters:
value – _band2PointingModelParams as given is the json
- Value dtype:
List
- Return type:
None
- read_band3PointingModelParams() List[float]
This method reads the band3PointingModelParams attribute of a dish.
- Return type:
List
- write_band3PointingModelParams(value)
This method writes band3PointingModelParams attribute of dish.
- Parameters:
value – _band3PointingModelParams as given is the json
- Value dtype:
List
- Return type:
None
- read_band4PointingModelParams() List[float]
This method reads the band4PointingModelParams attribute of a dish.
- Return type:
List
- write_band4PointingModelParams(value)
This method writes band4PointingModelParams attribute of dish.
- Parameters:
value – _band4PointingModelParams as given is the json
- Value dtype:
List
- Return type:
None
- read_band5aPointingModelParams() List[float]
This method reads the band5aPointingModelParams attribute of a dish.
- Return type:
List
- write_band5aPointingModelParams(value)
This method writes band5aPointingModelParams attribute of dish.
- Parameters:
value – _band5aPointingModelParams as given is the json
- Value dtype:
List
- Return type:
None
- read_band5bPointingModelParams() List[float]
This method reads the band5bPointingModelParams attribute of a dish.
- Return type:
List
- write_band5bPointingModelParams(value)
This method writes band5bPointingModelParams attribute of dish.
- Parameters:
value – _band5bPointingModelParams as given is the json
- Value dtype:
List
- Return type:
None
- property configured_band
- Gets the currently configured band.
This property returns the band that has been configured for instance.
- Returns:
Band: The currently configured band.
- read_scanID() str
This method reads the scanID attribute of a dish.
- Return type:
str
- write_scanID(value: str) None
This method writes scanID attribute of dish.
- Parameters:
value – scan_id as given is the json
- Value dtype:
str
- Return type:
None
- trackTableLoadMode(value: TrackTableLoadMode) None
Set the trackTableLoadMode.
- Parameters:
value – TrackTableLoadMode (NEW or APPEND)
- Value dtype:
TrackTableLoadMode
- Return type:
None
- kValue() int
This attribute is used for storing dish kvalue into tango DB.Made this attribute memorized so that when device restart then previous set kvalue will be used validation.
- Returns:
kValue
- is_SetKValue_allowed() bool
This method checks if the SetKValue Command is allowed in current State.
- Return type:
bool
- Returns:
boolean value if kValue is set or not
- SetKValue(kvalue: int) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This command invokes SetKValue command on Dish Master.
- Parameters:
kvalue – k value between range 1-2222.
- Returns:
ResultCode and meeage
- Kvalue dtype:
int
- Return type:
Tuple[List[ResultCode], List[str]]
- read_configuredBand() Band
This method reads the configuredBand of dish.
- Returns:
configure band for dishes
- Return type:
Band
- read_offset() str
This method reads the offset of dishes.
- Returns:
offset for dishes
- Return type:
str
- read_programTrackTable() list
This method reads the programTrackTable attribute of a dish.
- Returns:
programTrackTable for dishes
- Return type:
list
- write_programTrackTable(value: list) None
This method writes the programTrackTable attribute of dish.
- Args:
- value(list): List of 50 timestamp, azimuth,
and elevation values for dish pointing.
Example:
programTrackTable = [ (timestamp1, azimuth1, elevation1), (timestamp2, azimuth2, elevation2), (timestamp3, azimuth3, elevation3) ]
- read_achievedPointing() numpy.ndarray
This method reads the achievedPointing of dishes.
- Returns:
achievedPointing of dishes
- Return type:
str
- set_dish_mode_operate()
Sets the dish mode to OPERATE.
- SetDirectConfiguredBand(argin: Band) None
Trigger a ConfiguredBand change
- SetDirectCapabilityState(argin: str) None
Trigger a CapabilityState change argin : str example: ‘{“B1”: 2, “B2”: 1, “B3”: 0, “B4”: 2, “B5a”: 1, “B5b”: 0}’
- AddTransition(state_duration_info: str) None
This command will set duration for pointing state such that when respective command for pointing state is triggered then it change pointing state after provided duration
- ResetTransitions() None
This command will reset PointingState duration which is set
- set_configured_band(configured_band: Band) None
This method set the Configured Band
- update_command_info(command_name: str = '', command_input: str | bool | None = None) None
This method updates the commandCallInfo attribute, with the respective command information.
- Args:
command_name (str): command name
command_input(str or bool): Input argin for command
- set_achieved_pointing() None
Sets the achieved pointing for dish.
- is_Abort_allowed() bool
This method checks if the Abort command is allowed in current State.
- Returns:
Trueif the command is allowed- Return type:
bool
- Raises:
CommandNotAllowed – command is not allowed
- Abort() Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This method invokes Abort command on Dish Master
- Returns:
ResultCode and message
- Return type:
tuple
- is_TrackLoadStaticOff_allowed() bool
This method checks if the TrackLoadStaticOff command is allowed in current State.
- Returns:
Trueif the command is allowed- Return type:
bool
- Raises:
CommandNotAllowed – command is not allowed
- TrackLoadStaticOff(argin: List[float]) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This method invokes TrackLoadStaticOff command on Dish Master.
- Parameters:
argin – A list containing scan_id/ time, cross elevation and elevation offsets.
- Argin dtype:
List(float)
- Returns:
ResultCode and message
- Return type:
Tuple[List[ResultCode], List[str]]
- is_ConfigureBand_allowed() bool
This method checks if the ConfigureBand command is allowed in current State.
- Returns:
Trueif the command is allowed- Return type:
bool
- Raises:
CommandNotAllowed – command is not allowed
- ConfigureBand(argin: str) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This method invokes ConfigureBand command on Dish Master.
- Parameters:
argin – input json
- Type:
str
- Returns:
ResultCode and message
- Return type:
Tuple[List[ResultCode], List[str]]
- ConfigureBand1(argin: bool) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This method invokes ConfigureBand1 command on Dish Master.
- Parameters:
argin – Boolean value; if true, invokes ConfigureBand1 command.
- Type:
bool
- Returns:
ResultCode and message
- Return type:
Tuple[List[ResultCode], List[str]]
- is_ConfigureBand2_allowed() bool
This method checks if the ConfigureBand2 Command is allowed in current State.
- Returns:
Trueif the command is allowed- Return type:
bool
- Raises:
CommandNotAllowed – command is not allowed
- ConfigureBand2(argin: bool) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This method invokes ConfigureBand2 command on Dish Master.
- Parameters:
argin – Boolean value; if true, invokes ConfigureBand2 command.
- Type:
bool
- Returns:
ResultCode and message
- Return type:
Tuple[List[ResultCode], List[str]]
- is_ConfigureBand3_allowed() bool
This method checks if the ConfigureBand3 command is allowed in the current state.
- Returns:
Trueif the command is allowed- Return type:
bool
- Raises:
CommandNotAllowed – command is not allowed
- ConfigureBand3(argin: bool) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This method invokes ConfigureBand3 command on Dish Master
- Returns:
ResultCode and message
- is_ConfigureBand4_allowed() bool
This method checks if the ConfigureBand4 Command is allowed in current State.
- Return type:
bool
- Returns:
Trueif the command is allowed- Raises:
CommandNotAllowed – command is not allowed
- ConfigureBand4(argin: bool) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This method invokes ConfigureBand4 command on Dish Master
- Returns:
ResultCode and message
- is_ConfigureBand5a_allowed() bool
This method checks if the ConfigureBand5a Command is allowed in current State.
:rtype:bool :return:
Trueif the command is allowed :raises CommandNotAllowed: command is not allowed
- ConfigureBand5a(argin: bool) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This method invokes ConfigureBand5a command on Dish Master
- Returns:
ResultCode and message
- is_ConfigureBand5b_allowed() bool
This method checks if the ConfigureBand5b Command is allowed in current State.
- Returns:
Trueif the command is allowed- Return type:
bool
- Raises:
CommandNotAllowed – command is not allowed
- ConfigureBand5b(argin: bool) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This method invokes ConfigureBand5b command on Dish Master
- Returns:
ResultCode and message
- update_track_lrcr(command_name: str = '', command_id: str = '') None
Updates the longrunningcommandresult after a delay.
- Track() Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This method invokes Track command on Dish Master
- Returns:
ResultCode and message
- Return type:
tuple
- is_Scan_allowed() bool | CommandNotAllowed
This method checks if the Scan Command is allowed in current State.
- Returns:
Trueif the command is allowed- Return type:
Union[bool,CommandNotAllowed]
- Raises:
CommandNotAllowed – command is not allowed
- Scan(argin: str) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This method sets scanID attribute of Dish Master.
- Returns:
Tuple[List[ResultCode], List[str]]
- is_EndScan_allowed() bool | CommandNotAllowed
This method checks if the EndScan Command is allowed in current State.
:rtype:bool :raises CommandNotAllowed: command is not allowed :rtype: Union[bool,CommandNotAllowed]
- EndScan() Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This method clears the scanID attribute of Dish Master
- Returns:
ResultCode and message
- Return type:
Tuple[List[ResultCode], List[str]]
- process_json_to_band_params(json_data: str) None
Processes the given JSON string, extracts ‘coefficients’ values in a specified order, and assigns them to an attribute based on the ‘band’ value.
- Raises:
CoefficientError – Not implemented error
- ApplyPointingModel(global_pointing_data: str) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This method applies the received global pointing model data. Its a dummy command at present. Will be renamed, once Dish ICD gets updated.
- Parameters:
global_pointing_data (str) – Global pointing data
- Returns:
ResultCode and message
- Return type:
Tuple[List[ResultCode], List[str]]
- is_TrackStop_allowed() bool
This method checks if the TrackStop Command is allowed in current State.
- Returns:
Trueif the command is allowed- Return type:
bool
- Raises:
CommandNotAllowed – command is not allowed
- TrackStop() Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This method invokes TrackStop command on Dish Master
- Returns:
ResultCode and message
- Return type:
tuple
- is_SetStowMode_allowed() bool
This method checks if the SetStowMode Command is allowed in current State.
- Returns:
Trueif the command is allowed- Return type:
bool
- Raises:
CommandNotAllowed – command is not allowed
- SetStowMode()
This method invokes SetStowMode command on Dish Device.
- Returns:
ResultCode and command_id
- Return type:
Tuple[List[ResultCode], List[str]]