def _parse_sensor_record(self, sensor_data_rec, sensor_info, rem_values):
val_idx = <NUM_LIT:0><EOL>assert len(sensor_data_rec.field) == <NUM_LIT:1><EOL>sensor_data_array = sensor_data_rec.field[<NUM_LIT:0>].content<EOL>count = None<EOL>count_text = sensor_data_array.elementCount.text<EOL>if count_text:<EOL><INDENT>count = int(count_text.strip())<EOL><DEDENT>if not count:<EOL><INDENT>count = int(rem_values[val_idx])<EOL>val_idx += <NUM_LIT:1><EOL><DEDENT>parsed = []<EOL>for recnum in range(count):<EOL><INDENT>cur = []<EOL>for f in sensor_data_array.elementType.field:<EOL><INDENT>cur_val = rem_values[val_idx]<EOL>val_idx += <NUM_LIT:1><EOL>m = Member(name=f.name, standard=f.content.definition)<EOL>if hasattr(f.content, "<STR_LIT>"):<EOL><INDENT>m["<STR_LIT>"] = f.content.uom<EOL><DEDENT>try:<EOL><INDENT>m["<STR_LIT:value>"] = float(cur_val)<EOL><DEDENT>except ValueError:<EOL><INDENT>m["<STR_LIT:value>"] = cur_val<EOL><DEDENT>if len(f.quality):<EOL><INDENT>m["<STR_LIT>"] = []<EOL>for qual in f.quality:<EOL><INDENT>cur_qual = rem_values[val_idx]<EOL>val_idx += <NUM_LIT:1><EOL>m["<STR_LIT>"].append(cur_qual)<EOL><DEDENT><DEDENT>cur.append(m)<EOL><DEDENT>parsed.append(cur)<EOL><DEDENT>return parsed, val_idx<EOL>
Parses values via sensor data record passed in.
Returns parsed values AND how many items it consumed out of rem_values.