Lines Matching refs:data

84 def parse_acl_ha_debug_buffer(data, result):  argument
86 if len(data) < 5:
89 version, data = unpack_data(data, 1)
94 byte_data, data = unpack_data(data, 1)
100 if len(data) < 7:
106 byte_data, data = unpack_data(data, 1)
119 def parse_acl_ha_audio_data(data, result): argument
121 if len(data) < 2:
124 audio_data_b = data[1:]
128 def parse_acl_ha_audio_type(data, result): argument
130 audio_type, data = unpack_data(data, 1)
144 def parse_acl_ha_codec(data, result): argument
146 codec, data = unpack_data(data, 1)
158 parse_acl_ha_audio_type(data, result)
161 def parse_acl_ha_audio_control_cmd(data, result): argument
163 control_cmd, data = unpack_data(data, 1)
168 parse_acl_ha_codec(data, result)
178 def parse_acl_att_long_uuid(data, result): argument
182 if len(data) < 22:
185 data = data[4:]
186 attr_handle, data = unpack_data(data, 2)
189 long_uuid_list.append("{0:02x}".format(struct.unpack(">B", data[p])[0]))
197 def parse_acl_opcode(data, result): argument
200 if len(data) < 1:
202 opcode, data = unpack_data(data, 1)
206 if len(data) < 2:
208 attr_handle, data = unpack_data(data, 2)
211 parse_acl_ha_audio_control_cmd(data, result)
214 parse_acl_att_long_uuid(data, result)
217 def parse_acl_handle(data, result): argument
221 if len(data) < 8:
223 connection_handle, data = unpack_data(data, 2)
226 data = data[2:]
227 pdu, data = unpack_data(data, 2)
228 channel_id, data = unpack_data(data, 2)
235 parse_acl_opcode(data, result)
238 sdu, data = unpack_data(data, 2)
241 parse_acl_ha_audio_data(data, result)
244 parse_acl_ha_debug_buffer(data, result)
252 def parse_hci_evt_peer_address(data, result): argument
257 if len(data) < 6:
260 peer_address_list.append("{0:02x}".format(struct.unpack(">B", data[p])[0]))
264 data = data[6:]
273 def parse_hci_evt_code(data, result): argument
278 if len(data) < 8:
280 hci_evt, data = unpack_data(data, 1)
282 data = data[1:]
283 sub_event, data = unpack_data(data, 1)
284 status, data = unpack_data(data, 1)
285 connection_handle, data = unpack_data(data, 2)
288 data = data[2:]
294 parse_hci_evt_peer_address(data, result)
302 def parse_packet_data(data, result): argument
304 packet_type, data = unpack_data(data, 1)
307 parse_acl_handle(data, result)
310 parse_hci_evt_code(data, result)
345 def dump_audio_data(data): argument
347 file_type = "." + data[CODEC]
349 file_name_list.append(data[PEER_ADDRESS])
350 file_name_list.append(data[TIMESTAMP_STR_FORMAT])
351 file_name_list.append(data[AUDIO_TYPE])
352 file_name_list.append(data[SAMPLE_RATE])
357 if data.has_key(DEBUG_VERSION):
358 file_prefix = "debug_ver_" + data[DEBUG_VERSION] + "-"
362 if data.has_key(DEBUG_VERSION):
363 file_prefix = "debug_ver_" + data[DEBUG_VERSION] + "-"
367 if data.has_key(AUDIO_DATA_B):
369 audio_file.write(data[AUDIO_DATA_B])
377 if data.has_key(DEBUG_DATA):
379 debug_file.write(data[DEBUG_DATA])
480 def unpack_data(data, byte): argument
483 value = struct.unpack(">B", data[0])[0]
485 value = struct.unpack(">H", data[1] + data[0])[0]
488 data = data[byte:]
489 return value, data
530 needed before extracting audio data.",