DoIPClient Connectors

To connect with the udsoncan library, the following connector class is provided. Eventually, this should be merged into the udsoncan library. If there’s demand, a similar adapter could be made for the python-uds library as well.

class doipclient.connectors.DoIPClientUDSConnector(doip_layer, name=None, close_connection=False)

A udsoncan connector which uses an existing DoIPClient as a DoIP transport layer for UDS (instead of ISO-TP).

Parameters:
  • doip_layer (doipclient.DoIPClient) – The DoIP Transport layer object coming from the doipclient package.

  • name (bool) – This name is included in the logger name so that its output can be redirected. The logger name will be Connection[<name>]

  • close_connection – True if the wrapper’s close() function should close the associated DoIP client. This is not the default

close()

Close the connection object

Returns:

None

empty_rxqueue()

Empty all unread data in the reception buffer.

Returns:

None

empty_txqueue()
is_open()

Tells if the connection is open.

Returns:

bool

open()

Set up the connection object.

Returns:

None

specific_send(payload)

The implementation of the send method.

Parameters:

payload (bytes) – Data to send

Returns:

None

specific_wait_frame(timeout=2)

The implementation of the wait_frame method.

Parameters:

timeout (int) – The maximum amount of time to wait before giving up

Returns:

Received data

Return type:

bytes or None