|
RTC Toolkit 6.0.0
|
RtcOverview Widget presents a list of RTC Components, based on the current deployment. More...
Public Member Functions | |
| __init__ (self, parent=None) | |
| Initialise method for the RtcOverview widget. | |
| set_components (self, list components) | |
| Uses the components contents to create a new RtcComponent widget and add it to the QListWidget. | |
| components (self) | |
| Getter for the list of components. | |
| set_dd_components (self, list dd_components) | |
| Uses the components contents to create a new RtcComponent widget and add it to the QListWidget. | |
| RtcComponent | get_component_widget (self, str component_name) |
| Returns the RtcComponent widget that corresponds to the component_name. | |
| int | get_component_widget_index (self, str component_name) |
| Returns component widget index Used for test purposes. | |
| int | component_count (self) |
| Returns the number of components in the list widget. | |
| set_deployment_control (self, deployment_control) | |
| Sets deployment control. | |
| set_cfg (self, cfg) | |
| Sets configuration. | |
| on_componentsListWidget_itemSelectionChanged (self) | |
| Handles the selection changes in the componentListWidget. | |
| setup_global_status_widget (self, sup_oldb_uri, sup_rr_uri) | |
| Aside from oldb_uri sets also rr_uri for Global Status widget so that Global Status may be retireved via polling. | |
| on_deployPushButton_clicked (self) | |
| When the Deploy Button is clicked, this Slot is called. | |
| on_undeployPushButton_clicked (self) | |
| When the Undeploy Button is clicked, this Slot is called. | |
| handle_component_started (self, object tag) | |
| Slot that handles the notification from DeploymentControl that a component has been successfully started. | |
| handle_component_stopped (self, object tag) | |
| Slot that handles the notification from DeploymentControl that a component has been successfully stopped. | |
| handle_component_start_failed (self, str msg, object tag=None) | |
| Slot that handles the notification from DeploymentControl that a component has failed to start. | |
| handle_component_stop_failed (self, str msg, object tag=None) | |
| Slot that handles the notification from DeploymentControl that a component has failed to stop. | |
| handle_supervisor_detected (self, sup_oldb_uri, sup_rr_uri) | |
| Reacts to a supervisor being detected through their available interfaces. | |
Public Attributes | |
| ui = Ui_RtcOverview() | |
| list | workers = [] |
| int | active_deployment_set_index = -1 |
| setup_global_status_widget | |
| handle_supervisor_detected | |
| handle_component_started = deployment_control | |
| handle_component_stopped | |
| set_dd_components | |
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 Component's Reply Request connection state has changed. | |
| components_changed = Signal(list) | |
| Signal that indicates component list have changed. | |
| custom_commands_uri_changed = Signal(str) | |
| Signal that communicates to the Custom Command widget the new URI. | |
| custom_commands_uri_removed = Signal(str) | |
| Signal that communicates to the Custom Command widget the removal of an URI. | |
| components | |
| Qt Property that holds the list of components. | |
Protected Member Functions | |
| _init_gui (self) | |
| In some cases, widgets are not ready for modification until init is done. | |
| _add_or_update_component_to_list (self, str name, str oldb_uri, str rr_uri, on_tasks_finished=None) | |
| Creates the new RtcComponent widget, and adds it to the QListWidget. | |
| _create_component (self, worker_thread, str name, str oldb_uri, str rr_uri) | |
| Creates component that is shown in componentsListWidget. | |
| _populate_components_list_widget (self, component) | |
| Creates component-based QListWidgetItem and adds it to componentsListWidget. | |
| _remove_components_not_in_list (self, list components) | |
| Removes the RtcComponents not present in the list from the RtcOverview widget. | |
| _on_dd_state_changed (self, current_state) | |
| Invoked regularly after clicking 'Deploy' button to track deployment state. | |
| _deployment_sets_changed (self, list deployment_sets) | |
| Adds deployment sets to combo box. | |
| _active_deployment_set_changed (self, str deployment_set) | |
| Set or unset active deployment set in combo box and enable/disable buttons. | |
| _deployment_daemon_disconnected (self) | |
Protected Attributes | |
| _logger = CiiLogManager.get_logger(__name__) | |
| list | _components = [] |
| list | _dd_components = [] |
| _previous_selected_widget = None | |
| _deployment_control = None | |
| _cfg = None | |
| _oldb_client = None | |
| int | _workers_finished = 0 |
| int | _workers_started = 0 |
| _poll_deployment_state = QTimer() | |
| bool | _deployment_in_progress = False |
| _deployment_sets_changed | |
| _on_dd_state_changed = True | |
RtcOverview Widget presents a list of RTC Components, based on the current deployment.
It is a specialization of a QListWidget, and uses the set_components() method to populate the list of RTC components.
| gui.rtc_overview.RtcOverview.__init__ | ( | self, | |
| parent = None ) |
Initialise method for the RtcOverview widget.
| parent | Parent widget reference, important when creating UIs |
|
protected |
Set or unset active deployment set in combo box and enable/disable buttons.
|
protected |
Creates the new RtcComponent widget, and adds it to the QListWidget.
| name | A String that identifies the component. |
| oldb_uri | The OLDB URI prefix of the component. |
| rr_uri | The Request-Reply URI of the component. |
| on_tasks_finished | Optional signal to trigger when the creation is finished. |
|
protected |
Creates component that is shown in componentsListWidget.
The method is processed in separate thread to avoid GUI blocking when componentsListWidget is rebuilt.
| worker_thread | A thread in which the method is processed. |
| name | A String that identifies the component. |
| oldb_uri | The OLDB URI prefix of the component. |
| rr_uri | The Request-Reply URI of the component. |
|
protected |
|
protected |
Adds deployment sets to combo box.
|
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.
|
protected |
Invoked regularly after clicking 'Deploy' button to track deployment state.
(We cannot rely on 'deploy' command finish because CII raises timeout error when in fact deployment is still in progress)
|
protected |
Creates component-based QListWidgetItem and adds it to componentsListWidget.
| component | A RTC component to be added to componentsListWidget |
|
protected |
Removes the RtcComponents not present in the list from the RtcOverview widget.
| components | List of dictionary with the component information. |
| int gui.rtc_overview.RtcOverview.component_count | ( | self | ) |
Returns the number of components in the list widget.
| gui.rtc_overview.RtcOverview.components | ( | self | ) |
Getter for the list of components.
| RtcComponent gui.rtc_overview.RtcOverview.get_component_widget | ( | self, | |
| str | component_name ) |
Returns the RtcComponent widget that corresponds to the component_name.
| component_name | String that identifies the component. |
| int gui.rtc_overview.RtcOverview.get_component_widget_index | ( | self, | |
| str | component_name ) |
Returns component widget index Used for test purposes.
| component_name | String that identifies the component. |
| gui.rtc_overview.RtcOverview.handle_component_start_failed | ( | self, | |
| str | msg, | ||
| object | tag = None ) |
Slot that handles the notification from DeploymentControl that a component has failed to start.
| msg | A String that gives a description of the problem. |
| tag | A RtcComponent.TagRequest object. It carries the comp_name. |
| gui.rtc_overview.RtcOverview.handle_component_started | ( | self, | |
| object | tag ) |
Slot that handles the notification from DeploymentControl that a component has been successfully started.
| tag | A RtcComponent.TagRequest object. It carries the comp_name. |
| gui.rtc_overview.RtcOverview.handle_component_stop_failed | ( | self, | |
| str | msg, | ||
| object | tag = None ) |
Slot that handles the notification from DeploymentControl that a component has failed to stop.
| msg | A String that gives a description of the problem. |
| tag | A RtcComponent.TagRequest object. It carries the comp_name. |
| gui.rtc_overview.RtcOverview.handle_component_stopped | ( | self, | |
| object | tag ) |
Slot that handles the notification from DeploymentControl that a component has been successfully stopped.
| tag | A RtcComponent.TagRequest object. It carries the comp_name. |
| gui.rtc_overview.RtcOverview.handle_supervisor_detected | ( | self, | |
| sup_oldb_uri, | |||
| sup_rr_uri ) |
Reacts to a supervisor being detected through their available interfaces.
This method handles only moving the RTC Component widget in the RTC Overview to the top position.
| sup_oldb_uri | RTC Supervisor OLDB Uri |
| sup_rr_uri | RTC Supervisor RR Uri |
| gui.rtc_overview.RtcOverview.on_componentsListWidget_itemSelectionChanged | ( | self | ) |
Handles the selection changes in the componentListWidget.
When the selection changes, the buttons for the RR methods need to be updated to indicate if they are available or not.
Also, since connection to the RTC Component MAL RR interface is async, we need to connect the current component state to the same groupbox, and disconnect all other components from it.
| gui.rtc_overview.RtcOverview.on_deployPushButton_clicked | ( | self | ) |
When the Deploy Button is clicked, this Slot is called.
It determines which is the deployment set from the combo box that is currently selected, and requests the deployment daemon to be deployed.
| gui.rtc_overview.RtcOverview.on_undeployPushButton_clicked | ( | self | ) |
When the Undeploy Button is clicked, this Slot is called.
It requests the deployment daemon to do undeploy of current deployment set.
| gui.rtc_overview.RtcOverview.set_cfg | ( | self, | |
| cfg ) |
Sets configuration.
| cfg | Configuration to be set. |
| gui.rtc_overview.RtcOverview.set_components | ( | self, | |
| list | components ) |
Uses the components contents to create a new RtcComponent widget and add it to the QListWidget.
| components | A python list that contains one dictionary per RTC Component. |
| gui.rtc_overview.RtcOverview.set_dd_components | ( | self, | |
| list | dd_components ) |
Uses the components contents to create a new RtcComponent widget and add it to the QListWidget.
| dd_components | A python list that contains one dictionary per RTC Component. |
| gui.rtc_overview.RtcOverview.set_deployment_control | ( | self, | |
| deployment_control ) |
Sets deployment control.
| deployment_control | Deployment Control to be set. |
| gui.rtc_overview.RtcOverview.setup_global_status_widget | ( | self, | |
| sup_oldb_uri, | |||
| sup_rr_uri ) |
Aside from oldb_uri sets also rr_uri for Global Status widget so that Global Status may be retireved via polling.
(The signal is emitted only when oldb_uri starts with 'file')
| sup_oldb_uri | RTC Supervisor OLDB Uri |
| sup_rr_uri | RTC Supervisor RR Uri |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| int gui.rtc_overview.RtcOverview.active_deployment_set_index = -1 |
|
static |
Qt Property that holds the list of components.
|
static |
Signal that indicates component list have changed.
|
static |
Signal that communicates to the Custom Command widget the new URI.
|
static |
Signal that communicates to the Custom Command widget the removal of an URI.
| gui.rtc_overview.RtcOverview.handle_component_started = deployment_control |
| gui.rtc_overview.RtcOverview.handle_component_stopped |
| gui.rtc_overview.RtcOverview.handle_supervisor_detected |
|
static |
Signal that indicates that the component is requesting logs to be shown.
|
static |
Current Component's Reply Request connection state has changed.
| gui.rtc_overview.RtcOverview.set_dd_components |
| gui.rtc_overview.RtcOverview.setup_global_status_widget |
|
static |
Signal that indicates that the component is requesting its process to be started.
|
static |
Signal that indicates that the component is requesting its process to be stopped.
| gui.rtc_overview.RtcOverview.ui = Ui_RtcOverview() |
| list gui.rtc_overview.RtcOverview.workers = [] |