Mid.CBF Subarray Component

class ska_csp_lmc_mid.subarray.mid_cbf_subarray_component.MidCbfSubarrayComponent(*args: Any, **kwargs: Any)

Bases: CbfSubarrayComponent

Specialization of the CbfSubarray component class for the Mid.CSP.

property assigned_receptors: List[str]

Return the information about the receptors assigned to the subarray.

Returns:

The list of receptors currently assigned to Mid Cbf subarray on success, otherwise an empty list.

property dish_vcc_config: str

Return the information about mapping between DishID and VCCs.

Returns:

The DishID-VCC mapping

_push_event(recv_event: tango.EventData, device_attr_name=None) None

Extend the component event callback to specifie the correct attribute name in case there is a mismach between the CBF component and CPS tango device

_assign_receptors_validator(receptor_list: Any) List[str]

Helper method to validate the list of receptors received as argument of the AssignResources command, filtering out the receptors IDs that cannot be assigned to the subarray because already assigned or not available.

The method gets the input list and checks the required receptors IDs against the list of available receptors. This list includes the receptors that:

  • have a valid network link with the corresponding VCC

  • the connected VCC is enabled and working.

  • is not assigned to another subarray.

Parameters:

receptor_list – list of receptors IDs to be assigned to the Mid.CBF subarray, as specified by the input argument of the AssignResources method.

Returns:

the list of valid receptors IDs to assign to the Mid.CBF Subarray on success, otherwise an empty list.

_get_csp_ctrl_connector()

Method that create the CSP controller proxy if not already defined and return it.

_receptor_id_available(receptor_id: str, check_activated: bool | None = True) str
Method that performs some the folliwing check:
  • the receptor id is stored in the available lists

  • the receptor is already assigned to a subarray

Parameters:
  • receptor_id – Ascii receptor id (i.e. SKA001, MKT000)

  • check_activated – optional flag. If True additional checks are performed on the receptor_id

Returns:

valid ascii receptor id if valid. Else empty string.

_receptor_id_validation(receptor_id: str) bool

Verify if receptor name is compliant with ADR32 Dish type: SKA dish [SKA] and MeerKAT dish [MKT]. MeerKAT range 0 to 63 SKA range 1 to 133 i.e: MKT063, SKA001

Parameters:

receptor_id – Ascii receptor id (i.e SKA001, MKT000)

Returns:

True if receptor name is compliant to ADR32

_remove_receptors_validator(receptor_list: List[str]) List[str]

Method to filter out the receptors IDs that do not belong to the subarray. Validate the list of receptors received as argument of the.

RemoveResources command, filtering out the receptors IDs that do not belong to the subarray.

Parameters:

receptor_list – list of receptors IDs to remove from the CBF subarray.

Returns:

the list of valid receptors IDs to remove from the MID CBF Subarray on success, otherwise an empty list.

_validated_receptors(resources: dict, validator_function: Callable) List[str]

Return the list of the validated receptors IDs that are passed as input argument to the Mid.CBF subarray Add/RemoveReceptors command.

Parameters:
  • resources – the input dictionary with the list of receptors to add/remove to/from the subarray.

  • validator_function – The callback invoked to validate the list of receptors.

Returns:

the list with the receptors to add/remove.

releaseresources(input_resources: Dict, callback: Callable) None

Invoke the RemoveReceptors command on the Mid CBF subarray.

Parameters:
  • input_resources – The release resource dictionary with configuration

  • callback – Method invoked when the command ends on the target device

Raise:

ValueError exception if the list of receptors is empty.

assignresources(input_resources: Dict, callback: Callable) None

Invoke the AddReceptors command on the Mid CBF subarray.

Parameters:
  • input_resources – The assign resource dictionary with configuration

  • callback – Method invoked when the commands end on the target device

Raise:

ValueError exception if the list of receptors is empty.

assignresources_completed()

Succeeded callback invoked on the component

Returns:

the list of assigned receptors

releaseallresources(callback: Callable | None = None) None

Invoke the RemoveAllReceptors command on the Mid CBF subarray.

Parameters:

callback – Method invoked when the commands end on the target device

Returns:

None

Raise:

ValueError exception if the list of receptors specified into the configuration dictionary is not valid

scan(scan_data: Dict, callback: Callable) None

Invoke the Scan command on the Mid CBF subarray.

Parameters:
  • scan_data – The dictionary with scan data

  • callback – Method invoked when the commands end on the target device,

Mid.PSS Subarray Component

class ska_csp_lmc_mid.subarray.mid_pss_subarray_component.MidPssSubarrayComponent(*args: Any, **kwargs: Any)

Bases: PssSubarrayComponent

Specialization of the PssSubarray component class for the Mid.CSP.

releaseresources(input_resources: Any, callback: Callable) None

Invoke the release resources command on the Mid CBF subarray.

Parameters:
  • input_resources – The release resource dictionary with configuration

  • callback – Method invoked when the commands end on the target device

Returns:

None

Raise:

ValueError exception if the list of receptors specified into the configuration dictionary is not valid

assignresources(input_resources: Any, callback: Callable) None

Invoke the assign resources command on the Mid CBF subarray.

Parameters:
  • input_resources – The assign resource dictionary with configuration

  • callback – Method invoked when the commands end on the target device

Returns:

None

Raise:

ValueError exception if the list of receptors specified into the configuration dictionary is not valid

releaseallresources(callback: Callable | None = None) None

Invoke the releaseall resources command on the Mid CBF subarray.

Parameters:

callback – Method invoked when the commands end on the target device

Returns:

None

Raise:

ValueError exception if the list of receptors specified into the configuration dictionary is not valid