Changeset 35
- Timestamp:
- 09/22/07 18:04:43 (1 year ago)
- Files:
-
- fizzjik/fizzjik/hub.py (modified) (3 diffs)
- fizzjik/fizzjik/patch.py (added)
- fizzjik/test.mac.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
fizzjik/fizzjik/hub.py
r25 r35 5 5 6 6 from fizzjik.interfaces import IInput, IOutput, IController, IObserver 7 from fizzjik.interfaces import IConfigurable 7 from fizzjik.interfaces import IConfigurable, implements 8 8 from fizzjik.event import ServiceStartEvent, ServiceStopEvent 9 9 … … 60 60 61 61 62 63 62 def _addInput(self, input): 64 63 pass … … 80 79 81 80 81 82 class ConfigurableHub(Hub): 83 implements(IConfigurable) 84 def receiveConfig(self, config): 85 self.config = config 86 for svc in self.services: 87 if IConfigurable.implementedBy(svc.__class__): 88 self._sendConfiguration(svc) fizzjik/test.mac.py
r33 r35 25 25 from fizzjik.controller.network import DHClientController 26 26 27 from fizzjik.patch import InputPatch 28 27 29 application = service.Application('easyident') 28 30 … … 33 35 bluey.setServiceParent(hub) 34 36 37 38 from fizzjik.event import Event 39 def _tagAddedToNo(evt): 40 if evt.__class__.__name__ == "TagAddedEvent": 41 return Event("blaaaa") 42 else: 43 return evt 44 45 patch_0 = Patch(_tagAddedToNo) 46 patch_0.setServiceParent(hub) 47 35 48 sonmicro_0 = SonMicroMifareSensor() 36 sonmicro_0.setServiceParent(hub) 37 sonmicro_1 = SonMicroMifareSensor() 38 sonmicro_1.setServiceParent(hub) 49 sonmicro_0.setServiceParent(patch_0) 50 #sonmicro_0.setServiceParent(hub) 51 52 53 #sonmicro_1 = SonMicroMifareSensor() 54 #sonmicro_1.setServiceParent(hub) 39 55 #easyident = EasyIdentSensor() 40 56 #easyident.setServiceParent(hub)
