def _create_values(self, raw_values): self.values = [] for label, raw_value in zip(self._value_labels, raw_values): value = self._value_type(label, raw_value=raw_value) self.values.append(value) if len(raw_values) > len(self.values): unimplemented("trailing items ignored") return
def _send_obd_message(self, message, header=None, token=None): """Transmit an OBD message on the bus. message -- the message bytes to transmit header -- the header used to address the message (or None for broadcast) token -- the token required to send a Reset message (if applicable) """ assert self.interface_configured assert self.connected_to_vehicle if header: unimplemented("ELM support for explicitly addressed requests") # Before letting a reset command out to the interface, make sure # it's intentional (raising an exception if not) if message[0] == 0x04: self._verify_token(token) message = " ".join(["%02X" % b for b in message]) self._write("%s\r" % message) self._set_timeout(Interface.OBD_REQUEST_TIMEOUT, 3.0) response = self._read_response() return self._message_bytes_from_ascii(response)
def __init__(self, port, name=None, callback=None): ELM32X.__init__(self, port, name, callback=callback) unimplemented("ELM323 support") return