FSP Processing Mode Component Manager
- class ska_csp_lmc_mid.manager.mid_fsp_capability_component_manager.MidFspCapabilityComponentManager(*args: Any, **kwargs: Any)
Bases:
CSPBaseComponentManager
Class for Mid Csp Fsp Capability Component Manager.
- __init__(properties: ska_csp_lmc_common.manager.manager_configuration.ComponentManagerConfiguration, max_workers: int | None = 5, update_device_property_cbk: Callable | None = None, logger: Logger | None = None) None
Initialize the FspCapability Component Manager Class
- Parameters:
properties – A class instance whose properties are the device properties.
max_workers – the number of worker threads used by the ComponentManager ThreadPool
update_device_property_cbk – The device method invoked to update the attributes. Defaults to None.
logger – The device or python logger if default is None.
- property fsp_json: str
Return a JSON string with the overall FSPs status.
- Returns:
the serialized JSON string otherwise an empty string.
- property fsp_available: List[int]
Return the list of available FSPs. A FSP is available when its state is ON and the functionMode is IDLE.
- property fsp_unavailable: List[int]
Return the list of FSPs not available. A FSP is not available when its state is not ON.
- property fsps_deployed: int
Return the number of FSPs deployed in the system.
- property fsps_fw_version: str
Return the list of the FSPs online firmware version.
- property fsps_sw_version: str
Return the list of the FSPs online software version.
- property fsps_hw_version: str
Return the list of the FSPs online hardware version.
- property fsps_subarray_membership: list[str]
Return the FSPs subarray membership.
- Returns:
a list of strings. Each string reports the subarray IDs to which a FSP belongs to.
Note
Example:
fsp_num = list_idx + 1
[“1,2”, “1,3,4”, “”, “”]
FSP 1 is assigned to subarrays 1 and 2 FSP 2 is assigned to subarrays 1,3,4 The other FSPs are not assigned at all.
- property fsps_fqdn_assigned: List[List[str]]
Return the nested list of the FSPs’ fqdn assigned to all subarrays. .. note:
Examples: fsps_fqdn_assigned = [ ['mid_csp_cbf/fsp/01', '','',''], ['', 'mid_csp_cbf/fsp/03','',''], ['', '','',''], ['mid_csp_cbf/fsp/02','mid_csp_cbf/fsp/02','',''], .... ] fsps_fqdn_assigned[0] = FQDNs of the FSPs assigned to subarray1 fsps_fqdn_assigned[1] = FQDNs of the FSPs assigned to subarray2
- _connect_to_devices() List[str]
Instantiate the connection with the Mid CBF Controller.
The Mid CBF Controller FQDN is defined as a device property as well as the connection timeout and polling time.
- Device property: CspCbf
ConnectionTimeout PingConnectionTime
- _handler_to_invoke(status: ska_control_model.TaskStatus | None = None, result: tuple[ska_control_model.ResultCode, str] | None = None)
Callbk invoked when the connection with all the FSP devices is completed.
- Parameters:
task_name – the name of the executed task
result_code – the task result
command_id – the unique task id, if any
task_status – the task status code, if any
result_msg – the message associated with the task result code.
- _read_fsp_version(fsp_online) None
- Read the Software, firmware and hardware version attributes
from an online FSP.
- Parameters:
fsp_online – one of the online FSP
- _connect_to_fsp_devices(list_of_fsp_devices, task_callback: Callable | None = None) None
Perform the connection with the FSP devices.
Instantiate the command observer and an init command for each FSP component. Each connection is executed in a separate worker thread.
- Parameters:
list_of_fsp_devices – the list of CBF FSP devices FQDNs
task_callback – registered method invoked when task ends.
- start_communicating() None
Start the connection with the Mid CBF Controller device to retrieve the list of the MId.CBF FSP Capability devices FQDNs.
This method is executed asynchronously
- get_fsp_data_subarray(subarray_num) str
Return string attributes from FSPs assigned to requested subarray. .. note:
The dictionary is in the following format: {'fsp_01':{"state": DevState.OFF, "health_state": 'UNKNOWN', "function_mode": 'IDLE'} 'fsp_02':{"state": DevState.OFF, "health_state": 'UNKNOWN', "function_mode": 'IDLE'}}