RTC Toolkit  2.0.0
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
gui.rtc_component.RtcComponent Class Reference

Widget that represent an RTC component. More...

Inheritance diagram for gui.rtc_component.RtcComponent:

Public Member Functions

def __init__ (self, str component_name, parent=None)
 
def component_name (self)
 Getter for component name. More...
 
def log_uri (self)
 Getter for log_uri Qt Property. More...
 
def set_log_uri (self, str uri)
 Setter for log_uri Qt Property. More...
 
def rr_uri (self)
 Getter for rr_uri Qt Property. More...
 
def set_rr_uri (self, str uri)
 Setter for rr_uri Qt Property. More...
 
def oldb_uri (self)
 Getter for oldb_uri Qt Property. More...
 
def set_oldb_uri (self, str uri)
 Setter for oldb_uri Qt Property. More...
 
def on_startButton_clicked (self, checked)
 Slot that reacts to the the startButton being clicked. More...
 
def on_stopButton_clicked (self, checked)
 Slot that reacts to the the stopButton being clicked. More...
 
def on_logsButton_clicked (self, checked)
 Slot that reacts to the the logsButton being clicked. More...
 
def focusInEvent (self, QFocusEvent event)
 Overrides QWidget.focusInEvent. More...
 
def is_rr_connected (self)
 Indicates if BOTH interfaces are connected. More...
 
def init_pressed (self)
 Check connection and forwards an init command to the Facade. More...
 
def stop_pressed (self)
 Check connection and forwards an stop command to the Facade. More...
 
def enable_pressed (self)
 Check connection and forwards an enable command to the Facade. More...
 
def disable_pressed (self)
 Check connection and forwards an disable command to the Facade. More...
 
def reset_pressed (self)
 Check connection and forwards an reset command to the Facade. More...
 
def exit_pressed (self)
 Check connection and forwards an exit command to the Facade. More...
 
def state_pressed (self)
 Check connection and forwards an exit command to the Facade. More...
 
def update_pressed (self)
 Check connection and forwards an update command to the Facade. More...
 
def on_connection_changed (self, bool new_value)
 Captures connection event, and emits only when both interfaces are connected. More...
 
def handle_state_result (self, str result)
 Handles the result from the getState() method in the StdCmds Interface. More...
 
def start_poll_state (self)
 Starts polling from the StdCmds Interface. More...
 
def stop_poll_state (self)
 Stops polling from the StdCmds Interface. More...
 
def start_subscription_state (self, int retry=0)
 Subscribe to datapoints changes from OLD. More...
 
def stop_subscription_state (self)
 Unsubscribe from datapoints changes from OLD. More...
 
def try_subscribe_or_poll_state (self)
 

Public Attributes

 ui
 

Static Public Attributes

 logs_requested = Signal(str)
 Signal that indicates that the component is requesting logs to be shown. More...
 
 start_requested = Signal(str)
 Signal that indicates that the component is requesting its process to be started. More...
 
 stop_requested = Signal(str)
 Signal that indicates that the component is requesting its process to be stopped. More...
 
 rr_connection_changed = Signal(bool)
 Current Components's Reply Request connection state has changed. More...
 
 log_uri_changed = Signal(str)
 Log URI signal emitted when property changes value. More...
 
 log_uri
 
 rr_uri_changed = Signal(str)
 Request Reply URI signal emitted when property changes value. More...
 
 rr_uri
 
 oldb_uri_changed = Signal(str)
 OLDB URI signal emitted when property changes value. More...
 
 oldb_uri
 

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:

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__()

def gui.rtc_component.RtcComponent.__init__ (   self,
str  component_name,
  parent = None 
)

Member Function Documentation

◆ component_name()

def gui.rtc_component.RtcComponent.component_name (   self)

Getter for component name.

◆ disable_pressed()

def gui.rtc_component.RtcComponent.disable_pressed (   self)

Check connection and forwards an disable command to the Facade.

◆ enable_pressed()

def gui.rtc_component.RtcComponent.enable_pressed (   self)

Check connection and forwards an enable command to the Facade.

◆ exit_pressed()

def gui.rtc_component.RtcComponent.exit_pressed (   self)

