Esempio n. 1
0
    def __init__(self, application, addr):
        ServiceProtocol.__init__(self)
        for k, v in FUNC_REGISTRY.items():
            self.register_service(k, make_wrapper(*v))

        self._application = application
        man = None
        if application:
            man = application.get_service(EL_PROTOCOL)

        self._manager = man
        self._addr = addr
        services = (('GetData', '_get_data'),
                    ('Read', '_read'),
                    ('Set', '_set'),
                    ('Open', '_open'),
                    ('Close', '_close'),
                    ('GetValveState', '_get_valve_state'),
                    ('GetStateChecksum', '_get_state_checksum'),
                    ('GetValveStates', '_get_valve_states'),
                    ('GetValveLockStates', '_get_valve_lock_states'),
                    ('GetValveLockState', '_get_valve_lock_state'),
                    ('GetValveOwners', '_get_valve_owners'),
                    ('GetPressure', '_get_pressure'))

        self._register_services(services)
Esempio n. 2
0
    def __init__(self, manager, addr):
        self._manager = manager
        self._addr = addr
        ServiceProtocol.__init__(self)

        misc_services = (('GetLabTemperature',
                          self._manager.get_lab_temperature),
                         ('GetLabHumidity', self._manager.get_lab_humidity),
                         ('SetFrameRate', self._manager.set_frame_rate),
                         ('GetVersion', self._manager.get_version),
                         ('GetDIState', self._manager.get_di_state))

        controller_services = (('GetTemperature',
                                self._manager.get_temperature),
                               ('GetSetpoint', self._manager.get_setpoint),
                               ('SetSetpoint', self._manager.set_setpoint),
                               ('GetProcessValue',
                                self._manager.get_process_value),
                               ('GetPercentOutput',
                                self._manager.get_percent_output),
                               ('GetFurnaceSummary',
                                self._manager.get_furnace_summary),
                               ('SetPID', self._manager.set_pid))

        valve_services = (('Open', self._manager.open_switch),
                          ('Close', self._manager.close_switch),
                          ('GetChannelState', self._manager.get_channel_state),
                          ('GetChannelDOState',
                           self._manager.get_channel_do_state),
                          ('GetIndicatorState',
                           self._manager.get_indicator_state),
                          ('GetChannelState', self._manager.get_channel_state))

        dump_services = (('LowerFunnel', self._manager.lower_funnel),
                         ('RaiseFunnel', self._manager.raise_funnel),
                         ('InUpPosition', self._manager.is_funnel_up),
                         ('InDownPosition', self._manager.is_funnel_down),
                         ('EnergizeMagnets', self._manager.energize_magnets),
                         ('IsEnergized', self._manager.is_energized),
                         ('DenergizeMagnets', self._manager.denergize_magnets),
                         ('MoveAbsolute', self._manager.move_absolute),
                         ('MoveRelative', self._manager.move_relative),
                         ('GetPosition', self._manager.get_position),
                         ('Slew', self._manager.slew), ('Stalled',
                                                        self._manager.stalled),
                         ('SetHome',
                          self._manager.set_home), ('StopDrive',
                                                    self._manager.stop_drive),
                         ('Moving',
                          self._manager.moving), ('StartJitter',
                                                  self._manager.start_jitter),
                         ('StopJitter', self._manager.stop_jitter))

        self._register_services(misc_services)
        self._register_services(controller_services)
        self._register_services(valve_services)
        self._register_services(dump_services)
