RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
gui.rtc_component.RtcComponent Class Reference

Widget that represent an RTC component. More...

Inheritance diagram for gui.rtc_component.RtcComponent:

Public Member Functions

 __init__ (self, str component_name, cfg, parent=None)
 
 component_name (self)
 Getter for component name.
 
 rr_uri (self)
 Getter for rr_uri Qt Property.
 
 set_rr_uri (self, str uri)
 Setter for rr_uri Qt Property.
 
 disconnect_facades (self)
 Disconnect for all facades.
 
 oldb_uri (self)
 Getter for oldb_uri Qt Property.
 
 set_oldb_uri (self, str uri)
 Setter for oldb_uri Qt Property.
 
 on_startButton_clicked (self, checked)
 Slot that reacts to the the startButton being clicked.
 
 on_stopButton_clicked (self, checked)
 Slot that reacts to the the stopButton being clicked.
 
 on_logsButton_clicked (self, checked)
 Slot that reacts to the the logsButton being clicked.
 
 focusInEvent (self, QFocusEvent event)
 Overrides QWidget.focusInEvent.
 
 try_mal_connection (self)
 Tries to connect to StdCmds and Update Mal servers only is connection is not already established.
 
 is_rr_connected (self)
 Indicates if BOTH interfaces are connected.
 
 handle_introspection_connection_changed (self, bool new_value)
 If introspection facade is connected, it asks for interfaces used by current rtc component.
 
 handle_component_start_finished (self, str comp_name)
 Handles the component start notification from the deployment control.
 
 handle_component_stop_finished (self, str comp_name)
 Handles the component stop notification from the deployment control.
 
 update_tooltip (self)
 Updates the Component Name labels tooltip with extra information.
 
 on_actionCopy_RR_URI_triggered (self)
 Reacts to the users requests of copying to clipboard the RR URI.
 
 on_actionCopy_OLDB_URI_triggered (self)
 Reacts to the users requests of copying to clipboard the OLDB URI.
 

Public Attributes

 ui = Ui_RtcComponent()
 
 handle_introspection_connection_changed = IfFacade(f"{self._rr_uri}Introspection")
 
 try_mal_connection
 

Static Public Attributes

 logs_requested = Signal(str)
 Signal that indicates that the component is requesting logs to be shown.
 
 start_requested = Signal((str,), (str, object))
 Signal that indicates that the component is requesting its process to be started.
 
 stop_requested = Signal((str,), (str, object))
 Signal that indicates that the component is requesting its process to be stopped.
 
 rr_connection_changed = Signal(bool)
 Current Components's Reply Request connection state has changed.
 
 supervisor_detected = Signal((str,), (str, str))
 Signal that indicates RTC Supervisor uri address for Global Status display.
 
 rr_uri_changed = Signal(str)
 Request Reply URI signal emitted when property changes value.
 
 rr_uri
 
 oldb_uri_changed = Signal(str)
 OLDB URI signal emitted when property changes value.
 
 oldb_uri
 

Protected Member Functions

 _init_gui (self)
 In some cases, widgets are not ready for modification until init is done.
 

Protected Attributes

 _component_name = component_name
 
str _rr_uri = ""
 
str _oldb_uri = ""
 
 _cfg = cfg
 
 _logger = CiiLogManager.get_logger(__name__)
 
 _if_facade = None
 
str _tooltip_text = "Component name"
 
 _is_connected = None
 

Detailed Description

Widget that represent an RTC component.

It inherits from TaurusDeviceBase to hold a model property that represents the top level OLDB entry in which the device is located at.

The Widget contains:

  • nameLabel: a QLabel that shows the name of the component
  • stateLabel: a TaurusLabel that shows the OLDB value of the state.
  • startButton: a QPushButton that starts the component.
  • stopButton: a QPushButton that stops the component.
  • logsButton: a QPushButton that shows the logs in a LogsWidget

    TODO A method to create and show a LogsWidget. TODO A init argument to use the method above when logsButton is pressed, instead of emitting the signal.

Constructor & Destructor Documentation

◆ __init__()

gui.rtc_component.RtcComponent.__init__ ( self,
str component_name,
cfg,
parent = None )
Parameters
[in]component_nameComponent name, a string that identifies the RTC component.
[in]cfgConfiguration.
[in]parentReference to the parent widget. Needed by Qt.

Member Function Documentation

◆ _init_gui()

gui.rtc_component.RtcComponent._init_gui ( self)
protected

In some cases, widgets are not ready for modification until init is done.

This can be workaround by invoking another method at the end of init.

◆ component_name()

gui.rtc_component.RtcComponent.component_name ( self)

Getter for component name.

◆ disconnect_facades()

gui.rtc_component.RtcComponent.disconnect_facades ( self)

Disconnect for all facades.

◆ focusInEvent()

gui.rtc_component.RtcComponent.focusInEvent ( self,
QFocusEvent event )

Overrides QWidget.focusInEvent.

When focus is gained, we start connections to the component.

Parameters
[in]eventthe QFocusEvent

◆ handle_component_start_finished()

gui.rtc_component.RtcComponent.handle_component_start_finished ( self,
str comp_name )

Handles the component start notification from the deployment control.

Parameters
[in]comp_nameString that carries the started component.

◆ handle_component_stop_finished()

gui.rtc_component.RtcComponent.handle_component_stop_finished ( self,
str comp_name )

Handles the component stop notification from the deployment control.

Parameters
[in]comp_nameString that carries the stopped component.

◆ handle_introspection_connection_changed()

gui.rtc_component.RtcComponent.handle_introspection_connection_changed ( self,
bool new_value )

If introspection facade is connected, it asks for interfaces used by current rtc component.

