Public Member Functions | Public Attributes | List of all members
xbee.helpers.dispatch.dispatch.Dispatch Class Reference
Inheritance diagram for xbee.helpers.dispatch.dispatch.Dispatch:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, ser=None, xbee=None)
 
def dispatch (self, packet)
 
def register (self, name, callback, filter)
 
def run (self, oneshot=False)
 

Public Attributes

 handlers
 
 names
 
 xbee
 

Detailed Description

Definition at line 14 of file dispatch.py.

Constructor & Destructor Documentation

def xbee.helpers.dispatch.dispatch.Dispatch.__init__ (   self,
  ser = None,
  xbee = None 
)

Definition at line 15 of file dispatch.py.

Member Function Documentation

def xbee.helpers.dispatch.dispatch.Dispatch.dispatch (   self,
  packet 
)
dispatch: XBee data dict -> None

When called, dispatch checks the given packet against each 
registered callback method and calls each callback whose filter 
function returns true.

Definition at line 63 of file dispatch.py.

def xbee.helpers.dispatch.dispatch.Dispatch.register (   self,
  name,
  callback,
  filter 
)
register: string, function: string, data -> None, function: data -> boolean -> None

Register will save the given name, callback, and filter function
for use when a packet arrives. When one arrives, the filter
function will be called to determine whether to call its associated
callback function. If the filter method returns true, the callback
method will be called with its associated name string and the packet
which triggered the call.

Definition at line 25 of file dispatch.py.

def xbee.helpers.dispatch.dispatch.Dispatch.run (   self,
  oneshot = False 
)
run: boolean -> None

run will read and dispatch any packet which arrives from the 
XBee device

Definition at line 47 of file dispatch.py.

Member Data Documentation

xbee.helpers.dispatch.dispatch.Dispatch.handlers

Definition at line 22 of file dispatch.py.

xbee.helpers.dispatch.dispatch.Dispatch.names

Definition at line 23 of file dispatch.py.

xbee.helpers.dispatch.dispatch.Dispatch.xbee

Definition at line 16 of file dispatch.py.


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


rosserial_xbee
Author(s): Adam Stambler
autogenerated on Fri Jun 7 2019 22:03:11