Skip to content
Snippets Groups Projects
Commit ace18181 authored by jkerdreu's avatar jkerdreu
Browse files

new API..


git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/trunk@1390 b32b6428-25c9-4566-ad07-03861ab6144f
parent 91bd2d38
No related branches found
No related tags found
No related merge requests found
......@@ -29,20 +29,18 @@ def reduceAddr(addr):
class Dumper(xAAL.core.Engine):
def setLevel(self,value):
self.level = value
def display(self,msg):
term('yellow')
devType = msg.getDevtype()
msgType = msg.getMsgtype()
action = msg.getAction()
src = msg.getSource()
targets = [reduceAddr(addr) for addr in msg.getTargets()]
devType = msg.get_devtype()
msgType = msg.get_msgtype()
action = msg.get_action()
src = msg.get_source()
targets = [reduceAddr(addr) for addr in msg.get_targets()]
res = FORMAT % (msgType,action,src,devType,targets,msg.getBody())
res = FORMAT % (msgType,action,src,devType,targets,msg.get_body())
if (msgType == 'request'):
if self.level > 2: return
......@@ -61,9 +59,9 @@ class Dumper(xAAL.core.Engine):
print(res)
def processRxMsg(self,msg):
def main_handler(self,msg):
self.display(msg)
xAAL.core.Engine.processRxMsg(self,msg)
xAAL.core.Engine.main_handler(self,msg)
def usage():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment