示例#1
0
 def initServer(self):  # Do initialization here
     reg = self.client.registry
     yield reg.cd(REGISTRY_PATH)
     stepper_motor_names = yield reg.dir()
     stepper_motor_names = stepper_motor_names[0] # just get directories
     self.stepper_motors = {name:None for name in stepper_motor_names}
     for stepper_motor_name in stepper_motor_names:
         yield self.add_stepper_motor(stepper_motor_name)
     yield DeviceServer.initServer(self)
示例#2
0
 def initServer(self):
     reg = self.client.registry
     reg.cd(REGISTRY_PATH)
     channels = self.channels = yield reg.get(CHANNELS)
     for channel in channels:
         self.add_device(
             channel,AnalogOutputDevice(AOTask(channel))
         )
     yield DeviceServer.initServer(self)
 def initServer(self):  # Do initialization here
     self.delay_generators = {}
     reg = self.client.registry
     yield reg.cd(REGISTRY_PATH)
     _, dg_names = yield reg.dir()        
     for name in dg_names:
         dg_id = yield reg.get(name)
         self.add_device(
             name,
             DelayGeneratorDevice(
                 DelayGenerator(dg_id)
             )
         )
     yield DeviceServer.initServer(self)
示例#4
0
 def initServer(self):
     self.add_device('dev 1',TestDevice())
     self.add_device('dev 2',TestDevice())
     DeviceServer.initServer(self)