Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
rqt_robot_monitor.robot_monitor.RobotMonitorWidget Class Reference
Inheritance diagram for rqt_robot_monitor.robot_monitor.RobotMonitorWidget:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def get_color_for_value
def new_diagnostic
def on_pause
def pause
def resizeEvent
def restore_settings
def save_settings
def shutdown
def unpause

Private Member Functions

def _add_statitem
def _cb
def _clear
def _get_statitem
def _get_toplevel_diagnosticstat
def _notify_statitems
def _on_new_message_received
def _tree_clicked
def _tree_nodes_updated
def _update_background_color
def _update_devices_tree
def _update_flat_tree
def _update_message_state
def _update_warns_errors

Private Attributes

 _err_statusitems
 _is_stale
 _last_message_time
 _original_alt_base_color
 _original_base_color
 _paused
 _sub
 _timer
 _toplevel_statitems
 _TREE_ALL
 _TREE_ERR
 _TREE_WARN
 _warn_statusitems

Static Private Attributes

tuple _sig_new_diagnostic = Signal(DiagnosticArray)
tuple _sig_tree_nodes_updated = Signal(int)
int _TREE_ALL = 1
int _TREE_ERR = 3
int _TREE_WARN = 2

Detailed Description

NOTE: RobotMonitorWidget.shutdown function needs to be called
when the instance of this class terminates.

RobotMonitorWidget itself doesn't store previous diagnostic states.
It instead delegates that function to TimelinePane class.

Definition at line 50 of file robot_monitor.py.


Constructor & Destructor Documentation

def rqt_robot_monitor.robot_monitor.RobotMonitorWidget.__init__ (   self,
  context,
  topic 
)
:param context: plugin context hook to enable adding widgets as a
        ROS_GUI pane, 'PluginContext'
:param topic: Diagnostic topic to subscribe to 'str'

Definition at line 65 of file robot_monitor.py.


Member Function Documentation

def rqt_robot_monitor.robot_monitor.RobotMonitorWidget._add_statitem (   self,
  statusitem,
  statitem_list,
  tree,
  headline,
  statusmsg,
  statlevel 
) [private]

Definition at line 470 of file robot_monitor.py.

def rqt_robot_monitor.robot_monitor.RobotMonitorWidget._cb (   self,
  msg 
) [private]
Intended to be called from non-Qt thread,
ie. ROS Subscriber in particular.

:type msg: DiagnosticArray

Definition at line 123 of file robot_monitor.py.

Definition at line 572 of file robot_monitor.py.

def rqt_robot_monitor.robot_monitor.RobotMonitorWidget._get_statitem (   self,
  item_index,
  item_list,
  tree = None,
  mode = 2 
) [private]
:param mode: 1 = remove from given list, 2 = w/o removing.

Definition at line 484 of file robot_monitor.py.

Return an array that contains DiagnosticStatus only at the top level of
the given msg.

:type msg: DiagnosticArray
:rtype: DiagnosticStatus[]

Definition at line 281 of file robot_monitor.py.

Notify new message arrival to all existing InespectorWindow instances
that are encapsulated in StatusItem instances contained in
self._toplevel_statitems.

Definition at line 163 of file robot_monitor.py.

Called whenever a new message is received by the timeline.
Different from new_message in that it is called even if the timeline is
_paused, and only when a new message is received, not when the timeline
is scrubbed

Definition at line 494 of file robot_monitor.py.

def rqt_robot_monitor.robot_monitor.RobotMonitorWidget._tree_clicked (   self,
  item,
  column 
) [private]
Slot to QTreeWidget.itemDoubleClicked

:type item: QTreeWidgetItem
:type column: int

Definition at line 185 of file robot_monitor.py.

Definition at line 271 of file robot_monitor.py.

Definition at line 528 of file robot_monitor.py.

Update the tree from the bottom

:type diag_array: DiagnosticArray

Definition at line 195 of file robot_monitor.py.

Update the given flat tree (ie. tree that doesn't show children nodes -
all of its elements will be shown on top level) with
all the DiagnosticStatus instances contained in the given
DiagnosticArray, regardless of the level of the device in a device
category.

