コード例 #1
0
ファイル: sid09.py プロジェクト: Bassicaly/Python-OBD-Scanner
 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
コード例 #2
0
 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
コード例 #3
0
ファイル: elm.py プロジェクト: Bassicaly/Python-OBD-Scanner
    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)
コード例 #4
0
    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)
コード例 #5
0
ファイル: elm.py プロジェクト: Bassicaly/Python-OBD-Scanner
 def __init__(self, port, name=None, callback=None):
     ELM32X.__init__(self, port, name, callback=callback)
     unimplemented("ELM323 support")
     return
コード例 #6
0
 def __init__(self, port, name=None, callback=None):
     ELM32X.__init__(self, port, name, callback=callback)
     unimplemented("ELM323 support")
     return