irrad_control/irrad_interpreter.py
def handle_cmd(self, target, cmd, cmd_data):
        """Handle all commands. After every command a reply must be send."""

        # Handle server commands
        if target == 'interpreter':

            if cmd == 'shutdown':
                self.shutdown()
                self._send_reply(reply=cmd, sender=target, _type='STANDARD')

            elif cmd == 'zero_offset':
                self.zero_offset[cmd_data].set()
                self._send_reply(reply=cmd, sender=target, _type='STANDARD')

            elif cmd == 'record_data':
                if self.stop_write_data[cmd_data].is_set():
                    self.stop_write_data[cmd_data].clear()
                else:
                    self.stop_write_data[cmd_data].set()
                self._send_reply(reply=cmd, sender=target, _type='STANDARD', data=not self.stop_write_data[cmd_data].is_set())

        self._busy_cmd = False
Handle all commands. After every command a reply must be send.
Handle all commands. After every command a reply must be send.
Handle all commands . After every command a reply must be send .
def handle_cmd(self, target, cmd, cmd_data):
        if target == 'interpreter':
            if cmd == 'shutdown':
                self.shutdown()
                self._send_reply(reply=cmd, sender=target, _type='STANDARD')
            elif cmd == 'zero_offset':
                self.zero_offset[cmd_data].set()
                self._send_reply(reply=cmd, sender=target, _type='STANDARD')
            elif cmd == 'record_data':
                if self.stop_write_data[cmd_data].is_set():
                    self.stop_write_data[cmd_data].clear()
                else:
                    self.stop_write_data[cmd_data].set()
                self._send_reply(reply=cmd, sender=target, _type='STANDARD', data=not self.stop_write_data[cmd_data].is_set())
        self._busy_cmd = False
def handle_cmd ( self , target , cmd , cmd_data ) : if target == 'interpreter' : if cmd == 'shutdown' : self . shutdown ( ) self . _send_reply ( reply = cmd , sender = target , _type = 'STANDARD' ) elif cmd == 'zero_offset' : self . zero_offset [ cmd_data ] . set ( ) self . _send_reply ( reply = cmd , sender = target , _type = 'STANDARD' ) elif cmd == 'record_data' : if self . stop_write_data [ cmd_data ] . is_set ( ) : self . stop_write_data [ cmd_data ] . clear ( ) else : self . stop_write_data [ cmd_data ] . set ( ) self . _send_reply ( reply = cmd , sender = target , _type = 'STANDARD' , data = not self . stop_write_data [ cmd_data ] . is_set ( ) ) self . _busy_cmd = False
Handle all commands.
Handle all commands .
"""Handle all commands. After every command a reply must be send.""" # Handle server commands
self
target
cmd
cmd_data