Changeset 35

Show
Ignore:
Timestamp:
09/22/07 18:04:43 (1 year ago)
Author:
devja..@anarkystic.com
Message:

patch mo fo

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • fizzjik/fizzjik/hub.py

    r25 r35  
    55 
    66from fizzjik.interfaces import IInput, IOutput, IController, IObserver 
    7 from fizzjik.interfaces import IConfigurable 
     7from fizzjik.interfaces import IConfigurable, implements 
    88from fizzjik.event import ServiceStartEvent, ServiceStopEvent 
    99 
     
    6060 
    6161 
    62  
    6362    def _addInput(self, input): 
    6463        pass 
     
    8079 
    8180 
     81 
     82class 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  
    2525from fizzjik.controller.network import DHClientController 
    2626 
     27from fizzjik.patch import InputPatch 
     28 
    2729application = service.Application('easyident') 
    2830 
     
    3335bluey.setServiceParent(hub) 
    3436 
     37 
     38from fizzjik.event import Event 
     39def _tagAddedToNo(evt): 
     40    if evt.__class__.__name__ == "TagAddedEvent": 
     41        return Event("blaaaa") 
     42    else: 
     43        return evt 
     44 
     45patch_0 = Patch(_tagAddedToNo) 
     46patch_0.setServiceParent(hub) 
     47 
    3548sonmicro_0 = SonMicroMifareSensor() 
    36 sonmicro_0.setServiceParent(hub) 
    37 sonmicro_1 = SonMicroMifareSensor() 
    38 sonmicro_1.setServiceParent(hub) 
     49sonmicro_0.setServiceParent(patch_0) 
     50#sonmicro_0.setServiceParent(hub) 
     51 
     52 
     53#sonmicro_1 = SonMicroMifareSensor() 
     54#sonmicro_1.setServiceParent(hub) 
    3955#easyident = EasyIdentSensor() 
    4056#easyident.setServiceParent(hub)