Lines Matching refs:self

90     def __init_socket_port(self):  argument
102 raise its.error.Error(self.device_id,
123 if forward_info[0] == self.device_id and \
138 (self.adb, p, self.REMOTE_PORT)
150 raise its.error.Error(self.device_id, " cannot find an available " +
157 self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
158 self.sock.connect((self.IPADDR, port))
159 self.sock.settimeout(self.SOCK_TIMEOUT)
163 def __wait_for_service(self): argument
173 _run("%s reboot" % (self.adb));
174 _run("%s wait-for-device" % (self.adb))
179 _run('%s shell am force-stop --user 0 %s' % (self.adb, self.PACKAGE))
181 '-a %s') % (self.adb, self.INTENT_START))
185 self.adb.split() + ["logcat"],
194 def __init__(self): argument
196 self.device_id = get_device_id()
197 self.adb = "adb -s " + self.device_id
199 self.__wait_for_service()
200 self.__init_socket_port()
202 self.__close_camera()
203 self.__open_camera()
205 def __del__(self): argument
206 if hasattr(self, 'sock') and self.sock:
207 self.__close_camera()
208 self.sock.close()
210 def __enter__(self): argument
211 return self
213 def __exit__(self, type, value, traceback): argument
216 def __read_response_from_socket(self): argument
220 ch = self.sock.recv(1)
234 nbytes = self.sock.recv_into(view, n)
240 def __open_camera(self): argument
247 self.sock.send(json.dumps(cmd) + "\n")
248 data,_ = self.__read_response_from_socket()
252 def __close_camera(self): argument
254 self.sock.send(json.dumps(cmd) + "\n")
255 data,_ = self.__read_response_from_socket()
259 def do_vibrate(self, pattern): argument
277 self.sock.send(json.dumps(cmd) + "\n")
278 data,_ = self.__read_response_from_socket()
282 def start_sensor_events(self): argument
292 self.sock.send(json.dumps(cmd) + "\n")
293 data,_ = self.__read_response_from_socket()
297 def get_sensor_events(self): argument
320 self.sock.send(json.dumps(cmd) + "\n")
321 data,_ = self.__read_response_from_socket()
326 def get_camera_ids(self): argument
334 self.sock.send(json.dumps(cmd) + "\n")
335 data,_ = self.__read_response_from_socket()
340 def get_camera_properties(self): argument
348 self.sock.send(json.dumps(cmd) + "\n")
349 data,_ = self.__read_response_from_socket()
354 def do_3a(self, regions_ae=[[0,0,1,1,1]], argument
410 self.sock.send(json.dumps(cmd) + "\n")
420 data,_ = self.__read_response_from_socket()
442 def do_capture(self, cap_request, out_surfaces=None, reprocess_format=None): argument
592 extended_timeout = longest_exp_time / self.SEC_TO_NSEC + \
593 self.SOCK_TIMEOUT
594 self.sock.settimeout(extended_timeout)
599 self.sock.send(json.dumps(cmd) + "\n")
611 jsonObj,buf = self.__read_response_from_socket()
637 self.sock.settimeout(self.SOCK_TIMEOUT)