Esempio n. 3
0
    def __init__(self, manager, addr):
        self._manager = manager
        self._addr = addr
        ServiceProtocol.__init__(self)

        misc_services = (('GetLabTemperature', manager.get_lab_temperature),
                         ('GetLabHumidity', manager.get_lab_humidity),
                         ('SetFrameRate', manager.set_frame_rate),
                         ('GetVersion', manager.get_version),
                         ('GetDIState', manager.get_di_state),
                         ('GetHeartBeat', manager.get_heartbeat),
                         ('GetFullSummary', manager.get_full_summary))

        controller_services = (('GetTemperature', manager.get_temperature),
                               ('GetSetpoint', manager.get_setpoint),
                               ('SetSetpoint', manager.set_setpoint),
                               ('GetProcessValue', manager.get_temperature),
                               ('GetPercentOutput', manager.get_percent_output),
                               ('GetFurnaceSummary', manager.get_furnace_summary),
                               ('SetPID', manager.set_pid))

        valve_services = (('Open', manager.open_switch),
                          ('Close', manager.close_switch),
                          ('GetIndicatorState', manager.get_indicator_state),
                          # ('GetChannelDOState', manager.get_channel_do_state),
                          ('GetChannelState', manager.get_channel_state),
                          ('GetIndicatorComponentStates', manager.get_indicator_component_states))

        dump_services = (('LowerFunnel', manager.lower_funnel),
                         ('RaiseFunnel', manager.raise_funnel),
                         ('InUpPosition', manager.is_funnel_up),
                         ('InDownPosition', manager.is_funnel_down),
                         ('EnergizeMagnets', manager.energize_magnets),
                         ('IsEnergized', manager.is_energized),
                         ('RotaryDumperMoving', manager.rotary_dumper_moving),
                         ('DenergizeMagnets', manager.denergize_magnets),
                         ('MoveAbsolute', manager.move_absolute),
                         ('MoveRelative', manager.move_relative),
                         ('GetPosition', manager.get_position),
                         ('Slew', manager.slew),
                         ('Stalled', manager.stalled),
                         ('SetHome', manager.set_home),
                         ('StopDrive', manager.stop_drive),
                         ('Moving', manager.moving),
                         ('StartJitter', manager.start_jitter),
                         ('StopJitter', manager.stop_jitter))

        bakeout_services = (('GetBakeoutSetpoint', manager.get_bakeout_setpoint),
                            ('SetBakeoutControlMode', manager.set_bakeout_control_mode),
                            ('GetBakeoutTemperature', manager.get_bakeout_temperature),
                            ('SetBakeoutClosedLoopSetpoint', manager.set_bakeout_setpoint),
                            ('GetBakeoutTempPower', manager.get_bakeout_temp_and_power))

        gauge_services = (('GetPressure', manager.get_gauge_pressure),)
        for s in (misc_services, controller_services, valve_services, dump_services,
                  bakeout_services, gauge_services):
            self._register_services(s)
Esempio n. 4
0
    def __init__(self, manager, addr):
        self._manager = manager
        self._addr = addr
        ServiceProtocol.__init__(self)

        misc_services = (('GetLabTemperature', self._manager.get_lab_temperature),
                         ('GetLabHumidity', self._manager.get_lab_humidity),
                         ('SetFrameRate', self._manager.set_frame_rate),
                         ('GetVersion', self._manager.get_version),
                         ('GetDIState', self._manager.get_di_state))

        controller_services = (('GetTemperature', self._manager.get_temperature),
                               ('GetSetpoint', self._manager.get_setpoint),
                               ('SetSetpoint', self._manager.set_setpoint),
                               ('GetProcessValue', self._manager.get_process_value),
                               ('GetPercentOutput', self._manager.get_percent_output),
                               ('GetFurnaceSummary', self._manager.get_furnace_summary),
                               ('SetPID', self._manager.set_pid))

        valve_services = (('Open', self._manager.open_switch),
                          ('Close', self._manager.close_switch),
                          ('GetChannelState', self._manager.get_channel_state),
                          ('GetChannelDOState', self._manager.get_channel_do_state),
                          ('GetIndicatorState', self._manager.get_indicator_state),
                          ('GetChannelState', self._manager.get_channel_state))

        dump_services = (('LowerFunnel', self._manager.lower_funnel),
                         ('RaiseFunnel', self._manager.raise_funnel),
                         ('InUpPosition', self._manager.is_funnel_up),
                         ('InDownPosition', self._manager.is_funnel_down),
                         ('EnergizeMagnets', self._manager.energize_magnets),
                         ('IsEnergized', self._manager.is_energized),
                         ('DenergizeMagnets', self._manager.denergize_magnets),
                         ('MoveAbsolute', self._manager.move_absolute),
                         ('MoveRelative', self._manager.move_relative),
                         ('GetPosition', self._manager.get_position),
                         ('Slew', self._manager.slew),
                         ('Stalled', self._manager.stalled),
                         ('SetHome', self._manager.set_home),
                         ('StopDrive', self._manager.stop_drive),
                         ('Moving', self._manager.moving),
                         ('StartJitter', self._manager.start_jitter),
                         ('StopJitter', self._manager.stop_jitter))

        self._register_services(misc_services)
        self._register_services(controller_services)
        self._register_services(valve_services)
        self._register_services(dump_services)
