5.3.1.7.2.2.1. cli.cmd_etl.etl.can_decode.CANDecode
- class cli.cmd_etl.etl.can_decode.CANDecode(dbc: Database, timestamp_pos: int, id_pos: int, data_pos: int, output: Path)
Bases:
objectClass to decode CAN messages
- Parameters:
dbc – Path to the .dbc file
timestamp_pos – Position of the timestamp in a CAN message
id_pos – Position of the CAN id in a CAN message
data_pos – Position of the data in a CAN message
output – Path to the output directory
- decode_msg(msg: str) tuple[str, str] | tuple[None, None]
Decode the passed CAN messages.
- Parameters:
msg – CAN message as string
- Returns:
Either a tuple with the message name and the decoded message or in case of an exception an empty tuple