From d85a2a09d4e88ac24f9302f04187c7ab54ec98d4 Mon Sep 17 00:00:00 2001 From: Kiran Jojare Date: Fri, 19 Jul 2024 01:38:46 -0600 Subject: [PATCH] Remove specified files and folders from Git tracking but keep them locally --- test/data/test.dbc | 101 ----------------- test/data/test_log.txt | 91 ---------------- test/test_dbc_parsing.py | 33 ------ test/test_log_parsing.py | 95 ---------------- test/test_signal_plotting.py | 205 ----------------------------------- 5 files changed, 525 deletions(-) delete mode 100644 test/data/test.dbc delete mode 100644 test/data/test_log.txt delete mode 100644 test/test_dbc_parsing.py delete mode 100644 test/test_log_parsing.py delete mode 100644 test/test_signal_plotting.py diff --git a/test/data/test.dbc b/test/data/test.dbc deleted file mode 100644 index 0de8e9b..0000000 --- a/test/data/test.dbc +++ /dev/null @@ -1,101 +0,0 @@ -VERSION "" - - -NS_ : - NS_DESC_ - CM_ - BA_DEF_ - BA_ - VAL_ - CAT_DEF_ - CAT_ - FILTER - BA_DEF_DEF_ - EV_DATA_ - ENVVAR_DATA_ - SGTYPE_ - SGTYPE_VAL_ - BA_DEF_SGTYPE_ - BA_SGTYPE_ - SIG_TYPE_REF_ - VAL_TABLE_ - SIG_GROUP_ - SIG_VALTYPE_ - SIGTYPE_VALTYPE_ - BO_TX_BU_ - BA_DEF_REL_ - BA_REL_ - BA_DEF_DEF_REL_ - BU_SG_REL_ - BU_EV_REL_ - BU_BO_REL_ - SG_MUL_VAL_ - -BS_: - -BU_: Node1 Node2 Node3 - - -BO_ 100 AccelerationCommandTest: 8 Node1 - SG_ ACC_AccelerationTest : 0|1@1+ (1,0) [0|1] "Bool" Node1,Node2 - SG_ ACC_CurrentTest : 1|1@1+ (1,0) [0|1] "Bool" Node2,Node1 - SG_ ACC_SurgeTest : 16|16@1+ (1,0) [0|32767] "RPM" Node1,Node2 - SG_ ACC_AccelTest : 32|16@1+ (1,0) [0|32767] "RPM/sec" Node1,Node2 - SG_ ACC_MaxCurrentTest : 48|8@1+ (5,0) [0|1275] "Amp" Node1,Node2 - -BO_ 101 FeedbackTest: 8 Node2 - SG_ FB_SafetyModeTest : 0|1@1+ (1,0) [0|1] "Enum" Node1,Node2 - SG_ FB_TorqueTest : 1|15@1+ (0.2,-3212.8) [-3212.8|3212.8] "Nm" Node2,Node1 - SG_ FB_VoltageTest : 16|16@1+ (0.1,-3212.8) [-3212.8|3212.8] "Volts" Node2,Node1 - SG_ FB_CurrentTest : 32|16@1+ (0.1,-3212.8) [-3212.8|3212.8] "Amps" Node2,Node1 - SG_ FB_SpeedTest : 48|16@1+ (0.5,-16064) [-16064|16064] "rpm" Node2,Node1 - -BO_ 102 SafetyFeedbackTest: 8 Node3 - SG_ SAF_SafetyModeTest : 0|1@1+ (1,0) [0|1] "Enum" Node1,Node3 - SG_ SAF_TorqueTest : 1|12@1+ (1,-2048) [-2048|2047] "Nm" Node1,Node3 - SG_ SAF_VoltageTest : 13|12@1+ (1,0) [0|4095] "Volts" Node1,Node3 - SG_ SAF_CurrentTest : 25|12@1+ (1,-2048) [-2048|2047] "Amps" Node1,Node3 - SG_ SAF_SpeedTest : 37|15@1+ (1,-16384) [-16384|16383] "rpm" Node1,Node3 - -BO_ 103 CommandTest: 8 Node1 - SG_ CMD_ControlModeTest : 0|4@1+ (1,0) [0|6] "Enum" Node2,Node1,Node3 - SG_ CMD_CommandCounterTest : 4|4@1+ (1,0) [0|15] "Integer" Node2,Node1,Node3 - SG_ CMD_ActiveDischargeTest : 8|1@1+ (1,0) [0|1] "Bool" Node3,Node2 - SG_ CMD_UseRawSpeedTest : 10|1@1+ (1,0) [0|1] "Bool" Node1,Node2,Node3 - SG_ CMD_DirOfRotationTest : 11|1@1+ (1,0) [0|1] "Enum" Node1,Node2,Node3 - -BO_ 104 StatusTest: 8 Node2 - SG_ STS_NotEnabledTest : 0|1@1+ (1,0) [0|1] "Bool" Node2,Node1 - SG_ STS_OverCurrentTest : 1|1@1+ (1,0) [0|1] "Bool" Node2,Node1 - SG_ STS_OverBusTest : 2|1@1+ (1,0) [0|1] "Bool" Node2,Node1 - SG_ STS_OverPhaseTest : 3|1@1+ (1,0) [0|1] "Bool" Node2,Node1 - SG_ STS_UnderVoltageTest : 4|1@1+ (1,0) [0|1] "Bool" Node2,Node1 - -CM_ "Test CAN database definition."; -CM_ BU_ Node1 "Test Node 1"; -CM_ BU_ Node2 "Test Node 2"; -CM_ BU_ Node3 "Test Node 3"; -CM_ BO_ 100 "Test command message for acceleration limits."; -CM_ SG_ 100 ACC_AccelerationTest "Test signal for updating acceleration limits."; -CM_ SG_ 100 ACC_CurrentTest "Test signal for updating current limits."; -CM_ SG_ 100 ACC_SurgeTest "Test signal for controlling surges in acceleration."; -CM_ SG_ 100 ACC_AccelTest "Test signal for maximum rate of acceleration."; -CM_ SG_ 100 ACC_MaxCurrentTest "Test signal for maximum current in drive mode."; - -BA_DEF_ SG_ "GenSigSendType" ENUM "Cyclic","OnWrite","OnWriteWithRepetition","OnChange","OnChangeWithRepetition","IfActive","IfActiveWithRepetition","NoSigSendType","NotUsed"; -BA_DEF_ SG_ "GenSigCycleTime" INT 0 0; -BA_DEF_ BO_ "GenMsgSendType" ENUM "Cyclic","OnWrite","OnWriteWithRepetition","OnChange","OnChangeWithRepetition","IfActive","IfActiveWithRepetition","NoMsgSendType","NotUsed"; -BA_DEF_ BO_ "GenMsgCycleTime" INT 0 0; -BA_DEF_ "BusType" STRING ; -BA_DEF_DEF_ "GenSigSendType" "Cyclic"; -BA_DEF_DEF_ "GenSigCycleTime" 0; -BA_DEF_DEF_ "GenMsgSendType" "Cyclic"; -BA_DEF_DEF_ "GenMsgCycleTime" 0; -BA_DEF_DEF_ "BusType" ""; -BA_ "BusType" "CAN"; -BA_ "GenMsgCycleTime" BO_ 101 100; -BA_ "GenSigCycleTime" SG_ 101 FB_SafetyModeTest 100; -BA_ "GenSigCycleTime" SG_ 101 FB_TorqueTest 100; -BA_ "GenSigCycleTime" SG_ 101 FB_VoltageTest 100; -BA_ "GenSigCycleTime" SG_ 101 FB_CurrentTest 100; -BA_ "GenSigCycleTime" SG_ 101 FB_SpeedTest 100; diff --git a/test/data/test_log.txt b/test/data/test_log.txt deleted file mode 100644 index 7d76cbc..0000000 --- a/test/data/test_log.txt +++ /dev/null @@ -1,91 +0,0 @@ -WinNo Identifier Flg Dlc Name Time Dir -CAN 1 000064 X 8 VehicleNode AccelerationCommand_ECU.AccelerationCommandTest 44709.992868 R - -> ACC_AccelerationTest 0.0000 Bool - -> ACC_CurrentTest 1.0000 Bool - -> ACC_SurgeTest 12345.0000 RPM - -> ACC_AccelTest 67890.0000 RPM/sec - -> ACC_MaxCurrentTest 100.0000 Amp -CAN 1 000065 X 8 VehicleNode Feedback_ECU.FeedbackTest 44710.002938 R - -> FB_SafetyModeTest 1.0000 Enum - -> FB_TorqueTest 2345.6000 Nm - -> FB_VoltageTest 3456.7000 Volts - -> FB_CurrentTest 4567.8000 Amps - -> FB_SpeedTest 5678.9000 rpm -CAN 1 000066 X 8 VehicleNode SafetyFeedback_ECU.SafetyFeedbackTest 44710.012918 R - -> SAF_SafetyModeTest 0.0000 Enum - -> SAF_TorqueTest 567.0000 Nm - -> SAF_VoltageTest 6789.0000 Volts - -> SAF_CurrentTest 7890.1000 Amps - -> SAF_SpeedTest 8901.2000 rpm -CAN 1 000067 X 8 VehicleNode Command_ECU.CommandTest 44710.022908 R - -> CMD_ControlModeTest 2.0000 Enum - -> CMD_CommandCounterTest 3.0000 Integer - -> CMD_ActiveDischargeTest 0.0000 Bool - -> CMD_UseRawSpeedTest 1.0000 Bool - -> CMD_DirOfRotationTest 0.0000 Enum -CAN 1 000068 X 8 VehicleNode Status_ECU.StatusTest 44710.032888 R - -> STS_NotEnabledTest 1.0000 Bool - -> STS_OverCurrentTest 0.0000 Bool - -> STS_OverBusTest 1.0000 Bool - -> STS_OverPhaseTest 0.0000 Bool - -> STS_UnderVoltageTest 1.0000 Bool -CAN 1 000064 X 8 VehicleNode AccelerationCommand_ECU.AccelerationCommandTest 44710.042868 R - -> ACC_AccelerationTest 1.0000 Bool - -> ACC_CurrentTest 0.0000 Bool - -> ACC_SurgeTest 54321.0000 RPM - -> ACC_AccelTest 98765.0000 RPM/sec - -> ACC_MaxCurrentTest 150.0000 Amp -CAN 1 000065 X 8 VehicleNode Feedback_ECU.FeedbackTest 44710.052938 R - -> FB_SafetyModeTest 0.0000 Enum - -> FB_TorqueTest 1234.5000 Nm - -> FB_VoltageTest 4567.8000 Volts - -> FB_CurrentTest 5678.9000 Amps - -> FB_SpeedTest 6789.0000 rpm -CAN 1 000066 X 8 VehicleNode SafetyFeedback_ECU.SafetyFeedbackTest 44710.062918 R - -> SAF_SafetyModeTest 1.0000 Enum - -> SAF_TorqueTest 890.0000 Nm - -> SAF_VoltageTest 5678.0000 Volts - -> SAF_CurrentTest 6789.1000 Amps - -> SAF_SpeedTest 7890.2000 rpm -CAN 1 000067 X 8 VehicleNode Command_ECU.CommandTest 44710.072908 R - -> CMD_ControlModeTest 3.0000 Enum - -> CMD_CommandCounterTest 4.0000 Integer - -> CMD_ActiveDischargeTest 1.0000 Bool - -> CMD_UseRawSpeedTest 0.0000 Bool - -> CMD_DirOfRotationTest 1.0000 Enum -CAN 1 000068 X 8 VehicleNode Status_ECU.StatusTest 44710.082888 R - -> STS_NotEnabledTest 0.0000 Bool - -> STS_OverCurrentTest 1.0000 Bool - -> STS_OverBusTest 0.0000 Bool - -> STS_OverPhaseTest 1.0000 Bool - -> STS_UnderVoltageTest 0.0000 Bool -CAN 1 000064 X 8 VehicleNode AccelerationCommand_ECU.AccelerationCommandTest 44710.092868 R - -> ACC_AccelerationTest 2.0000 Bool - -> ACC_CurrentTest 2.0000 Bool - -> ACC_SurgeTest 54322.0000 RPM - -> ACC_AccelTest 98766.0000 RPM/sec - -> ACC_MaxCurrentTest 151.0000 Amp -CAN 1 000065 X 8 VehicleNode Feedback_ECU.FeedbackTest 44710.102938 R - -> FB_SafetyModeTest 1.0000 Enum - -> FB_TorqueTest 2346.5000 Nm - -> FB_VoltageTest 4568.8000 Volts - -> FB_CurrentTest 5679.9000 Amps - -> FB_SpeedTest 6780.0000 rpm -CAN 1 000066 X 8 VehicleNode SafetyFeedback_ECU.SafetyFeedbackTest 44710.112918 R - -> SAF_SafetyModeTest 0.0000 Enum - -> SAF_TorqueTest 569.0000 Nm - -> SAF_VoltageTest 6782.0000 Volts - -> SAF_CurrentTest 7892.1000 Amps - -> SAF_SpeedTest 8912.2000 rpm -CAN 1 000067 X 8 VehicleNode Command_ECU.CommandTest 44710.122908 R - -> CMD_ControlModeTest 2.0000 Enum - -> CMD_CommandCounterTest 5.0000 Integer - -> CMD_ActiveDischargeTest 0.0000 Bool - -> CMD_UseRawSpeedTest 1.0000 Bool - -> CMD_DirOfRotationTest 0.0000 Enum -CAN 1 000068 X 8 VehicleNode Status_ECU.StatusTest 44710.132888 R - -> STS_NotEnabledTest 1.0000 Bool - -> STS_OverCurrentTest 0.0000 Bool - -> STS_OverBusTest 1.0000 Bool - -> STS_OverPhaseTest 0.0000 Bool - -> STS_UnderVoltageTest 1.0000 Bool diff --git a/test/test_dbc_parsing.py b/test/test_dbc_parsing.py deleted file mode 100644 index 6cad569..0000000 --- a/test/test_dbc_parsing.py +++ /dev/null @@ -1,33 +0,0 @@ -import cantools -import os -import sys - -def parse_dbc(file_path): - try: - db = cantools.database.load_file(file_path) - print(f"Successfully parsed {file_path}") - for message in db.messages: - print(f"Message ID: {message.frame_id}, Name: {message.name}") - for signal in message.signals: - print(f" Signal Name: {signal.name}, Start Bit: {signal.start}, Length: {signal.length}") - except Exception as e: - print(f"Error parsing {file_path}: {e}") - -if __name__ == "__main__": - if len(sys.argv) != 2: - print("Usage: python test_dbc_parsing.py ") - sys.exit(1) - - script_dir = os.path.dirname(os.path.abspath(__file__)) - - dbc_type = sys.argv[1] - if dbc_type == 'test': - dbc_file_path = os.path.join(script_dir, 'data', 'test.dbc') - elif dbc_type == 'main': - dbc_file_path = os.path.join(script_dir, '..', 'data', '1200G_CAN-DBC_v01.01.00.dbc') - else: - print("Invalid argument. Use 'test' or 'main'.") - sys.exit(1) - - print(f"Parsing DBC: {dbc_file_path}") - parse_dbc(dbc_file_path) diff --git a/test/test_log_parsing.py b/test/test_log_parsing.py deleted file mode 100644 index 1bf0f9f..0000000 --- a/test/test_log_parsing.py +++ /dev/null @@ -1,95 +0,0 @@ -import cantools -import os -import sys - -def parse_dbc(file_path): - try: - db = cantools.database.load_file(file_path) - print(f"Successfully parsed DBC file: {file_path}") - return db - except Exception as e: - print(f"Error parsing {file_path}: {e}") - return None - -def parse_log(db, log_file_path): - try: - parsed_data = [] - with open(log_file_path, 'r') as log_file: - current_message = None - for line in log_file: - # print(f"Reading line: {line.strip()}") # Commented for clean output - if line.startswith("CAN"): - if current_message: - process_message(db, current_message, parsed_data) - current_message = [line.strip()] - # print("Detected start of a new message") # Commented for clean output - elif line.strip().startswith("->"): - # print("Detected start of line with ->") - current_message.append(line.strip()) - # print(f"Appending signal line: {line.strip()}") # Commented for clean output - if current_message: - process_message(db, current_message, parsed_data) - print_parsed_data(parsed_data) - except Exception as e: - print(f"Error parsing log file {log_file_path}: {e}") - -def process_message(db, message_lines, parsed_data): - try: - # print(f"Processing message lines: {message_lines}") # Commented for clean output - main_line = message_lines[0].split() - # print(f"Main line parts: {main_line}") # Commented for clean output - can_id = main_line[2] - # if can_id in ["00000000", "0000040A"]: - # return - ecu_name, message_name = main_line[6].split('.') - timestamp = main_line[7] - direction = main_line[8] - - signals = [] - - for signal_line in message_lines[1:]: - # print("Signal Line ---- ", signal_line) - parts = signal_line.split() - signal_name = parts[1] - signal_value = parts[2] - signals.append((signal_name, signal_value, timestamp)) - - parsed_data.append({ - "message_name": message_name, - "can_id": can_id, - "timestamp": timestamp, - "direction": direction, - "signals": signals - }) - - except Exception as e: - print(f"Error processing message: {e}, for CAN ID (Error Frames): {can_id}") - return - -def print_parsed_data(parsed_data): - for data in parsed_data: - print(f"Message: {data['message_name']}, CAN ID: {data['can_id']}, Timestamp: {data['timestamp']}, Direction: {data['direction']}") - for signal in data['signals']: - signal_name, signal_value, signal_timestamp = signal - print(f" Signal: {signal_name}, Value: {signal_value}, Timestamp: {signal_timestamp}") - -if __name__ == "__main__": - if len(sys.argv) != 2: - print("Usage: python test_log_parsing.py [test|main]") - sys.exit(1) - - mode = sys.argv[1] - if mode == "test": - dbc_file = "C:\\Github\\CAN-Log-Parser\\test\\data\\test.dbc" - log_file = "C:\\Github\\CAN-Log-Parser\\test\\data\\test_log.txt" - elif mode == "main": - dbc_file = "C:\\Github\\CAN-Log-Parser\\data\\1200G_CAN-DBC_v01.01.00.dbc" - log_file = "C:\\Github\\CAN-Log-Parser\\data\\DMW_Message_Timeout_CAN_Log.txt" - else: - print("Invalid mode. Use 'test' or 'main'.") - sys.exit(1) - - db = parse_dbc(dbc_file) - if db: - parse_log(db, log_file) - print("Done parsing log file") diff --git a/test/test_signal_plotting.py b/test/test_signal_plotting.py deleted file mode 100644 index 73c7a3c..0000000 --- a/test/test_signal_plotting.py +++ /dev/null @@ -1,205 +0,0 @@ -""" -/** - * @file main.py - * @brief Script to parse CAN DBC files and log files, and plot specific CAN signal data over time. - * - * This script is designed to parse a DBC file to understand the structure of CAN messages and a log file - * to extract actual CAN message data. It then plots the specified signal data over time. - * - * The script uses the `cantools` library to parse the DBC file and understand the CAN message structure. - * The log file is parsed to extract individual CAN messages and their signals, which are then plotted using `matplotlib`. - * - * - * The script is designed to work with relative paths, making it easy to clone the repository and run the script without modifying paths. - * - * Author: Kiran Jojare - * - * Usage: - * python main.py [start_time] [end_time] - * - * Arguments: - * mode: Mode to run the script in ('test' or 'main') - * signal: Signal name to plot - * start: (Optional) Start time for the plot - * end: (Optional) End time for the plot - */ -""" - -import cantools -import os -import sys -import matplotlib.pyplot as plt -import argparse - -def parse_dbc(file_path): - """ - @brief Parse the DBC file to get CAN message definitions. - - @param file_path Path to the DBC file. - @return Parsed DBC database object. - """ - try: - db = cantools.database.load_file(file_path) - print(f"Successfully parsed DBC file: {file_path}") - return db - except Exception as e: - print(f"Error parsing {file_path}: {e}") - return None - -def parse_log(db, log_file_path): - """ - @brief Parse the log file to extract CAN messages. - - @param db Parsed DBC database object. - @param log_file_path Path to the log file. - @return List of parsed CAN messages. - """ - try: - parsed_data = [] - with open(log_file_path, 'r') as log_file: - current_message = None - for line in log_file: - # print(f"Reading line: {line.strip()}") # Debug print - if line.startswith("CAN"): - if current_message: - process_message(db, current_message, parsed_data) - current_message = [line.strip()] - # print("Detected start of a new message") # Debug print - elif line.strip().startswith("->"): - # print("Detected start of line with ->") # Debug print - current_message.append(line.strip()) - # print(f"Appending signal line: {line.strip()}") # Debug print - if current_message: - process_message(db, current_message, parsed_data) - print_parsed_data(parsed_data) - return parsed_data - except Exception as e: - print(f"Error parsing log file {log_file_path}: {e}") - return None - -def process_message(db, message_lines, parsed_data): - """ - @brief Process a single CAN message from the log file. - - @param db Parsed DBC database object. - @param message_lines List of lines representing a single CAN message. - @param parsed_data List to append the parsed message data. - """ - try: - # print(f"Processing message lines: {message_lines}") # Debug print - main_line = message_lines[0].split() - # print(f"Main line parts: {main_line}") # Debug print - can_id = main_line[2] - ecu_name, message_name = main_line[6].split('.') - timestamp = main_line[7] - direction = main_line[8] - - signals = [] - - for signal_line in message_lines[1:]: - # print("Signal Line ---- ", signal_line) # Debug print - parts = signal_line.split() - signal_name = parts[1] - signal_value = parts[2] - signals.append((signal_name, signal_value, timestamp)) - - parsed_data.append({ - "message_name": message_name, - "can_id": can_id, - "timestamp": timestamp, - "direction": direction, - "signals": signals - }) - - except Exception as e: - print(f"Error processing message: {e}, for CAN ID: {can_id}") - return - -def print_parsed_data(parsed_data): - """ - @brief Print parsed data for debugging purposes. - - @param parsed_data List of parsed CAN messages. - """ - for data in parsed_data: - #print(f"Message: {data['message_name']}, CAN ID: {data['can_id']}, Timestamp: {data['timestamp']}, Direction: {data['direction']}") - for signal in data['signals']: - signal_name, signal_value, signal_timestamp = signal - #print(f" Signal: {signal_name}, Value: {signal_value}, Timestamp: {signal_timestamp}") - -def plot_signals(parsed_data, signal_name, start_time, end_time): - """ - @brief Plot the signal data over time. - - @param parsed_data List of parsed CAN messages. - @param signal_name Name of the signal to plot. - @param start_time Start time for the plot. - @param end_time End time for the plot. - """ - timestamps = [] - values = [] - for data in parsed_data: - for signal in data['signals']: - s_name, s_value, s_timestamp = signal - try: - s_value = float(s_value) - s_timestamp = float(s_timestamp) / 1000 # Convert timestamp to seconds here - except ValueError as e: - print(f"Error converting value: {e}") - continue - - if s_name == signal_name and (start_time is None or s_timestamp >= start_time) and (end_time is None or s_timestamp <= end_time): - timestamps.append(s_timestamp) - values.append(s_value) - - if not timestamps: - print(f"No data found for signal: {signal_name}") - return - - plt.figure(figsize=(30, 15)) # Adjust the size as needed - plt.plot(timestamps, values) - plt.xlabel('Time (s)') - plt.ylabel('Value') - plt.title(f'Signal: {signal_name}') - plt.grid(True) - - # Format the x-axis to display timestamps correctly in seconds - plt.gca().xaxis.set_major_formatter(plt.FuncFormatter(lambda x, _: f'{x:.2f}')) - - plt.tight_layout() - plt.show() - -if __name__ == "__main__": - parser = argparse.ArgumentParser(description="Plot CAN signal data") - parser.add_argument('mode', choices=['test', 'main'], help="Mode to run the script in") - parser.add_argument('signal', type=str, help="Signal name to plot") - parser.add_argument('start', type=float, nargs='?', default=None, help="Start time for the plot") - parser.add_argument('end', type=float, nargs='?', default=None, help="End time for the plot") - - args = parser.parse_args() - - # Determine the paths to the DBC and log files based on the mode - script_dir = os.path.dirname(os.path.abspath(__file__)) - dbc_file = os.path.join(script_dir, "..", "data", "test.dbc") - log_file = os.path.join(script_dir, "..", "data", "test_log.txt") - - # Parse the DBC file - db = parse_dbc(dbc_file) - if db: - # Parse the log file - parsed_data = parse_log(db, log_file) - if parsed_data: - # Determine start and end times for the plot if not provided - if args.start is None or args.end is None: - all_timestamps = [float(data['timestamp']) / 1000 for data in parsed_data for signal in data['signals']] - start_time = min(all_timestamps) if args.start is None else args.start - end_time = max(all_timestamps) if args.end is None else args.end - else: - start_time = args.start - end_time = args.end - # Plot the signals - plot_signals(parsed_data, args.signal, start_time, end_time) - else: - print("Parsed data is empty or None.") - else: - print("DBC parsing failed.")