Beispiel #1
0
 def __init__(self, tmpfile_ext):
     Target.__init__(self)
     self._suffix = '{:0>12d}'.format(random.randint(2**16, 2**32))
     self._feedback = FeedbackCollector()
     self._target_ip = None
     self._target_port = None
     self._printer_name = None
     self._cpt = None
     self.set_tmp_file_extension(tmpfile_ext)
Beispiel #2
0
 def __init__(self, tmpfile_ext, target_path=None):
     Target.__init__(self)
     self.__suffix = '{:0>12d}'.format(random.randint(2**16, 2**32))
     self.__app = None
     self.__pre_args = None
     self.__post_args = None
     self._data_sent = None
     self._feedback_computed = None
     self.__feedback = TargetFeedback()
     self.set_target_path(target_path)
     self.set_tmp_file_extension(tmpfile_ext)
Beispiel #3
0
 def __init__(self,
              serial_port,
              baudrate,
              pin_code,
              targeted_tel_num,
              codec='latin_1'):
     Target.__init__(self)
     self.serial_port = serial_port
     self.baudrate = baudrate
     self.tel_num = targeted_tel_num
     self.pin_code = pin_code
     self.codec = codec
     if sys.version_info[0] > 2:
         self.pin_code = bytes(self.pin_code, self.codec)
     self.set_feedback_timeout(2)
Beispiel #4
0
 def __init__(self,
              target_path=None,
              pre_args='',
              post_args='',
              tmpfile_ext='.bin',
              send_via_stdin=False,
              send_via_cmdline=False):
     Target.__init__(self)
     self._suffix = '{:0>12d}'.format(random.randint(2**16, 2**32))
     self._app = None
     self._pre_args = pre_args
     self._post_args = post_args
     self._send_via_stdin = send_via_stdin
     self._send_via_cmdline = send_via_cmdline
     self._data_sent = None
     self._feedback_computed = None
     self._feedback = FeedbackCollector()
     self.set_target_path(target_path)
     self.set_tmp_file_extension(tmpfile_ext)
Beispiel #5
0
 def __init__(self, recover_ratio=100):
     Target.__init__(self)
     self._cpt = None
     self._recover_ratio = recover_ratio