Public Member Functions | |
def | __init__ |
def | dispatch |
def | register |
def | run |
Public Attributes | |
handlers | |
names | |
xbee |
Definition at line 14 of file dispatch.py.
def xbee.helpers.dispatch.dispatch.Dispatch.__init__ | ( | self, | |
ser = None , |
|||
xbee = None |
|||
) |
Definition at line 15 of file dispatch.py.
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.
Definition at line 15 of file dispatch.py.
Definition at line 15 of file dispatch.py.
Definition at line 15 of file dispatch.py.