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

Cleanup before merging Aio

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2732 b32b6428-25c9-4566-ad07-03861ab6144f
parent bd93a486
No related branches found
No related tags found
No related merge requests found
......@@ -34,9 +34,11 @@ import logging
logger = logging.getLogger(__name__)
class EngineState(Enum):
start = 0
run = 1
halt = 2
boot = 0
start = 1
run = 2
halt = 3
dead = 4
class Engine(object):
......@@ -208,17 +210,11 @@ class Engine(object):
"""Filter msg for devices according default xAAL API then process the
request for each targets identied in the engine
"""
if msg.is_request():
targets = filter_msg_for_devices(msg, self.devices)
if targets:
self.process_request(msg, targets)
def process_request(self, msg, targets):
"""Processes request by device and add related response
if reply necessary in the Tx fifo
if not msg.is_request():
return
Note: xAAL attributes change are managed separately
"""
targets = filter_msg_for_devices(msg, self.devices)
for target in targets:
if msg.action == 'is_alive':
self.send_alive(target)
......
......@@ -14,7 +14,7 @@ class CallbackError(Exception):
class MessageParserError(Exception):pass
class MessageError(Exception):pass
# addresses.py
# binding.py
class UUIDError(Exception):pass
__all__ = ["DeviceError","EngineError","XAALError","CallbackError","MessageParserError","MessageError"]
__all__ = ["DeviceError","EngineError","XAALError","CallbackError","MessageParserError","MessageError","UUIDError"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment