Package node_manager_fkie :: Module master_list_model :: Class MasterModel
[frames] | no frames]

Class MasterModel

source code

python_qt_binding.QtGui.QStandardItemModel --+
                                             |
                                            MasterModel

The model to manage the list with masters in ROS network.

Instance Methods
 
__init__(self, local_masteruri=None)
Creates a new list model.
source code
QtCore.Qt.ItemFlag
flags(self, index)
Returns: Flag or the requestet item
source code
 
updateMaster(self, master)
Updates the information of the ros master.
source code
[MasterItem or QtGui.QStandardItem, ...]
addRow(self, master, local, root, index)
Creates the list of the items from master.
source code
 
updateMasterStat(self, master, quality)
Updates the information of the ros master.
source code
 
setChecked(self, master, state)
Set the master to checked state
source code
 
removeMaster(self, master)
Remove the master with given name.
source code
 
updateMasterErrors(self, master, errors)
Updates the errors reported by master_discovery.
source code
 
updateTimeDiff(self, master, timediff)
Updates the time difference reported by master_discovery.
source code
 
updateDescription(self, master, descr)
Updates the description of the master with given name.
source code
 
on_sync_clicked(self, checked, masteruri) source code
Class Variables
  sync_start = Signal(str)
  sync_stop = Signal(str)
  COL_SYNC = 0
  COL_NAME = 1
  COL_SYNCBTN = 2
Instance Variables
  header = [('Sync', 28), ('Name',-1)]
the list with columns [(name, width), ...]
Method Details

flags(self, index)

source code 
Parameters:
Returns: QtCore.Qt.ItemFlag
Flag or the requestet item

updateMaster(self, master)

source code 

Updates the information of the ros master. If the ROS master not exists, it will be added.

Parameters:

addRow(self, master, local, root, index)

source code 

Creates the list of the items from master. This list is used for the visualization of master data as a table row.

Parameters:
  • master (master_discovery_fkie.ROSMaster) - the master data
  • local (bool) - whether the master is local or not
Returns: [MasterItem or QtGui.QStandardItem, ...]
the list for the representation as a row

updateMasterStat(self, master, quality)

source code 

Updates the information of the ros master.

Parameters:
  • master (str) - the ROS master to update
  • quality (float) - the quality of the connection to master

setChecked(self, master, state)

source code 

Set the master to checked state

Parameters:
  • master (str) - the ROS master to update
  • state (bool) - new state

removeMaster(self, master)

source code 

Remove the master with given name.

Parameters:
  • master (str) - the ROS master to add

updateMasterErrors(self, master, errors)

source code 

Updates the errors reported by master_discovery.

Parameters:
  • master (str) - the ROS master to update
  • errors ([str]) - the list with errors

updateTimeDiff(self, master, timediff)

source code 

Updates the time difference reported by master_discovery.

Parameters:
  • master (str) - the ROS master to update
  • timediff (float) - the time difference to the host

updateDescription(self, master, descr)

source code 

Updates the description of the master with given name.

Parameters:
  • master (str) - the ROS master to add
  • descr (str) - the description of the master coded as HTML