Check connection and forwards an exit command to the Facade.

◆ focusInEvent()

def 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_state_result()

def gui.rtc_component.RtcComponent.handle_state_result (   self,
str  result 
)

Handles the result from the getState() method in the StdCmds Interface.

◆ init_pressed()

def gui.rtc_component.RtcComponent.init_pressed (   self)

Check connection and forwards an init command to the Facade.

◆ is_rr_connected()

def gui.rtc_component.RtcComponent.is_rr_connected (   self)

Indicates if BOTH interfaces are connected.

◆ log_uri()

def gui.rtc_component.RtcComponent.log_uri (   self)

Getter for log_uri Qt Property.

◆ oldb_uri()

def gui.rtc_component.RtcComponent.oldb_uri (   self)

Getter for oldb_uri Qt Property.

◆ on_connection_changed()

def gui.rtc_component.RtcComponent.on_connection_changed (   self,
bool  new_value 
)

Captures connection event, and emits only when both interfaces are connected.

Parameters
[in]new_valueBoolean that indicates the new state of connection

◆ on_logsButton_clicked()

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

Slot that reacts to the the logsButton being clicked.

   @param[in] checked state of the button being pressed
Note
This Slot is auto-connected during the self.ui.setupUi() invokation.

◆ on_startButton_clicked()

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

Slot that reacts to the the startButton being clicked.

   @param[in] checked state of the button being pressed
Note
This Slot is auto-connected during the self.ui.setupUi() invokation.

◆ on_stopButton_clicked()

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

Slot that reacts to the the stopButton being clicked.

   @param[in] checked state of the button being pressed
Note
This Slot is auto-connected during the self.ui.setupUi() invokation.

◆ reset_pressed()

def gui.rtc_component.RtcComponent.reset_pressed (   self)

Check connection and forwards an reset command to the Facade.

◆ rr_uri()

def gui.rtc_component.RtcComponent.rr_uri (   self)

Getter for rr_uri Qt Property.

◆ set_log_uri()

def gui.rtc_component.RtcComponent.set_log_uri (   self,
str  uri 
)

Setter for log_uri Qt Property.

It also enables or disables the logsButton when appropiate

Parameters
[in]uriURI String that locates logs for the component

◆ set_oldb_uri()

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

Setter for oldb_uri Qt Property.

   @param[in] uri URI String that locates OLDB entries for the component

◆ set_rr_uri()

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

Setter for rr_uri Qt Property.

   @param[in] uri URI String that identifies the RR StdIf

◆ start_poll_state()

def gui.rtc_component.RtcComponent.start_poll_state (   self)

Starts polling from the StdCmds Interface.

◆ start_subscription_state()

def gui.rtc_component.RtcComponent.start_subscription_state (   self,
int   retry = 0 
)

Subscribe to datapoints changes from OLD.

◆ state_pressed()

def gui.rtc_component.RtcComponent.state_pressed (   self)

Check connection and forwards an exit command to the Facade.

◆ stop_poll_state()

def gui.rtc_component.RtcComponent.stop_poll_state (   self)

Stops polling from the StdCmds Interface.

◆ stop_pressed()

def gui.rtc_component.RtcComponent.stop_pressed (   self)

Check connection and forwards an stop command to the Facade.

◆ stop_subscription_state()

def gui.rtc_component.RtcComponent.stop_subscription_state (   self)

Unsubscribe from datapoints changes from OLD.

◆ try_subscribe_or_poll_state()

def gui.rtc_component.RtcComponent.try_subscribe_or_poll_state (   self)

◆ update_pressed()

def gui.rtc_component.RtcComponent.update_pressed (   self)

Check connection and forwards an update command to the Facade.

Member Data Documentation

◆ log_uri

gui.rtc_component.RtcComponent.log_uri
static
Initial value:
= Property(
type=str,
fget=log_uri,
fset=set_log_uri,
notify=log_uri_changed,
doc="URI that identifies logs location",
)

◆ log_uri_changed

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

Log URI signal emitted when property changes value.

◆ 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)
static

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

◆ stop_requested

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

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

◆ ui

gui.rtc_component.RtcComponent.ui

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