For both warn / error trees, StatusItem instances are newly generated.

:type diag_arr: DiagnosticArray

Definition at line 364 of file robot_monitor.py.

Definition at line 503 of file robot_monitor.py.

Update the warning and error trees.

Unlike _update_devices_tree function where all DiagnosticStatus
need to be inspected constantly, this function is used in a trial
to reduce unnecessary inspection of the status level for all
DiagnosticStatus contained in the incoming DiagnosticArray msg.

:type msg: DiagnosticArray

Definition at line 301 of file robot_monitor.py.

def rqt_robot_monitor.robot_monitor.RobotMonitorWidget.get_color_for_value (   self,
  queue_diagnostic,
  color_index 
)
Overridden from AbstractStatusWidget.

:type color_index: int

Definition at line 577 of file robot_monitor.py.

def rqt_robot_monitor.robot_monitor.RobotMonitorWidget.new_diagnostic (   self,
  msg,
  is_forced = False 
)
Overridden from AbstractStatusWidget.

When monitoring not paused, this public method updates all the
treewidgets contained in this class, and also notifies the StatusItem
instances that are stored in the all-device-tree, which eventually
updates the InspectorWindows in them.

:type msg: DiagnosticArray
:param is_forced: Intended for non-incoming-msg trigger
 (in particular, from child object like TimelinePane).
@author: Isaac Saito
 

Definition at line 135 of file robot_monitor.py.

def rqt_robot_monitor.robot_monitor.RobotMonitorWidget.on_pause (   self,
  paused,
  diagnostic_arr 
)
Check if InspectorWindows are set. If they are, pause them.

Pay attention not to confuse with RobotMonitorWidget.pause.

:type paused: bool
:type diagnostic_arr: DiagnosticArray

Definition at line 333 of file robot_monitor.py.

Do nothing if already being _paused.

:type msg: DiagnosticArray

Definition at line 315 of file robot_monitor.py.

Overridden from QWidget

Definition at line 180 of file robot_monitor.py.

def rqt_robot_monitor.robot_monitor.RobotMonitorWidget.restore_settings (   self,
  plugin_settings,
  instance_settings 
)

Definition at line 566 of file robot_monitor.py.

def rqt_robot_monitor.robot_monitor.RobotMonitorWidget.save_settings (   self,
  plugin_settings,
  instance_settings 
)

Definition at line 563 of file robot_monitor.py.

This needs to be called whenever this class terminates.
This closes all the instances on all trees.
Also unregisters ROS' subscriber, stops timer.

Definition at line 540 of file robot_monitor.py.

:type msg: DiagnosticArray

Definition at line 326 of file robot_monitor.py.


Member Data Documentation

Definition at line 69 of file robot_monitor.py.

Definition at line 69 of file robot_monitor.py.

Definition at line 69 of file robot_monitor.py.

Definition at line 69 of file robot_monitor.py.

Definition at line 69 of file robot_monitor.py.

Definition at line 69 of file robot_monitor.py.

tuple rqt_robot_monitor::robot_monitor.RobotMonitorWidget::_sig_new_diagnostic = Signal(DiagnosticArray) [static, private]

Definition at line 60 of file robot_monitor.py.

Definition at line 59 of file robot_monitor.py.

Definition at line 69 of file robot_monitor.py.

Definition at line 69 of file robot_monitor.py.

Definition at line 69 of file robot_monitor.py.

Definition at line 61 of file robot_monitor.py.

Definition at line 271 of file robot_monitor.py.

Definition at line 63 of file robot_monitor.py.

Definition at line 271 of file robot_monitor.py.

Definition at line 62 of file robot_monitor.py.

Definition at line 271 of file robot_monitor.py.

Definition at line 69 of file robot_monitor.py.


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


rqt_robot_monitor
Author(s): Isaac Saito, Ze'ev Klapow, Kevin Watts, Josh Faust
autogenerated on Mon Oct 6 2014 07:16:09