Ejemplo 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)
Ejemplo n.º 2
0
    def _init_hook(self):
        for k, v in FUNC_REGISTRY.items():
            self.register_service(k, make_wrapper(*v))

        services = (('GetData', '_get_data'), ('Read', '_read'),
                    ('Set', '_set'), ('GetPressure', '_get_pressure'))

        self._register_services(services)
Ejemplo n.º 3
0
    def _init_hook(self):
        for k, v in FUNC_REGISTRY.items():
            self.register_service(k, make_wrapper(*v))

        services = (('GetData', '_get_data'),
                    ('Read', '_read'),
                    ('Set', '_set'),
                    ('GetPressure', '_get_pressure'))

        self._register_services(services)