Cbf Base Classes

The MCS contains two types of Tango devices: observing and non-observing. Non-observing devices contain only an OpState machine while observing devices contain both OpState and ObsState machines. As shown in the inheritance diagram below, non-observing devices inherit from CbfDevice and CbfComponentManager while observing devices inherit from CbfObsDevice and CbfObsComponentManager.

@startuml

/'--- CbfDevice ---'/

abstract SKABaseDevice

class "CbfDevice" {
  DeviceID : device_property
  deviceID() -> int
  Off() -> DevVarLongStringArrayType
  On() -> DevVarLongStringArrayType
  Reset() -> DevVarLongStringArrayType
  Standby() -> DevVarLongStringArrayType
  adminMode() -> AdminMode
  simulationMode() -> SimulationMode.FALSE
}

SKABaseDevice <|-- CbfDevice

/'--- CbfComponentManager ---'/

abstract TaskExecutorComponentManager

class "CbfComponentManager"{
  admin_mode_callback : Callable
  attr_archive_callback : Callable
  attr_change_callback : Callable
  health_state_callback : Callable
  start_communicating() -> None
  stop_communicating() -> None
}

TaskExecutorComponentManager <|-- CbfComponentManager

@enduml

@startuml

/'--- CbfDevice ---'/

class CbfDevice

/'--- CbfObsDevice ---'/

class "CbfObsDevice" {
  ConfigureScan(config: str) -> DevVarLongStringArrayType
  Scan(scan_id: int) -> DevVarLongStringArrayType
  EndScan() -> DevVarLongStringArrayType
  GoToIdle() -> DevVarLongStringArrayType
  obsState() -> ObsState
  configurationID() -> str
  scanID() -> int
  lastScanConfiguration() -> str
  delayModel() -> str
}

CbfDevice <|-- CbfObsDevice

/'--- CbfComponentManager ---'/

class CbfComponentManager


/'--- CbfObsComponentManager ---'/

abstract CbfObsComponentManager

class "CbfObsComponentManager" {
  obs_state : ObsState
  config_id : str
  scan_id : int
  delay_model : str
  is_configure_scan_allowed() -> bool
  configure_scan(config: str, task_callback: Optional[Callable]) -> tuple[TaskStatus, str]
  is_scan_allowed() -> bool
  scan(scan_id: int, task_callback: Optional[Callable]) -> tuple[TaskStatus, str]
  is_end_scan_allowed() -> bool
  end_scan(task_callback: Optional[Callable]) -> tuple[TaskStatus, str]
  is_go_to_idle_allowed() -> bool
  go_to_idle(task_callback: Optional[Callable]) -> tuple[TaskStatus, str]
}

CbfComponentManager <|-- CbfObsComponentManager

@enduml