Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget Class Reference
Inheritance diagram for rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, name='Battery', icons=None, charge_icons=None, icon_paths=None, suppress_overlays=False, stale_icon=None)
 
def set_charging (self, value)
 
def set_stale (self)
 
def state (self)
 
def unset_stale (self)
 
def update_perc (self, val)
 
def update_state (self, state)
 
def update_time (self, value)
 

Static Public Attributes

 state_changed = Signal(int)
 

Private Member Functions

def _update_state (self, state)
 

Private Attributes

 __state
 
 _charge_icons
 
 _charging
 
 _icon_helper
 
 _icons
 
 _name
 
 _stale
 

Detailed Description

A Widget which displays incremental battery state, including a status tip.
To use this widget simply call :func:`update_perc` and :func:`update_time`
to change the displayed charge percentage and time remaining, respectively.

:param name: The name of this widget
:type name: str

Definition at line 40 of file battery_dash_widget.py.

Constructor & Destructor Documentation

def rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget.__init__ (   self,
  name = 'Battery',
  icons = None,
  charge_icons = None,
  icon_paths = None,
  suppress_overlays = False,
  stale_icon = None 
)

Definition at line 52 of file battery_dash_widget.py.

Member Function Documentation

def rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget._update_state (   self,
  state 
)
private

Definition at line 83 of file battery_dash_widget.py.

def rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget.set_charging (   self,
  value 
)

Definition at line 98 of file battery_dash_widget.py.

def rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget.set_stale (   self)
Set button to stale.

Not used by base dashboard implementation.

Definition at line 134 of file battery_dash_widget.py.

def rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget.state (   self)
Read-only accessor for the widgets current state.

Definition at line 92 of file battery_dash_widget.py.

def rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget.unset_stale (   self)

Definition at line 145 of file battery_dash_widget.py.

def rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget.update_perc (   self,
  val 
)
Update the displayed battery percentage.
The default implementation of this method displays in 20% increments

:param val: The new value to be displayed.
:type val: int

Definition at line 101 of file battery_dash_widget.py.

def rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget.update_state (   self,
  state 
)
Set the state of this button.
This will also update the icon for the button based on the ``self._icons`` list

:raises IndexError: If state is not a proper index to ``self._icons``

:param state: The state to set.
:type state: int

Definition at line 111 of file battery_dash_widget.py.

def rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget.update_time (   self,
  value 
)

Definition at line 127 of file battery_dash_widget.py.

Member Data Documentation

rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget.__state
private

Definition at line 77 of file battery_dash_widget.py.

rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget._charge_icons
private

Definition at line 73 of file battery_dash_widget.py.

rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget._charging
private

Definition at line 75 of file battery_dash_widget.py.

rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget._icon_helper
private

Definition at line 67 of file battery_dash_widget.py.

rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget._icons
private

Definition at line 72 of file battery_dash_widget.py.

rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget._name
private

Definition at line 74 of file battery_dash_widget.py.

rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget._stale
private

Definition at line 76 of file battery_dash_widget.py.

rqt_robot_dashboard.battery_dash_widget.BatteryDashWidget.state_changed = Signal(int)
static

Definition at line 49 of file battery_dash_widget.py.


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


rqt_robot_dashboard
Author(s): Ze'ev Klapow
autogenerated on Fri May 15 2020 03:39:04