DBC parser initial commit.

This commit is contained in:
2026-03-13 13:00:01 -04:00
parent 4270459973
commit 2a90b2d79d
11 changed files with 789 additions and 0 deletions

35
frame_info.h Normal file
View File

@@ -0,0 +1,35 @@
#ifndef FRAME_INFO_H
#define FRAME_INFO_H
#include <string>
#include <vector>
#include <cstdint>
#include "signal_info.h"
/**
* @brief Describes one CAN frame from a DBC file.
*/
struct FrameInfo {
std::string name; /**< Frame name. */
std::uint32_t canId; /**< Raw CAN identifier from DBC. */
std::uint32_t pgn; /**< J1939 PGN if applicable. */
bool hasPgn; /**< true if PGN was derived. */
std::uint8_t dlc; /**< Frame payload length. */
std::string transmitter; /**< Transmitter ECU name. */
std::string comment; /**< Optional frame comment. */
std::vector<SignalInfo> signals; /**< Signals contained in the frame. */
FrameInfo()
: name()
, canId (0U)
, pgn (0U)
, hasPgn (false)
, dlc (0U)
, transmitter()
, comment()
, signals() {
}
};
#endif /* FRAME_INFO_H */