Esempio n. 5
0
    def __init__(self, application, addr, logger):
        ServiceProtocol.__init__(self, logger=logger)

        self._application = application
        man = None
        if application:
            if self.manager_protocol is None:
                raise NotImplementedError

            man = application.get_service(self.manager_protocol)

        self._manager = man
        self._addr = addr

        self._register_base_services()
        self._init_hook()
Esempio n. 6
0
    def __init__(self, application, addr):
        ServiceProtocol.__init__(self)

        self._application = application
        man = None
        if application:
            if self.manager_protocol is None:
                raise NotImplementedError

            man = application.get_service(self.manager_protocol)

        self._manager = man
        self._addr = addr

        self._register_base_services()
        self._init_hook()
Esempio n. 7
0
    def __init__(self, application, name, addr, logger):
        ServiceProtocol.__init__(self, logger=logger)
        # self._application = application
        man = application.get_service(ILaserManager, 'name=="{}"'.format(name))
        self._manager = man
        self._addr = addr

        services = (
            ('GetError', '_get_error'),
            # ('MachineVisionDegas', '_machine_vision_degas'),
            ('StartVideoRecording', '_start_video_recording'),
            ('StopVideoRecording', '_stop_video_recording'),
            ('ReadLaserPower', '_read_laser_power'),
            ('GetLaserStatus', '_get_laser_status'),
            ('Snapshot', '_snapshot'),
            ('PrepareLaser', '_prepare_laser'),
            ('LaserReady', '_laser_ready'),
            ('Enable', '_enable'),
            ('Disable', '_disable'),
            ('SetXY', '_set_x_y'),
            ('SetX', '_set_x'),
            ('SetY', '_set_y'),
            ('SetZ', '_set_z'),
            ('GetPosition', '_get_position'),
            ('GetAutoCorrecting', '_get_auto_correcting'),
            ('GetDriveMoving', '_get_drive_moving'),
            ('GetXMoving', '_get_x_moving'),
            ('GetYMoving', '_get_y_moving'),
            ('GetZMoving', '_get_z_moving'),
            ('StopDrive', '_stop_drive'),
            ('SetDriveHome', '_set_drive_home'),
            ('SetHomeX', '_set_home_x'),
            ('SetHomeY', '_set_home_y'),
            ('SetHomeZ', '_set_home_z'),
            ('GoToHole', '_go_to_hole'),
            ('DoPattern', '_do_pattern'),
            ('IsPatterning', '_is_patterning'),
            ('AbortPattern', '_abort_pattern'),
            ('DoJog', '_do_pattern'),
            ('IsJogging', '_is_patterning'),
            ('AbortJog', '_abort_pattern'),
            ('GetJogProcedures', '_get_pattern_names'),
            ('GetPatternNames', '_get_pattern_names'),
            ('SetBeamDiameter', '_set_beam_diameter'),
            ('GetBeamDiameter', '_get_beam_diameter'),
            ('SetZoom', '_set_zoom'),
            ('GetZoom', '_get_zoom'),
            ('SetMotorLock', '_set_motor_lock'),
            ('SetMotor', '_set_motor'),
            ('GetMotorMoving', '_get_motor_moving'),
            ('SetSampleHolder', '_set_sample_holder'),
            ('GetSampleHolder', '_get_sample_holder'),
            ('StartMeasureGrainPolygon', '_start_measure_grain_polygon'),
            ('StopMeasureGrainPolygon', '_stop_measure_grain_polygon'),
            ('GetGrainPolygonBlob', '_get_grain_polygon_blob'),
            ('AcquireGrainPolygonBlob', '_get_grain_polygon'),
            ('SetLaserPower', '_set_laser_power'),
            ('SetLaserOutput', '_set_laser_output'),
            ('GetAchievedOutput', '_get_achieved_output'),
            ('GetResponseBlob', '_get_response_blob'),
            ('GetOutputBlob', '_get_output_blob'),
            ('GetPyrometerTemperature', '_get_pyrometer_temperature'),
            ('GoToNamedPosition', '_go_to_named_position'),
            ('GoToPoint', '_go_to_point'),
            # ('TracePath', '_trace_path'),
            ('IsTracing', '_is_tracing'),
            ('StopTrace', '_stop_trace'),
            ('Prepare', '_prepare'),
            ('IsReady', '_is_ready'),
            ('SetLight', '_set_light'))
        self._register_services(services)
Esempio n. 8
0
    def __init__(self, manager, addr):
        self._manager = manager
        self._addr = addr
        ServiceProtocol.__init__(self)

        misc_services = (('GetLabTemperature', manager.get_lab_temperature),
                         ('GetLabHumidity', manager.get_lab_humidity),
                         ('SetFrameRate', manager.set_frame_rate),
                         ('GetVersion', manager.get_version),
                         ('GetDIState', manager.get_di_state),
                         ('GetHeartBeat',
                          manager.get_heartbeat), ('GetFullSummary',
                                                   manager.get_full_summary))

        controller_services = (('GetTemperature', manager.get_temperature),
                               ('GetSetpoint',
                                manager.get_setpoint), ('SetSetpoint',
                                                        manager.set_setpoint),
                               ('GetProcessValue', manager.get_temperature),
                               ('GetPercentOutput',
                                manager.get_percent_output),
                               ('GetFurnaceSummary',
                                manager.get_furnace_summary),
                               ('SetPID', manager.set_pid))

        valve_services = (
            ('Open', manager.open_switch),
            ('Close', manager.close_switch),
            ('GetIndicatorState', manager.get_indicator_state),
            # ('GetChannelDOState', manager.get_channel_do_state),
            ('GetChannelState', manager.get_channel_state),
            ('GetIndicatorComponentStates',
             manager.get_indicator_component_states))

        dump_services = (('LowerFunnel',
                          manager.lower_funnel), ('RaiseFunnel',
                                                  manager.raise_funnel),
                         ('InUpPosition',
                          manager.is_funnel_up), ('InDownPosition',
                                                  manager.is_funnel_down),
                         ('EnergizeMagnets',
                          manager.energize_magnets), ('IsEnergized',
                                                      manager.is_energized),
                         ('RotaryDumperMoving', manager.rotary_dumper_moving),
                         ('DenergizeMagnets',
                          manager.denergize_magnets), ('MoveAbsolute',
                                                       manager.move_absolute),
                         ('MoveRelative',
                          manager.move_relative), ('GetPosition',
                                                   manager.get_position),
                         ('Slew', manager.slew), ('Stalled', manager.stalled),
                         ('SetHome', manager.set_home), ('StopDrive',
                                                         manager.stop_drive),
                         ('Moving', manager.moving), ('StartJitter',
                                                      manager.start_jitter),
                         ('StopJitter', manager.stop_jitter))

        bakeout_services = (('GetBakeoutSetpoint',
                             manager.get_bakeout_setpoint),
                            ('SetBakeoutControlMode',
                             manager.set_bakeout_control_mode),
                            ('GetBakeoutTemperature',
                             manager.get_bakeout_temperature),
                            ('SetBakeoutClosedLoopSetpoint',
                             manager.set_bakeout_setpoint),
                            ('GetBakeoutTempPower',
                             manager.get_bakeout_temp_and_power))

        gauge_services = (('GetPressure', manager.get_gauge_pressure), )
        for s in (misc_services, controller_services, valve_services,
                  dump_services, bakeout_services, gauge_services):
            self._register_services(s)
Esempio n. 9
0
    def __init__(self, application, name, addr):
        ServiceProtocol.__init__(self)
        # self._application = application
        man = application.get_service(ILaserManager, 'name=="{}"'.format(name))
        self._manager = man
        self._addr = addr

        services = (('GetError', '_get_error'),
                    ('MachineVisionDegas', '_machine_vision_degas'),
                    ('StartVideoRecording', '_start_video_recording'),
                    ('StopVideoRecording', '_stop_video_recording'),
                    ('ReadLaserPower', '_read_laser_power'),
                    ('GetLaserStatus', '_get_laser_status'),
                    ('Snapshot', '_snapshot'),
                    ('PrepareLaser', '_prepare_laser'),
                    ('LaserReady', '_laser_ready'),
                    ('Enable', '_enable'),
                    ('Disable', '_disable'),
                    ('SetXY', '_set_x_y'),
                    ('SetX', '_set_x'),
                    ('SetY', '_set_y'),
                    ('SetZ', '_set_z'),
                    ('GetPosition', '_get_position'),
                    ('GetAutoCorrecting', '_get_auto_correcting'),
                    ('GetDriveMoving', '_get_drive_moving'),
                    ('GetXMoving', '_get_x_moving'),
                    ('GetYMoving', '_get_y_moving'),
                    ('GetZMoving', '_get_z_moving'),
                    ('StopDrive', '_stop_drive'),
                    ('SetDriveHome', '_set_drive_home'),
                    ('SetHomeX', '_set_home_x'),
                    ('SetHomeY', '_set_home_y'),
                    ('SetHomeZ', '_set_home_z'),
                    ('GoToHole', '_go_to_hole'),
                    ('DoPattern', '_do_pattern'),
                    ('IsPatterning', '_is_patterning'),
                    ('AbortPattern', '_abort_pattern'),
                    ('DoJog', '_do_pattern'),
                    ('IsJogging', '_is_patterning'),
                    ('AbortJog', '_abort_pattern'),
                    ('GetJogProcedures', '_get_pattern_names'),
                    ('GetPatternNames', '_get_pattern_names'),
                    ('SetBeamDiameter', '_set_beam_diameter'),
                    ('GetBeamDiameter', '_get_beam_diameter'),
                    ('SetZoom', '_set_zoom'),
                    ('GetZoom', '_get_zoom'),
                    ('SetMotorLock', '_set_motor_lock'),
                    ('SetMotor', '_set_motor'),
                    ('GetMotorMoving', '_get_motor_moving'),
                    ('SetSampleHolder', '_set_sample_holder'),
                    ('GetSampleHolder', '_get_sample_holder'),
                    ('SetLaserPower', '_set_laser_power'),
                    ('SetLaserOutput', '_set_laser_output'),
                    ('GetAchievedOutput', '_get_achieved_output'),
                    ('GetResponseBlob', '_get_response_blob'),
                    ('GetOutputBlob', '_get_output_blob'),
                    ('GoToNamedPosition', '_go_to_named_position'),
                    ('GoToPoint', '_go_to_point'),
                    # ('TracePath', '_trace_path'),
                    ('IsTracing', '_is_tracing'),
                    ('StopTrace', '_stop_trace'),
                    ('Prepare', '_prepare'),
                    ('IsReady', '_is_ready'),
                    ('SetLight', '_set_light'))
        self._register_services(services)