Based on this, it's deducted whether the component is RTC Supervisor or not (RTC Supervisor component supports 'WriteBackCmds' and 'ModeCmds' interfaces).

If the component is indentified as Supervisor, a signal 'supervisor_detected' is emmited with OLDB URI of the component and then it's used by RtcGlobalStatus widget in RTC Overview class to display global status

◆ is_rr_connected()

gui.rtc_component.RtcComponent.is_rr_connected ( self)

Indicates if BOTH interfaces are connected.

◆ oldb_uri()

gui.rtc_component.RtcComponent.oldb_uri ( self)

Getter for oldb_uri Qt Property.

◆ on_actionCopy_OLDB_URI_triggered()

gui.rtc_component.RtcComponent.on_actionCopy_OLDB_URI_triggered ( self)

Reacts to the users requests of copying to clipboard the OLDB URI.

◆ on_actionCopy_RR_URI_triggered()

gui.rtc_component.RtcComponent.on_actionCopy_RR_URI_triggered ( self)

Reacts to the users requests of copying to clipboard the RR URI.

◆ on_logsButton_clicked()

gui.rtc_component.RtcComponent.on_logsButton_clicked ( self,
checked )

Slot that reacts to the the logsButton being clicked.

Parameters
[in]checkedstate of the button being pressed
Note
This Slot is auto-connected during the self.ui.setupUi() invokation.

◆ on_startButton_clicked()

gui.rtc_component.RtcComponent.on_startButton_clicked ( self,
checked )

Slot that reacts to the the startButton being clicked.

Parameters
[in]checkedstate of the button being pressed
Note
This Slot is auto-connected during the self.ui.setupUi() invokation.

◆ on_stopButton_clicked()

gui.rtc_component.RtcComponent.on_stopButton_clicked ( self,
checked )

Slot that reacts to the the stopButton being clicked.

Parameters
[in]checkedstate of the button being pressed
Note
This Slot is auto-connected during the self.ui.setupUi() invokation.

◆ rr_uri()

gui.rtc_component.RtcComponent.rr_uri ( self)

Getter for rr_uri Qt Property.

◆ set_oldb_uri()

gui.rtc_component.RtcComponent.set_oldb_uri ( self,
str uri )

Setter for oldb_uri Qt Property.

Parameters
[in]uriURI String that locates OLDB entries for the component

◆ set_rr_uri()

gui.rtc_component.RtcComponent.set_rr_uri ( self,
str uri )

Setter for rr_uri Qt Property.

Parameters
[in]uriURI String that identifies the RR StdIf

◆ try_mal_connection()

gui.rtc_component.RtcComponent.try_mal_connection ( self)

Tries to connect to StdCmds and Update Mal servers only is connection is not already established.

◆ update_tooltip()

gui.rtc_component.RtcComponent.update_tooltip ( self)

Updates the Component Name labels tooltip with extra information.

Member Data Documentation

◆ _cfg

gui.rtc_component.RtcComponent._cfg = cfg
protected

◆ _component_name

gui.rtc_component.RtcComponent._component_name = component_name
protected

◆ _if_facade

gui.rtc_component.RtcComponent._if_facade = None
protected

◆ _is_connected

gui.rtc_component.RtcComponent._is_connected = None
protected

◆ _logger

gui.rtc_component.RtcComponent._logger = CiiLogManager.get_logger(__name__)
protected

◆ _oldb_uri

gui.rtc_component.RtcComponent._oldb_uri = ""
protected

◆ _rr_uri

gui.rtc_component.RtcComponent._rr_uri = ""
protected

◆ _tooltip_text

gui.rtc_component.RtcComponent._tooltip_text = "Component name"
protected

◆ handle_introspection_connection_changed

gui.rtc_component.RtcComponent.handle_introspection_connection_changed = IfFacade(f"{self._rr_uri}Introspection")

◆ logs_requested

gui.rtc_component.RtcComponent.logs_requested = Signal(str)
static

Signal that indicates that the component is requesting logs to be shown.

◆ oldb_uri

gui.rtc_component.RtcComponent.oldb_uri
static
Initial value:
= Property(
type=str,
fget=oldb_uri,
fset=set_oldb_uri,
notify=oldb_uri_changed,
doc="URI that identifies OLDB entries for this component.",
)

◆ oldb_uri_changed

gui.rtc_component.RtcComponent.oldb_uri_changed = Signal(str)
static

OLDB URI signal emitted when property changes value.

◆ rr_connection_changed

gui.rtc_component.RtcComponent.rr_connection_changed = Signal(bool)
static

Current Components's Reply Request connection state has changed.

◆ rr_uri

gui.rtc_component.RtcComponent.rr_uri
static
Initial value:
= Property(
type=str,
fget=rr_uri,
fset=set_rr_uri,
notify=rr_uri_changed,
doc="URI that identifies Request-Reply MAL interface",
)

◆ rr_uri_changed

gui.rtc_component.RtcComponent.rr_uri_changed = Signal(str)
static

Request Reply URI signal emitted when property changes value.

◆ start_requested

gui.rtc_component.RtcComponent.start_requested = Signal((str,), (str, object))
static

Signal that indicates that the component is requesting its process to be started.

◆ stop_requested

gui.rtc_component.RtcComponent.stop_requested = Signal((str,), (str, object))
static

Signal that indicates that the component is requesting its process to be stopped.

◆ supervisor_detected

gui.rtc_component.RtcComponent.supervisor_detected = Signal((str,), (str, str))
static

Signal that indicates RTC Supervisor uri address for Global Status display.

◆ try_mal_connection

gui.rtc_component.RtcComponent.try_mal_connection

◆ ui

gui.rtc_component.RtcComponent.ui = Ui_RtcComponent()

The documentation for this class was generated from the following file: