tbox interface

interface for getting data from tbox

source

TBoxCanException

 TBoxCanException (err_code:Optional[int]=0, extra_msg:Optional[str]=None,
                   codes:collections.UserDict=<factory>)

*Base class for all TBox CAN exceptions (Kvaser exceptions).

Args:

err_code (int): error code
extra_msg (str): extra message
codes (UserDict): error code and message mapping*

source

float_to_hex

 float_to_hex (value)

source

hex_to_float

 hex_to_float (value)

source

float_array_to_buffer

 float_array_to_buffer (float_array)

source

parse_arg

 parse_arg ()

source

write_json

 write_json (output_json_path, example_json_path, data)

Test can only be run in the vehicle with real hardware
value = [99.0] * 21 * 17 send_float_array(‘TQD_trqTrqSetECO_MAP_v’, value)


source

send_float_array

 send_float_array (name:str, float_df:pandas.core.frame.DataFrame,
                   sw_diff:bool=False)

*send float array to tbox simulator

the decorator prepend_string_arg is to set the default CAN ID for flashing torque table send_float_array(name, float_array, sw_diff) –> send_float_array(float_array, sw_diff)*

Type Default Details
name str string for the CAN message name
float_df DataFrame the torque table to be flashed onto VBU
sw_diff bool False whether to use diff mode to accelerate flashing
Returns None