diff --git a/docs/dbcframework.tag b/docs/dbcframework.tag index 6574055..5d274c9 100644 --- a/docs/dbcframework.tag +++ b/docs/dbcframework.tag @@ -234,6 +234,20 @@ (const DbcDatabase &database) const + + DbcTreeModel + classDbcTreeModel.html + + + DbcUnsupportedMultiplexingHandler + classDbcUnsupportedMultiplexingHandler.html + DbcStatementHandler + + + DbcValueDescriptionHandler + classDbcValueDescriptionHandler.html + DbcStatementHandler + DecodeDatabase structDecodeDatabase.html @@ -266,6 +280,13 @@ DecodedSignalValue structDecodedSignalValue.html + + const std::string * + GetValueDescription + structDecodedSignalValue.html + affc38af1bf31bcb6f2c33044bce92bd2 + () const + const DecodeSignal * definition @@ -274,10 +295,10 @@ - std::variant< std::int64_t, std::uint64_t > + RawSignalValue rawValue structDecodedSignalValue.html - a95db4f7f93b5f311e8f272833e45055e + a503c90b4b1a610b8252c45e466367c28 @@ -442,6 +463,13 @@ abdbae62a64d2df716bf60c6b67b30eaa + + ValueDescriptions + valueDescriptions + structDecodeSignal.html + a822155d9bf4ed5f3300c9e9befe606ff + + std::string comment @@ -525,6 +553,14 @@ FrameKeyHasher structFrameKeyHasher.html + + Multiplexing + structMultiplexing.html + + + PendingValueDescriptions + structPendingValueDescriptions.html + RawCanFrame structRawCanFrame.html @@ -630,6 +666,13 @@ a2c95562fd0b29327a7fd7b1e6feee7f3 + + ValueDescriptions + valueDescriptions + structSignalInfo.html + a43f47d0433d0cc39076bd7278b46af9c + + std::string comment @@ -669,6 +712,20 @@ a6161f2ebb92184eab4215d121870e788 (std::unique_ptr< TreeNode > child) + + const TreeNode * + GetParent + classTreeNode.html + aa48fbc17903eb8cfa40353e29f853c6f + () const + + + std::size_t + GetRow + classTreeNode.html + ad501f97eeec7f7d3353bfae838fbb6a8 + () const + std::size_t GetChildCount @@ -754,6 +811,11 @@ (const ClassId &id) const + + md_changelog + Changelog + md_changelog.html + md_README DBC Parser and Runtime Decode Module Documentation diff --git a/docs/doxygen_warnings.log b/docs/doxygen_warnings.log index b9602aa..efcd3df 100644 --- a/docs/doxygen_warnings.log +++ b/docs/doxygen_warnings.log @@ -1,24 +1,55 @@ -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:38: warning: Compound DbcCommentHandler is not documented. -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:22: warning: Compound DbcFrameHandler is not documented. -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:30: warning: Compound DbcSignalHandler is not documented. -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:16: warning: Compound DbcStatementHandler is not documented. -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/examples/main.cpp:101: warning: Member main(int argc, char *argv[]) (function) of file examples/main.cpp is not documented. -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:40: warning: Member Handle(const std::string &line, DbcParseContext &context) const override (function) of class DbcCommentHandler is not documented. -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:24: warning: Member Handle(const std::string &line, DbcParseContext &context) const override (function) of class DbcFrameHandler is not documented. -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:12: warning: Member database (variable) of struct DbcParseContext is not documented. -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:13: warning: Member currentFrame (variable) of struct DbcParseContext is not documented. -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:32: warning: Member Handle(const std::string &line, DbcParseContext &context) const override (function) of class DbcSignalHandler is not documented. -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:52: warning: Member RegisterType(const std::string &keyword) (function) of class DbcStatementDispatcher is not documented. -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:19: warning: Member Handle(const std::string &line, DbcParseContext &context) const =0 (function) of class DbcStatementHandler is not documented. -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/decode_database.h:112: warning: Member frames (variable) of struct DecodeDatabase is not documented. -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/decode_database.h:113: warning: Member frameIndexByKey (variable) of struct DecodeDatabase is not documented. -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/decode_database.h:88: warning: Member FrameKey(std::uint32_t id, bool extended) (function) of struct FrameKey is not documented. -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/decode_database.h:92: warning: Member operator==(const FrameKey &other) const (function) of struct FrameKey is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:53: warning: Compound DbcCommentHandler is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:37: warning: Compound DbcFrameHandler is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:45: warning: Compound DbcSignalHandler is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:31: warning: Compound DbcStatementHandler is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:66: warning: Compound DbcUnsupportedMultiplexingHandler is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:61: warning: Compound DbcValueDescriptionHandler is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:10: warning: Compound PendingValueDescriptions is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_decoder.h:32: warning: Member SignalDecodeStatus (enumeration) of file dbc_decoder.h is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/examples/main.cpp:100: warning: Member main(int argc, char *argv[]) (function) of file examples/main.cpp is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/README.md:1314: warning: end of comment block while expecting command +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:55: warning: Member Handle(const std::string &line, DbcParseContext &context) const override (function) of class DbcCommentHandler is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:39: warning: Member Handle(const std::string &line, DbcParseContext &context) const override (function) of class DbcFrameHandler is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:26: warning: Member ValidateMultiplexing(const std::string &filePath) const (function) of struct DbcParseContext is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:28: warning: Member ResolveValueDescriptions(const std::string &filePath) (function) of struct DbcParseContext is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:20: warning: Member database (variable) of struct DbcParseContext is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:21: warning: Member currentFrame (variable) of struct DbcParseContext is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:22: warning: Member lineNumber (variable) of struct DbcParseContext is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:23: warning: Member pendingValues (variable) of struct DbcParseContext is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:25: warning: Member signalLines (variable) of struct DbcParseContext is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:47: warning: Member Handle(const std::string &line, DbcParseContext &context) const override (function) of class DbcSignalHandler is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:77: warning: Member RegisterType(const std::string &keyword) (function) of class DbcStatementDispatcher is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:34: warning: Member Handle(const std::string &line, DbcParseContext &context) const =0 (function) of class DbcStatementHandler is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/qt/dbc_tree_model.h:13: warning: Member Column (enumeration) of class DbcTreeModel is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/qt/dbc_tree_model.h:24: warning: Member Role (enumeration) of class DbcTreeModel is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/qt/dbc_tree_model.h:36: warning: Member DbcTreeModel(QObject *parent=nullptr) (function) of class DbcTreeModel is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/qt/dbc_tree_model.h:37: warning: Member SetTree(std::unique_ptr< TreeNode > root) (function) of class DbcTreeModel is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/qt/dbc_tree_model.h:38: warning: Member index(int row, int column, const QModelIndex &parent=QModelIndex()) const override (function) of class DbcTreeModel is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/qt/dbc_tree_model.h:39: warning: Member parent(const QModelIndex &child) const override (function) of class DbcTreeModel is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/qt/dbc_tree_model.h:40: warning: Member rowCount(const QModelIndex &parent=QModelIndex()) const override (function) of class DbcTreeModel is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/qt/dbc_tree_model.h:41: warning: Member columnCount(const QModelIndex &parent=QModelIndex()) const override (function) of class DbcTreeModel is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/qt/dbc_tree_model.h:42: warning: Member data(const QModelIndex &index, int role=Qt::DisplayRole) const override (function) of class DbcTreeModel is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/qt/dbc_tree_model.h:43: warning: Member headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override (function) of class DbcTreeModel is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/qt/dbc_tree_model.h:44: warning: Member flags(const QModelIndex &index) const override (function) of class DbcTreeModel is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:68: warning: Member Handle(const std::string &line, DbcParseContext &context) const override (function) of class DbcUnsupportedMultiplexingHandler is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:63: warning: Member Handle(const std::string &line, DbcParseContext &context) const override (function) of class DbcValueDescriptionHandler is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/decode_database.h:110: warning: Member frames (variable) of struct DecodeDatabase is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/decode_database.h:111: warning: Member frameIndexByKey (variable) of struct DecodeDatabase is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_decoder.h:48: warning: Member status (variable) of struct DecodedSignalValue is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/decode_database.h:42: warning: Member multiplexing (variable) of struct DecodeSignal is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/decode_database.h:86: warning: Member FrameKey(std::uint32_t id, bool extended) (function) of struct FrameKey is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/decode_database.h:90: warning: Member operator==(const FrameKey &other) const (function) of struct FrameKey is not documented. /home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/decode_database.h:81: warning: Member canId (variable) of struct FrameKey is not documented. /home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/decode_database.h:82: warning: Member isExtended (variable) of struct FrameKey is not documented. -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/decode_database.h:101: warning: Member operator()(const FrameKey &key) const (function) of struct FrameKeyHasher is not documented. -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/tree_node.h:59: warning: Member TreeNode(TreeNode &&)=default (function) of class TreeNode is not documented. -/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/tree_node.h:60: warning: Member operator=(TreeNode &&)=default (function) of class TreeNode is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/decode_database.h:99: warning: Member operator()(const FrameKey &key) const (function) of struct FrameKeyHasher is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/multiplexing.h:15: warning: Member role (variable) of struct Multiplexing is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/multiplexing.h:16: warning: Member value (variable) of struct Multiplexing is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:11: warning: Member canId (variable) of struct PendingValueDescriptions is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:12: warning: Member isExtended (variable) of struct PendingValueDescriptions is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:13: warning: Member signalName (variable) of struct PendingValueDescriptions is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:14: warning: Member descriptions (variable) of struct PendingValueDescriptions is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/dbc_statement_handler.h:15: warning: Member lineNumber (variable) of struct PendingValueDescriptions is not documented. +/home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/signal_info.h:25: warning: Member multiplexing (variable) of struct SignalInfo is not documented. /home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/typefactory.h:61: warning: Member BasePtr (typedef) of class TypeFactory is not documented. /home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/typefactory.h:62: warning: Member CreatorFn (typedef) of class TypeFactory is not documented. /home/deeaitch/work/3.projects/git.himro.ca/automotive/dbc/core/typefactory.h:110: warning: Member classes (variable) of class TypeFactory is not documented. diff --git a/docs/html/annotated.html b/docs/html/annotated.html index 8c4c0bf..107b0a9 100644 --- a/docs/html/annotated.html +++ b/docs/html/annotated.html @@ -106,18 +106,23 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable();  CDbcStatementDispatcher  CDbcStatementHandler  CDbcTreeBuilderBuilds a simple tree from parsed DBC database - CDecodeDatabaseRuntime decode database with fast lookup by CAN ID - CDecodedFrameValueFully decoded frame - CDecodedSignalValueOne decoded signal value - CDecodeFrameRuntime-ready frame definition - CDecodeSignalRuntime-ready signal definition - CFrameInfoDescribes one CAN frame from a DBC file - CFrameKeyKey for fast frame lookup - CFrameKeyHasherHasher for frame key - CRawCanFrameRaw CAN frame used for runtime or trace decoding - CSignalInfoDescribes one signal inside a DBC frame - CTreeNodeTree node for later use in model/view or other hierarchy consumers - CTypeFactoryRegistry-based factory for creating objects by runtime identifier + CDbcTreeModel + CDbcUnsupportedMultiplexingHandler + CDbcValueDescriptionHandler + CDecodeDatabaseRuntime decode database with fast lookup by CAN ID + CDecodedFrameValueFully decoded frame + CDecodedSignalValueOne decoded signal value + CDecodeFrameRuntime-ready frame definition + CDecodeSignalRuntime-ready signal definition + CFrameInfoDescribes one CAN frame from a DBC file + CFrameKeyKey for fast frame lookup + CFrameKeyHasherHasher for frame key + CMultiplexing + CPendingValueDescriptions + CRawCanFrameRaw CAN frame used for runtime or trace decoding + CSignalInfoDescribes one signal inside a DBC frame + CTreeNodeTree node for later use in model/view or other hierarchy consumers + CTypeFactoryRegistry-based factory for creating objects by runtime identifier diff --git a/docs/html/annotated_dup.js b/docs/html/annotated_dup.js index daa1283..73f03e8 100644 --- a/docs/html/annotated_dup.js +++ b/docs/html/annotated_dup.js @@ -11,6 +11,9 @@ var annotated_dup = [ "DbcStatementDispatcher", "classDbcStatementDispatcher.html", "classDbcStatementDispatcher" ], [ "DbcStatementHandler", "classDbcStatementHandler.html", null ], [ "DbcTreeBuilder", "classDbcTreeBuilder.html", "classDbcTreeBuilder" ], + [ "DbcTreeModel", "classDbcTreeModel.html", null ], + [ "DbcUnsupportedMultiplexingHandler", "classDbcUnsupportedMultiplexingHandler.html", null ], + [ "DbcValueDescriptionHandler", "classDbcValueDescriptionHandler.html", null ], [ "DecodeDatabase", "structDecodeDatabase.html", null ], [ "DecodedFrameValue", "structDecodedFrameValue.html", "structDecodedFrameValue" ], [ "DecodedSignalValue", "structDecodedSignalValue.html", "structDecodedSignalValue" ], @@ -19,6 +22,8 @@ var annotated_dup = [ "FrameInfo", "structFrameInfo.html", "structFrameInfo" ], [ "FrameKey", "structFrameKey.html", null ], [ "FrameKeyHasher", "structFrameKeyHasher.html", null ], + [ "Multiplexing", "structMultiplexing.html", null ], + [ "PendingValueDescriptions", "structPendingValueDescriptions.html", null ], [ "RawCanFrame", "structRawCanFrame.html", "structRawCanFrame" ], [ "SignalInfo", "structSignalInfo.html", "structSignalInfo" ], [ "TreeNode", "classTreeNode.html", "classTreeNode" ], diff --git a/docs/html/classDbcCommentHandler.html b/docs/html/classDbcCommentHandler.html index 98aaefc..080ffec 100644 --- a/docs/html/classDbcCommentHandler.html +++ b/docs/html/classDbcCommentHandler.html @@ -111,7 +111,7 @@ Public Member Functions

Detailed Description

-

Definition at line 38 of file dbc_statement_handler.h.

+

Definition at line 53 of file dbc_statement_handler.h.

Member Function Documentation

◆ Handle()

@@ -149,7 +149,7 @@ Public Member Functions

Implements DbcStatementHandler.

-

Definition at line 303 of file dbc_statement_handler.cpp.

+

Definition at line 370 of file dbc_statement_handler.cpp.

diff --git a/docs/html/classDbcDecodeBuilder.html b/docs/html/classDbcDecodeBuilder.html index e9ffc56..450021b 100644 --- a/docs/html/classDbcDecodeBuilder.html +++ b/docs/html/classDbcDecodeBuilder.html @@ -140,7 +140,7 @@ Public Member Functions

Definition at line 14 of file dbc_decode_builder.cpp.

-

References DecodeSignal::byteOrder, DecodeFrame::canId, FrameInfo::canId, DecodeSignal::comment, DecodeFrame::comment, FrameInfo::comment, SignalInfo::comment, DecodeFrame::dlc, FrameInfo::dlc, DecodeSignal::factor, SignalInfo::factor, DbcDatabase::frames, DecodeFrame::hasPgn, FrameInfo::hasPgn, DecodeFrame::isExtended, FrameInfo::isExtended, SignalInfo::isLittleEndian, SignalInfo::isSigned, DecodeSignal::length, SignalInfo::length, DecodeSignal::maximum, SignalInfo::maximum, DecodeSignal::minimum, SignalInfo::minimum, DecodeSignal::name, DecodeFrame::name, FrameInfo::name, SignalInfo::name, DecodeSignal::offset, SignalInfo::offset, DecodeFrame::pgn, FrameInfo::pgn, DecodeSignal::receivers, SignalInfo::receivers, DecodeSignal::startBit, SignalInfo::startBit, DecodeFrame::transmitter, FrameInfo::transmitter, DecodeSignal::unit, SignalInfo::unit, and DecodeSignal::valueType.

+

References DecodeSignal::byteOrder, DecodeFrame::canId, DecodeSignal::comment, DecodeFrame::comment, DecodeFrame::dlc, DecodeSignal::factor, DbcDatabase::frames, DecodeFrame::hasPgn, DecodeFrame::isExtended, DecodeSignal::length, DecodeSignal::maximum, DecodeSignal::minimum, DecodeSignal::name, DecodeFrame::name, DecodeSignal::offset, DecodeFrame::pgn, DecodeSignal::receivers, DecodeSignal::startBit, DecodeFrame::transmitter, DecodeSignal::unit, DecodeSignal::valueDescriptions, and DecodeSignal::valueType.

diff --git a/docs/html/classDbcDecoder.html b/docs/html/classDbcDecoder.html index a2e63a3..77ddeee 100644 --- a/docs/html/classDbcDecoder.html +++ b/docs/html/classDbcDecoder.html @@ -91,6 +91,7 @@ $(document).ready(function(){initNavTree('classDbcDecoder.html',''); initResizab
DbcDecoder Class Reference
@@ -114,7 +115,7 @@ Public Member Functions

Detailed Description

Runtime CAN decoder using prebuilt decode database.

-

Definition at line 64 of file dbc_decoder.h.

+

Definition at line 72 of file dbc_decoder.h.

Member Function Documentation

◆ FindFrame()

@@ -203,7 +204,7 @@ Public Member Functions

Definition at line 31 of file dbc_decoder.cpp.

-

References RawCanFrame::canId, RawCanFrame::data, DecodedSignalValue::definition, DecodedFrameValue::definition, DecodeSignal::factor, FindFrame(), RawCanFrame::isExtended, DecodeSignal::length, DecodeSignal::offset, DecodedSignalValue::physicalValue, DecodedSignalValue::rawValue, DecodedSignalValue::valid, DecodedFrameValue::valid, and DecodeSignal::valueType.

+

References RawCanFrame::canId, DecodedFrameValue::definition, FindFrame(), RawCanFrame::isExtended, and DecodedFrameValue::valid.

diff --git a/docs/html/classDbcFrameHandler.html b/docs/html/classDbcFrameHandler.html index 8dd89a5..58440f4 100644 --- a/docs/html/classDbcFrameHandler.html +++ b/docs/html/classDbcFrameHandler.html @@ -111,7 +111,7 @@ Public Member Functions

Detailed Description

-

Definition at line 22 of file dbc_statement_handler.h.

+

Definition at line 37 of file dbc_statement_handler.h.

Member Function Documentation

◆ Handle()

@@ -149,7 +149,7 @@ Public Member Functions

Implements DbcStatementHandler.

-

Definition at line 281 of file dbc_statement_handler.cpp.

+

Definition at line 342 of file dbc_statement_handler.cpp.

diff --git a/docs/html/classDbcParser.html b/docs/html/classDbcParser.html index 84f346e..cce55d7 100644 --- a/docs/html/classDbcParser.html +++ b/docs/html/classDbcParser.html @@ -115,14 +115,15 @@ Public Member Functions
  • SG_
  • CM_ BO_
  • CM_ SG_
  • +
  • basic M / mN multiplexing
  • +
  • VAL_ signal value descriptions
  • Ignores:

    -

    Definition at line 33 of file dbc_parser.h.

    +

    Definition at line 34 of file dbc_parser.h.

    Member Function Documentation

    ◆ ParseFile()

    @@ -150,14 +151,14 @@ Public Member Functions
    Returns
    Parsed database.
    Exceptions
    - +
    std::runtime_erroron file or parse errors. Line parse errors include the file path and one-based line number.
    std::runtime_erroron file or parse errors. Line parse errors include the file path and one-based line number. Duplicate normalized CAN IDs of the same frame type and duplicate signal names within a frame are rejected at the repeated definition's line.
    -

    Definition at line 40 of file dbc_parser.cpp.

    +

    Definition at line 19 of file dbc_parser.cpp.

    -

    References DbcStatementDispatcher::Dispatch().

    +

    References DbcStatementDispatcher::Dispatch().

    diff --git a/docs/html/classDbcSignalHandler.html b/docs/html/classDbcSignalHandler.html index e8ac567..3fb341b 100644 --- a/docs/html/classDbcSignalHandler.html +++ b/docs/html/classDbcSignalHandler.html @@ -111,7 +111,7 @@ Public Member Functions

    Detailed Description

    -

    Definition at line 30 of file dbc_statement_handler.h.

    +

    Definition at line 45 of file dbc_statement_handler.h.

    Member Function Documentation

    ◆ Handle()

    @@ -149,7 +149,7 @@ Public Member Functions

    Implements DbcStatementHandler.

    -

    Definition at line 286 of file dbc_statement_handler.cpp.

    +

    Definition at line 352 of file dbc_statement_handler.cpp.

    diff --git a/docs/html/classDbcStatementDispatcher.html b/docs/html/classDbcStatementDispatcher.html index 7de847b..5c2d586 100644 --- a/docs/html/classDbcStatementDispatcher.html +++ b/docs/html/classDbcStatementDispatcher.html @@ -110,7 +110,7 @@ Public Member Functions

    Detailed Description

    Exact-key dispatch to handlers created once per registration via TypeFactory.

    -

    Definition at line 47 of file dbc_statement_handler.h.

    +

    Definition at line 72 of file dbc_statement_handler.h.

    Constructor & Destructor Documentation

    ◆ DbcStatementDispatcher()

    @@ -127,7 +127,7 @@ Public Member Functions
    -

    Definition at line 308 of file dbc_statement_handler.cpp.

    +

    Definition at line 374 of file dbc_statement_handler.cpp.

    @@ -158,7 +158,7 @@ template<class Handler >
    -

    Definition at line 52 of file dbc_statement_handler.h.

    +

    Definition at line 77 of file dbc_statement_handler.h.

    @@ -189,9 +189,9 @@ template<class Handler >

    Returns false for an unregistered keyword; input must be trimmed.

    -

    Definition at line 314 of file dbc_statement_handler.cpp.

    +

    Definition at line 382 of file dbc_statement_handler.cpp.

    -

    Referenced by DbcParser::ParseFile().

    +

    Referenced by DbcParser::ParseFile().

    diff --git a/docs/html/classDbcStatementHandler.html b/docs/html/classDbcStatementHandler.html index f35a8a0..3bbc66a 100644 --- a/docs/html/classDbcStatementHandler.html +++ b/docs/html/classDbcStatementHandler.html @@ -101,7 +101,7 @@ $(document).ready(function(){initNavTree('classDbcStatementHandler.html',''); in

    @@ -112,7 +112,7 @@ virtual void 

    Handle (c

    Detailed Description

    -

    Definition at line 16 of file dbc_statement_handler.h.

    +

    Definition at line 31 of file dbc_statement_handler.h.


    The documentation for this class was generated from the following file: diff --git a/docs/html/classDbcStatementHandler__inherit__graph.map b/docs/html/classDbcStatementHandler__inherit__graph.map index 2c08e88..9b5b7b2 100644 --- a/docs/html/classDbcStatementHandler__inherit__graph.map +++ b/docs/html/classDbcStatementHandler__inherit__graph.map @@ -1,11 +1,15 @@ - + - + - + - + - + + + + + diff --git a/docs/html/classDbcStatementHandler__inherit__graph.md5 b/docs/html/classDbcStatementHandler__inherit__graph.md5 index 71489bd..50fc735 100644 --- a/docs/html/classDbcStatementHandler__inherit__graph.md5 +++ b/docs/html/classDbcStatementHandler__inherit__graph.md5 @@ -1 +1 @@ -318e71b72eb76e120faf9a4f760373e7 \ No newline at end of file +88ac50356cfeaecb76401f7ba1a3e39c \ No newline at end of file diff --git a/docs/html/classDbcStatementHandler__inherit__graph.svg b/docs/html/classDbcStatementHandler__inherit__graph.svg index fa2b8cc..3f50954 100644 --- a/docs/html/classDbcStatementHandler__inherit__graph.svg +++ b/docs/html/classDbcStatementHandler__inherit__graph.svg @@ -4,8 +4,7 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + DbcStatementHandler Node1 - -DbcStatementHandler -  -+ -~DbcStatementHandler() -+ -Handle() - - - + +DbcStatementHandler +  ++ +~DbcStatementHandler() ++ +Handle() + + + @@ -60,8 +96,8 @@ Node1->Node2 - - + + @@ -84,8 +120,8 @@ Node1->Node3 - - + + @@ -108,8 +144,8 @@ Node1->Node4 - - + + @@ -132,13 +168,83 @@ Node1->Node5 - - + + + + + + + +Node6 + + +DbcUnsupportedMultiplexing +Handler +  ++ +Handle() + + + + + + + + +Node1->Node6 + + + + + + + + +Node7 + + +DbcValueDescriptionHandler +  ++ +Handle() + + + + + + + + +Node1->Node7 + + + + + + + + + + + + + + + + + + + + + + + + + +DBC Framework: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    DBC Framework +
    +
    DBC parsing and CAN signal decoding framework
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    DbcTreeModel Member List
    +
    +
    + +

    This is the complete list of members for DbcTreeModel, including all inherited members.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    BitLength enum value (defined in DbcTreeModel)DbcTreeModel
    BitLengthRole enum value (defined in DbcTreeModel)DbcTreeModel
    ByteOrder enum value (defined in DbcTreeModel)DbcTreeModel
    CanId enum value (defined in DbcTreeModel)DbcTreeModel
    CanIdRole enum value (defined in DbcTreeModel)DbcTreeModel
    Column enum name (defined in DbcTreeModel)DbcTreeModel
    columnCount(const QModelIndex &parent=QModelIndex()) const override (defined in DbcTreeModel)DbcTreeModel
    ColumnCount enum value (defined in DbcTreeModel)DbcTreeModel
    Comment enum value (defined in DbcTreeModel)DbcTreeModel
    CommentRole enum value (defined in DbcTreeModel)DbcTreeModel
    data(const QModelIndex &index, int role=Qt::DisplayRole) const override (defined in DbcTreeModel)DbcTreeModel
    DbcTreeModel(QObject *parent=nullptr) (defined in DbcTreeModel)DbcTreeModelexplicit
    ExtendedRole enum value (defined in DbcTreeModel)DbcTreeModel
    flags(const QModelIndex &index) const override (defined in DbcTreeModel)DbcTreeModel
    headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override (defined in DbcTreeModel)DbcTreeModel
    index(int row, int column, const QModelIndex &parent=QModelIndex()) const override (defined in DbcTreeModel)DbcTreeModel
    LittleEndianRole enum value (defined in DbcTreeModel)DbcTreeModel
    Name enum value (defined in DbcTreeModel)DbcTreeModel
    NodeTypeRole enum value (defined in DbcTreeModel)DbcTreeModel
    parent(const QModelIndex &child) const override (defined in DbcTreeModel)DbcTreeModel
    PayloadLength enum value (defined in DbcTreeModel)DbcTreeModel
    PayloadLengthRole enum value (defined in DbcTreeModel)DbcTreeModel
    Role enum name (defined in DbcTreeModel)DbcTreeModel
    rowCount(const QModelIndex &parent=QModelIndex()) const override (defined in DbcTreeModel)DbcTreeModel
    SetTree(std::unique_ptr< TreeNode > root) (defined in DbcTreeModel)DbcTreeModel
    Signed enum value (defined in DbcTreeModel)DbcTreeModel
    SignedRole enum value (defined in DbcTreeModel)DbcTreeModel
    StartBit enum value (defined in DbcTreeModel)DbcTreeModel
    StartBitRole enum value (defined in DbcTreeModel)DbcTreeModel
    Unit enum value (defined in DbcTreeModel)DbcTreeModel
    UnitRole enum value (defined in DbcTreeModel)DbcTreeModel
    ValueDescriptionsRole enum value (defined in DbcTreeModel)DbcTreeModel
    +
    + + + + diff --git a/docs/html/classDbcTreeModel.html b/docs/html/classDbcTreeModel.html new file mode 100644 index 0000000..1145b35 --- /dev/null +++ b/docs/html/classDbcTreeModel.html @@ -0,0 +1,506 @@ + + + + + + + +DBC Framework: DbcTreeModel Class Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    DBC Framework +
    +
    DBC parsing and CAN signal decoding framework
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    DbcTreeModel Class Reference
    +
    +
    + +

    #include <dbc_tree_model.h>

    +
    + + Inheritance diagram for DbcTreeModel:
    +
    +
    + + + + + + + +

    +Public Types

    enum  Column {
    +  Name +, CanId +, PayloadLength +, StartBit +,
    +  BitLength +, ByteOrder +, Signed +, Unit +,
    +  Comment +, ColumnCount +
    + }
     
    enum  Role {
    +  NodeTypeRole = Qt::UserRole + 1 +, CanIdRole +, PayloadLengthRole +, StartBitRole +,
    +  BitLengthRole +, LittleEndianRole +, SignedRole +, UnitRole +,
    +  CommentRole +, ValueDescriptionsRole +, ExtendedRole +
    + }
     
    + + + + + + + + + + + + + + + + + + + +

    +Public Member Functions

     DbcTreeModel (QObject *parent=nullptr)
     
    void SetTree (std::unique_ptr< TreeNode > root)
     
    QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
     
    QModelIndex parent (const QModelIndex &child) const override
     
    int rowCount (const QModelIndex &parent=QModelIndex()) const override
     
    int columnCount (const QModelIndex &parent=QModelIndex()) const override
     
    QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
     
    QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
     
    Qt::ItemFlags flags (const QModelIndex &index) const override
     
    +

    Detailed Description

    +

    Read-only model. Owns an immutable tree; all indexes expire on SetTree(). Use QPersistentModelIndex to observe reset invalidation. Call on the model thread.

    + +

    Definition at line 11 of file dbc_tree_model.h.

    +

    Member Enumeration Documentation

    + +

    ◆ Column

    + +
    +
    + + + + +
    enum DbcTreeModel::Column
    +
    + +

    Definition at line 13 of file dbc_tree_model.h.

    + +
    +
    + +

    ◆ Role

    + +
    +
    + + + + +
    enum DbcTreeModel::Role
    +
    + +

    Definition at line 24 of file dbc_tree_model.h.

    + +
    +
    +

    Constructor & Destructor Documentation

    + +

    ◆ DbcTreeModel()

    + +
    +
    + + + + + +
    + + + + + + + + +
    DbcTreeModel::DbcTreeModel (QObject * parent = nullptr)
    +
    +explicit
    +
    + +

    Definition at line 25 of file dbc_tree_model.cpp.

    + +
    +
    +

    Member Function Documentation

    + +

    ◆ SetTree()

    + +
    +
    + + + + + + + + +
    void DbcTreeModel::SetTree (std::unique_ptr< TreeNode > root)
    +
    + +

    Definition at line 27 of file dbc_tree_model.cpp.

    + +
    +
    + +

    ◆ index()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    QModelIndex DbcTreeModel::index (int row,
    int column,
    const QModelIndex & parent = QModelIndex() 
    ) const
    +
    +override
    +
    + +

    Definition at line 42 of file dbc_tree_model.cpp.

    + +
    +
    + +

    ◆ parent()

    + +
    +
    + + + + + +
    + + + + + + + + +
    QModelIndex DbcTreeModel::parent (const QModelIndex & child) const
    +
    +override
    +
    + +

    Definition at line 53 of file dbc_tree_model.cpp.

    + +
    +
    + +

    ◆ rowCount()

    + +
    +
    + + + + + +
    + + + + + + + + +
    int DbcTreeModel::rowCount (const QModelIndex & parent = QModelIndex()) const
    +
    +override
    +
    + +

    Definition at line 61 of file dbc_tree_model.cpp.

    + +
    +
    + +

    ◆ columnCount()

    + +
    +
    + + + + + +
    + + + + + + + + +
    int DbcTreeModel::columnCount (const QModelIndex & parent = QModelIndex()) const
    +
    +override
    +
    + +

    Definition at line 70 of file dbc_tree_model.cpp.

    + +
    +
    + +

    ◆ data()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    QVariant DbcTreeModel::data (const QModelIndex & index,
    int role = Qt::DisplayRole 
    ) const
    +
    +override
    +
    + +

    Definition at line 74 of file dbc_tree_model.cpp.

    + +
    +
    + +

    ◆ headerData()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    QVariant DbcTreeModel::headerData (int section,
    Qt::Orientation orientation,
    int role = Qt::DisplayRole 
    ) const
    +
    +override
    +
    + +

    Definition at line 138 of file dbc_tree_model.cpp.

    + +
    +
    + +

    ◆ flags()

    + +
    +
    + + + + + +
    + + + + + + + + +
    Qt::ItemFlags DbcTreeModel::flags (const QModelIndex & index) const
    +
    +override
    +
    + +

    Definition at line 145 of file dbc_tree_model.cpp.

    + +
    +
    +
    The documentation for this class was generated from the following files: +
    +
    + + + + diff --git a/docs/html/classDbcTreeModel__inherit__graph.map b/docs/html/classDbcTreeModel__inherit__graph.map new file mode 100644 index 0000000..4d37ee0 --- /dev/null +++ b/docs/html/classDbcTreeModel__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/html/classDbcTreeModel__inherit__graph.md5 b/docs/html/classDbcTreeModel__inherit__graph.md5 new file mode 100644 index 0000000..574063b --- /dev/null +++ b/docs/html/classDbcTreeModel__inherit__graph.md5 @@ -0,0 +1 @@ +967c95d0a3c851ca66fee7fa9f601b98 \ No newline at end of file diff --git a/docs/html/classDbcTreeModel__inherit__graph.svg b/docs/html/classDbcTreeModel__inherit__graph.svg new file mode 100644 index 0000000..bc27d3a --- /dev/null +++ b/docs/html/classDbcTreeModel__inherit__graph.svg @@ -0,0 +1,91 @@ + + + + + + + + + + + +DbcTreeModel + + +Node1 + + +DbcTreeModel +  ++ +DbcTreeModel() ++ +SetTree() ++ +index() ++ +parent() ++ +rowCount() ++ +columnCount() ++ +data() ++ +headerData() ++ +flags() + + + + + + + + +Node2 + + +QAbstractItemModel +  +  + + + + + + + + +Node2->Node1 + + + + + + + + + + + + + diff --git a/docs/html/classDbcTreeModel__inherit__graph_org.svg b/docs/html/classDbcTreeModel__inherit__graph_org.svg new file mode 100644 index 0000000..860b5d8 --- /dev/null +++ b/docs/html/classDbcTreeModel__inherit__graph_org.svg @@ -0,0 +1,66 @@ + + + + + + +DbcTreeModel + + +Node1 + + +DbcTreeModel +  ++ +DbcTreeModel() ++ +SetTree() ++ +index() ++ +parent() ++ +rowCount() ++ +columnCount() ++ +data() ++ +headerData() ++ +flags() + + + + + + + + +Node2 + + +QAbstractItemModel +  +  + + + + + + + + +Node2->Node1 + + + + + + + + diff --git a/docs/html/classDbcUnsupportedMultiplexingHandler-members.html b/docs/html/classDbcUnsupportedMultiplexingHandler-members.html new file mode 100644 index 0000000..17cc679 --- /dev/null +++ b/docs/html/classDbcUnsupportedMultiplexingHandler-members.html @@ -0,0 +1,110 @@ + + + + + + + +DBC Framework: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    DBC Framework +
    +
    DBC parsing and CAN signal decoding framework
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    DbcUnsupportedMultiplexingHandler Member List
    +
    +
    + +

    This is the complete list of members for DbcUnsupportedMultiplexingHandler, including all inherited members.

    + + + +
    Handle(const std::string &line, DbcParseContext &context) const override (defined in DbcUnsupportedMultiplexingHandler)DbcUnsupportedMultiplexingHandlervirtual
    ~DbcStatementHandler()=default (defined in DbcStatementHandler)DbcStatementHandlervirtual
    +
    + + + + diff --git a/docs/html/classDbcUnsupportedMultiplexingHandler.html b/docs/html/classDbcUnsupportedMultiplexingHandler.html new file mode 100644 index 0000000..e567583 --- /dev/null +++ b/docs/html/classDbcUnsupportedMultiplexingHandler.html @@ -0,0 +1,170 @@ + + + + + + + +DBC Framework: DbcUnsupportedMultiplexingHandler Class Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    DBC Framework +
    +
    DBC parsing and CAN signal decoding framework
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    DbcUnsupportedMultiplexingHandler Class Reference
    +
    +
    +
    + + Inheritance diagram for DbcUnsupportedMultiplexingHandler:
    +
    +
    + + + + + +

    +Public Member Functions

    void Handle (const std::string &line, DbcParseContext &context) const override
     
    +

    Detailed Description

    +
    +

    Definition at line 66 of file dbc_statement_handler.h.

    +

    Member Function Documentation

    + +

    ◆ Handle()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    void DbcUnsupportedMultiplexingHandler::Handle (const std::string & line,
    DbcParseContext & context 
    ) const
    +
    +overridevirtual
    +
    + +

    Implements DbcStatementHandler.

    + +

    Definition at line 442 of file dbc_statement_handler.cpp.

    + +
    +
    +
    The documentation for this class was generated from the following files: +
    +
    + + + + diff --git a/docs/html/classDbcUnsupportedMultiplexingHandler__inherit__graph.map b/docs/html/classDbcUnsupportedMultiplexingHandler__inherit__graph.map new file mode 100644 index 0000000..f041dc7 --- /dev/null +++ b/docs/html/classDbcUnsupportedMultiplexingHandler__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/html/classDbcUnsupportedMultiplexingHandler__inherit__graph.md5 b/docs/html/classDbcUnsupportedMultiplexingHandler__inherit__graph.md5 new file mode 100644 index 0000000..3fb8761 --- /dev/null +++ b/docs/html/classDbcUnsupportedMultiplexingHandler__inherit__graph.md5 @@ -0,0 +1 @@ +1ace6705ea51cc639d0122e87818555f \ No newline at end of file diff --git a/docs/html/classDbcUnsupportedMultiplexingHandler__inherit__graph.svg b/docs/html/classDbcUnsupportedMultiplexingHandler__inherit__graph.svg new file mode 100644 index 0000000..19a19bb --- /dev/null +++ b/docs/html/classDbcUnsupportedMultiplexingHandler__inherit__graph.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + +DbcUnsupportedMultiplexingHandler + + +Node1 + + +DbcUnsupportedMultiplexing +Handler +  ++ +Handle() + + + + + + + + +Node2 + + +DbcStatementHandler +  ++ +~DbcStatementHandler() ++ +Handle() + + + + + + + + +Node2->Node1 + + + + + + + + + + + + + diff --git a/docs/html/classDbcUnsupportedMultiplexingHandler__inherit__graph_org.svg b/docs/html/classDbcUnsupportedMultiplexingHandler__inherit__graph_org.svg new file mode 100644 index 0000000..80013e4 --- /dev/null +++ b/docs/html/classDbcUnsupportedMultiplexingHandler__inherit__graph_org.svg @@ -0,0 +1,54 @@ + + + + + + +DbcUnsupportedMultiplexingHandler + + +Node1 + + +DbcUnsupportedMultiplexing +Handler +  ++ +Handle() + + + + + + + + +Node2 + + +DbcStatementHandler +  ++ +~DbcStatementHandler() ++ +Handle() + + + + + + + + +Node2->Node1 + + + + + + + + diff --git a/docs/html/classDbcValueDescriptionHandler-members.html b/docs/html/classDbcValueDescriptionHandler-members.html new file mode 100644 index 0000000..5593ca2 --- /dev/null +++ b/docs/html/classDbcValueDescriptionHandler-members.html @@ -0,0 +1,110 @@ + + + + + + + +DBC Framework: Member List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    DBC Framework +
    +
    DBC parsing and CAN signal decoding framework
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    DbcValueDescriptionHandler Member List
    +
    +
    + +

    This is the complete list of members for DbcValueDescriptionHandler, including all inherited members.

    + + + +
    Handle(const std::string &line, DbcParseContext &context) const override (defined in DbcValueDescriptionHandler)DbcValueDescriptionHandlervirtual
    ~DbcStatementHandler()=default (defined in DbcStatementHandler)DbcStatementHandlervirtual
    +
    + + + + diff --git a/docs/html/classDbcValueDescriptionHandler.html b/docs/html/classDbcValueDescriptionHandler.html new file mode 100644 index 0000000..4ccac29 --- /dev/null +++ b/docs/html/classDbcValueDescriptionHandler.html @@ -0,0 +1,170 @@ + + + + + + + +DBC Framework: DbcValueDescriptionHandler Class Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    DBC Framework +
    +
    DBC parsing and CAN signal decoding framework
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    DbcValueDescriptionHandler Class Reference
    +
    +
    +
    + + Inheritance diagram for DbcValueDescriptionHandler:
    +
    +
    + + + + + +

    +Public Member Functions

    void Handle (const std::string &line, DbcParseContext &context) const override
     
    +

    Detailed Description

    +
    +

    Definition at line 61 of file dbc_statement_handler.h.

    +

    Member Function Documentation

    + +

    ◆ Handle()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    void DbcValueDescriptionHandler::Handle (const std::string & line,
    DbcParseContext & context 
    ) const
    +
    +overridevirtual
    +
    + +

    Implements DbcStatementHandler.

    + +

    Definition at line 394 of file dbc_statement_handler.cpp.

    + +
    +
    +
    The documentation for this class was generated from the following files: +
    +
    + + + + diff --git a/docs/html/classDbcValueDescriptionHandler__inherit__graph.map b/docs/html/classDbcValueDescriptionHandler__inherit__graph.map new file mode 100644 index 0000000..1ac2738 --- /dev/null +++ b/docs/html/classDbcValueDescriptionHandler__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/html/classDbcValueDescriptionHandler__inherit__graph.md5 b/docs/html/classDbcValueDescriptionHandler__inherit__graph.md5 new file mode 100644 index 0000000..70105ba --- /dev/null +++ b/docs/html/classDbcValueDescriptionHandler__inherit__graph.md5 @@ -0,0 +1 @@ +4e812f2e61b60e6fd25b2da8062e2440 \ No newline at end of file diff --git a/docs/html/classDbcValueDescriptionHandler__inherit__graph.svg b/docs/html/classDbcValueDescriptionHandler__inherit__graph.svg new file mode 100644 index 0000000..c479d6f --- /dev/null +++ b/docs/html/classDbcValueDescriptionHandler__inherit__graph.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + +DbcValueDescriptionHandler + + +Node1 + + +DbcValueDescriptionHandler +  ++ +Handle() + + + + + + + + +Node2 + + +DbcStatementHandler +  ++ +~DbcStatementHandler() ++ +Handle() + + + + + + + + +Node2->Node1 + + + + + + + + + + + + + diff --git a/docs/html/classDbcValueDescriptionHandler__inherit__graph_org.svg b/docs/html/classDbcValueDescriptionHandler__inherit__graph_org.svg new file mode 100644 index 0000000..f7bcebc --- /dev/null +++ b/docs/html/classDbcValueDescriptionHandler__inherit__graph_org.svg @@ -0,0 +1,53 @@ + + + + + + +DbcValueDescriptionHandler + + +Node1 + + +DbcValueDescriptionHandler +  ++ +Handle() + + + + + + + + +Node2 + + +DbcStatementHandler +  ++ +~DbcStatementHandler() ++ +Handle() + + + + + + + + +Node2->Node1 + + + + + + + + diff --git a/docs/html/classTreeNode-members.html b/docs/html/classTreeNode-members.html index 37f9ac6..1aca818 100644 --- a/docs/html/classTreeNode-members.html +++ b/docs/html/classTreeNode-members.html @@ -102,15 +102,17 @@ $(document).ready(function(){initNavTree('classTreeNode.html',''); initResizable GetChildCount() constTreeNode GetFrame() constTreeNode GetName() constTreeNode + GetParent() constTreeNode + GetRow() constTreeNode GetSignal() constTreeNode GetType() constTreeNode operator=(const TreeNode &)=delete (defined in TreeNode)TreeNode - operator=(TreeNode &&)=default (defined in TreeNode)TreeNode + operator=(TreeNode &&)=delete (defined in TreeNode)TreeNode TreeNode()TreeNode TreeNode(const FrameInfo &frame)TreeNodeexplicit TreeNode(const SignalInfo &signal)TreeNodeexplicit TreeNode(const TreeNode &)=delete (defined in TreeNode)TreeNode - TreeNode(TreeNode &&)=default (defined in TreeNode)TreeNode + TreeNode(TreeNode &&)=delete (defined in TreeNode)TreeNode ~TreeNode()=default (defined in TreeNode)TreeNode diff --git a/docs/html/classTreeNode.html b/docs/html/classTreeNode.html index 77daab8..8c47c7b 100644 --- a/docs/html/classTreeNode.html +++ b/docs/html/classTreeNode.html @@ -119,15 +119,19 @@ Public Member Functions TreeNode & operator= (const TreeNode &)=delete   - - TreeNode (TreeNode &&)=default -  - -TreeNode & operator= (TreeNode &&)=default -  + + TreeNode (TreeNode &&)=delete +  + +TreeNode & operator= (TreeNode &&)=delete +  void AddChild (std::unique_ptr< TreeNode > child)  Add child node.
      +const TreeNode * GetParent () const +  +std::size_t GetRow () const +  std::size_t GetChildCount () const  Get child count.
      @@ -275,6 +279,46 @@ Public Member Functions

    Definition at line 26 of file tree_node.cpp.

    + + + +

    ◆ GetParent()

    + +
    +
    + + + + + + + +
    const TreeNode * TreeNode::GetParent () const
    +
    +

    Non-owning parent; nullptr for a detached node or the root.

    + +

    Definition at line 68 of file tree_node.cpp.

    + +
    +
    + +

    ◆ GetRow()

    + +
    +
    + + + + + + + +
    std::size_t TreeNode::GetRow () const
    +
    +

    Zero-based sibling position; zero for a detached node or the root.

    + +

    Definition at line 72 of file tree_node.cpp.

    +
    @@ -295,7 +339,7 @@ Public Member Functions

    Get child count.

    Returns
    Number of children.
    -

    Definition at line 31 of file tree_node.cpp.

    +

    Definition at line 34 of file tree_node.cpp.

    @@ -324,7 +368,7 @@ Public Member Functions
    Returns
    Child pointer or nullptr if index is invalid.
    -

    Definition at line 35 of file tree_node.cpp.

    +

    Definition at line 38 of file tree_node.cpp.

    @@ -353,7 +397,7 @@ Public Member Functions
    Returns
    Child pointer or nullptr if index is invalid.
    -

    Definition at line 42 of file tree_node.cpp.

    +

    Definition at line 45 of file tree_node.cpp.

    @@ -375,7 +419,7 @@ Public Member Functions

    Get node type.

    Returns
    Node type.
    -

    Definition at line 49 of file tree_node.cpp.

    +

    Definition at line 52 of file tree_node.cpp.

    @@ -397,7 +441,7 @@ Public Member Functions

    Get display name.

    Returns
    Node name.
    -

    Definition at line 53 of file tree_node.cpp.

    +

    Definition at line 56 of file tree_node.cpp.

    @@ -419,7 +463,7 @@ Public Member Functions

    Get frame payload if node is frame.

    Returns
    Pointer to frame info or nullptr.
    -

    Definition at line 57 of file tree_node.cpp.

    +

    Definition at line 60 of file tree_node.cpp.

    @@ -441,7 +485,7 @@ Public Member Functions

    Get signal payload if node is signal.

    Returns
    Pointer to signal info or nullptr.
    -

    Definition at line 61 of file tree_node.cpp.

    +

    Definition at line 64 of file tree_node.cpp.

    diff --git a/docs/html/classTreeNode.js b/docs/html/classTreeNode.js index edfa15e..e8df1cf 100644 --- a/docs/html/classTreeNode.js +++ b/docs/html/classTreeNode.js @@ -4,6 +4,8 @@ var classTreeNode = [ "TreeNode", "classTreeNode.html#a8e38dd591d8801d7ee3a7dbad90c67fc", null ], [ "TreeNode", "classTreeNode.html#ab9f00f5253d56461bb2d420fd639c5ae", null ], [ "AddChild", "classTreeNode.html#a6161f2ebb92184eab4215d121870e788", null ], + [ "GetParent", "classTreeNode.html#aa48fbc17903eb8cfa40353e29f853c6f", null ], + [ "GetRow", "classTreeNode.html#ad501f97eeec7f7d3353bfae838fbb6a8", null ], [ "GetChildCount", "classTreeNode.html#abdd82460187dca8d3e5d66f5d5c529ea", null ], [ "GetChild", "classTreeNode.html#a4727ff801a2d1b9323c5ae50a35457a6", null ], [ "GetChild", "classTreeNode.html#a81047bd7d2a4cc96b9ef5e20d0d63b5f", null ], diff --git a/docs/html/classTypeFactory.html b/docs/html/classTypeFactory.html index 4f2e5a3..1d661ea 100644 --- a/docs/html/classTypeFactory.html +++ b/docs/html/classTypeFactory.html @@ -179,8 +179,8 @@ class TypeFactory< ClassId, BaseClass, Args >

    Registry-based facto

    factory.registerType<Derived1>("one");
    factory.registerType<Derived2>("two");
    -
    auto a = factory.create("one", 10);
    -
    auto b = factory.creator("two")(10); // advanced API: get creator function
    +
    std::shared_ptr<Base> a = factory.create("one", 10);
    +
    std::shared_ptr<Base> b = factory.creator("two")(10); // advanced API: get creator function
    (void)a->get();
    (void)b->get();
    diff --git a/docs/html/classes.html b/docs/html/classes.html index 4dcb402..7315037 100644 --- a/docs/html/classes.html +++ b/docs/html/classes.html @@ -93,15 +93,21 @@ $(document).ready(function(){initNavTree('classes.html',''); initResizable(); })
    Class Index
    -
    D | F | R | S | T
    +
    D | F | M | P | R | S | T
    D
    -
    DbcCommentHandler
    DbcDatabase
    DbcDecodeBuilder
    DbcDecoder
    DbcFrameHandler
    DbcParseContext
    DbcParser
    DbcSignalHandler
    DbcStatementDispatcher
    DbcStatementHandler
    DbcTreeBuilder
    DecodeDatabase
    DecodedFrameValue
    DecodedSignalValue
    DecodeFrame
    DecodeSignal
    +
    DbcCommentHandler
    DbcDatabase
    DbcDecodeBuilder
    DbcDecoder
    DbcFrameHandler
    DbcParseContext
    DbcParser
    DbcSignalHandler
    DbcStatementDispatcher
    DbcStatementHandler
    DbcTreeBuilder
    DbcTreeModel
    DbcUnsupportedMultiplexingHandler
    DbcValueDescriptionHandler
    DecodeDatabase
    DecodedFrameValue
    DecodedSignalValue
    DecodeFrame
    DecodeSignal
    F
    FrameInfo
    FrameKey
    FrameKeyHasher
    +
    M
    +
    Multiplexing
    +
    +
    P
    +
    PendingValueDescriptions
    +
    R
    RawCanFrame
    diff --git a/docs/html/dbc__coverage__test_8cpp_source.html b/docs/html/dbc__coverage__test_8cpp_source.html new file mode 100644 index 0000000..2606647 --- /dev/null +++ b/docs/html/dbc__coverage__test_8cpp_source.html @@ -0,0 +1,943 @@ + + + + + + + +DBC Framework: dbc_coverage_test.cpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    DBC Framework +
    +
    DBC parsing and CAN signal decoding framework
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    dbc_coverage_test.cpp
    +
    +
    +
    1// Additional regression coverage. Kept separate for review before the first run.
    + +
    3#include "dbc_decoder.h"
    +
    4#include "dbc_parser.h"
    +
    5#include "dbc_statement_handler.h"
    +
    6#include "dbc_tree_builder.h"
    +
    7#include "typefactory.h"
    +
    8#include <QTemporaryFile>
    +
    9#include <QtTest>
    +
    10#include <array>
    +
    11#include <limits>
    +
    12#include <stdexcept>
    +
    13
    +
    14namespace {
    +
    15 DbcDatabase ParseText(const std::string &text) {
    +
    16 QTemporaryFile file;
    +
    17 if (!file.open()) throw std::runtime_error("Cannot create DBC fixture");
    +
    18 if (file.write(text.data(), static_cast<qint64>(text.size())) != static_cast<qint64>(text.size()) || !file.flush())
    +
    19 throw std::runtime_error("Cannot write DBC fixture");
    +
    20 return DbcParser().ParseFile(file.fileName().toStdString());
    +
    21 }
    +
    22
    +
    23 DecodeDatabase SingleSignal(const DecodeSignal &signal) {
    +
    24 DecodeDatabase database;
    +
    25 DecodeFrame frame;
    +
    26 frame.canId = 17U;
    +
    27 frame.signals.push_back(signal);
    +
    28 database.frames.push_back(frame);
    +
    29 database.frameIndexByKey.emplace(FrameKey(17U, false), 0U);
    +
    30 return database;
    +
    31 }
    +
    32
    +
    33 // Independent reference: collect the visited bits first, then weight them.
    +
    34 // Motorola uses a linear MSB-first coordinate instead of sawtooth traversal.
    +
    35 std::uint64_t ReferenceExtract(const std::vector<std::uint8_t> &data,
    +
    36 ByteOrder order, unsigned start, unsigned length) {
    +
    37 std::uint64_t expected = 0;
    +
    38 for (unsigned i = 0; i < length; ++i) {
    +
    39 const unsigned coordinate = order == ByteOrder::Intel
    +
    40 ? start + i
    +
    41 : (start / 8U) * 8U + (7U - start % 8U) + i;
    +
    42 const unsigned bit = order == ByteOrder::Intel ? coordinate % 8U : 7U - coordinate % 8U;
    +
    43 const unsigned weight = order == ByteOrder::Intel ? i : length - 1U - i;
    +
    44 expected |= std::uint64_t((data.at(coordinate / 8U) >> bit) & 1U) << weight;
    +
    45 }
    +
    46 return expected;
    +
    47 }
    +
    48
    +
    49 struct FactoryBase {
    +
    50 virtual ~FactoryBase() = default;
    +
    51 virtual int Value() const = 0;
    +
    52 };
    +
    53 struct FactoryFirst : FactoryBase {
    +
    54 explicit FactoryFirst(std::unique_ptr<int> value) : value(std::move(value)) {}
    +
    55 int Value() const override { return *value; }
    +
    56 std::unique_ptr<int> value;
    +
    57 };
    +
    58 struct FactorySecond : FactoryFirst {
    +
    59 using FactoryFirst::FactoryFirst;
    +
    60 int Value() const override { return *value + 1; }
    +
    61 };
    +
    62}// namespace
    +
    63
    +
    64class CoverageTest : public QObject {
    +
    65 Q_OBJECT
    +
    66private Q_SLOTS:
    +
    67 void frameLookup();
    +
    68 void signedBoundaries_data();
    +
    69 void signedBoundaries();
    +
    70 void extraction_data();
    +
    71 void extraction();
    +
    72 void invalidSignalStatus_data();
    +
    73 void invalidSignalStatus();
    +
    74 void malformedRuntimeMultiplexing_data();
    +
    75 void malformedRuntimeMultiplexing();
    +
    76 void pgn_data();
    +
    77 void pgn();
    +
    78 void comments_data();
    +
    79 void comments();
    +
    80 void ignoredCommentStatements_data();
    +
    81 void ignoredCommentStatements();
    +
    82 void ambiguousValueReferences_data();
    +
    83 void ambiguousValueReferences();
    +
    84 void valueReferenceScope();
    +
    85 void fileFormatting_data();
    +
    86 void fileFormatting();
    +
    87 void missingFile();
    +
    88 void builders();
    +
    89 void physicalConversion_data();
    +
    90 void physicalConversion();
    +
    91 void multiplexingScenarios();
    +
    92 void multiplexingErrorLocations_data();
    +
    93 void multiplexingErrorLocations();
    +
    94 void escapedValueDescriptions();
    +
    95 void factory();
    +
    96};
    +
    97
    +
    98void CoverageTest::frameLookup() {
    +
    99 DbcDecoder decoder;
    +
    100 RawCanFrame raw;
    +
    101 raw.canId = 17U;
    +
    102 DecodeDatabase empty;
    +
    103 QVERIFY(decoder.FindFrame(empty, 17U, false) == nullptr);
    +
    104 const DecodedFrameValue absent = decoder.Decode(empty, raw);
    +
    105 QVERIFY(!absent.valid);
    +
    106 QVERIFY(absent.definition == nullptr);
    +
    107 QVERIFY(absent.signals.empty());
    +
    108 DecodeSignal signal;
    +
    109 DecodeDatabase database = SingleSignal(signal);
    +
    110 QVERIFY(decoder.FindFrame(database, 18U, false) == nullptr);
    +
    111 QVERIFY(decoder.FindFrame(database, 17U, true) == nullptr);
    +
    112 raw.isExtended = true;
    +
    113 QVERIFY(!decoder.Decode(database, raw).valid);
    +
    114 raw.isExtended = false;
    +
    115 raw.canId = 18U;
    +
    116 QVERIFY(!decoder.Decode(database, raw).valid);
    +
    117 raw.canId = 17U;
    +
    118 database.frameIndexByKey.at(FrameKey(17U, false)) = database.frames.size();
    +
    119 QVERIFY(decoder.FindFrame(database, 17U, false) == nullptr);
    +
    120 QVERIFY(!decoder.Decode(database, raw).valid);
    +
    121 database.frameIndexByKey.at(FrameKey(17U, false)) = 0U;
    +
    122 database.frames[0].signals.clear();
    +
    123 const DecodedFrameValue matched = decoder.Decode(database, raw);
    +
    124 QVERIFY(matched.valid);
    +
    125 QCOMPARE(matched.definition, &database.frames[0]);
    +
    126 QVERIFY(matched.signals.empty());
    +
    127}
    +
    128
    +
    129void CoverageTest::signedBoundaries_data() {
    +
    130 QTest::addColumn<int>("order");
    +
    131 QTest::addColumn<unsigned>("length");
    +
    132 QTest::addColumn<qlonglong>("expected");
    +
    133 for (int order = 0; order < 2; ++order) {
    +
    134 for (unsigned length: {1U, 2U, 7U, 8U, 31U, 32U, 63U}) {
    +
    135 const std::int64_t half = std::int64_t(1) << (length - 1U);
    +
    136 const std::array<std::int64_t, 4> values{{0, -1, -half, half - 1}};
    +
    137 for (unsigned index = 0; index < values.size(); ++index) {
    +
    138 const QByteArray name = QByteArray::number(order) + "-" + QByteArray::number(length) + "-" + QByteArray::number(index);
    +
    139 QTest::newRow(name.constData()) << order << length << qlonglong(values[index]);
    +
    140 }
    +
    141 }
    +
    142 }
    +
    143}
    +
    144
    +
    145void CoverageTest::signedBoundaries() {
    +
    146 QFETCH(int, order);
    +
    147 QFETCH(unsigned, length);
    +
    148 QFETCH(qlonglong, expected);
    +
    149 DecodeSignal signal;
    +
    150 signal.byteOrder = order == 0 ? ByteOrder::Intel : ByteOrder::Motorola;
    +
    151 signal.startBit = order == 0 ? 0U : 7U;
    +
    152 signal.length = length;
    +
    153 signal.valueType = ValueType::Signed;
    +
    154 RawCanFrame raw;
    +
    155 raw.canId = 17U;
    +
    156 raw.data.assign(8U, 0U);
    +
    157 const std::uint64_t bits = static_cast<std::uint64_t>(expected);
    +
    158 for (unsigned i = 0; i < length; ++i) {
    +
    159 const unsigned weight = order == 0 ? i : length - 1U - i;
    +
    160 const unsigned position = order == 0 ? i % 8U : 7U - i % 8U;
    +
    161 raw.data[i / 8U] |= static_cast<std::uint8_t>(((bits >> weight) & 1U) << position);
    +
    162 }
    +
    163 const DecodeDatabase database = SingleSignal(signal);
    +
    164 const DecodedFrameValue result = DbcDecoder().Decode(database, raw);
    +
    165 QVERIFY(result.signals[0].valid);
    +
    166 QVERIFY(std::holds_alternative<std::int64_t>(result.signals[0].rawValue));
    +
    167 QCOMPARE(std::get<std::int64_t>(result.signals[0].rawValue), static_cast<std::int64_t>(expected));
    +
    168}
    +
    169
    +
    170void CoverageTest::extraction_data() {
    +
    171 QTest::addColumn<int>("order");
    +
    172 QTest::addColumn<unsigned>("start");
    +
    173 QTest::addColumn<unsigned>("length");
    +
    174 for (int order = 0; order < 2; ++order)
    +
    175 for (unsigned start = 0; start < 16U; ++start)
    +
    176 for (unsigned length = 1; length <= 64U; ++length) {
    +
    177 const QByteArray name = QByteArray::number(order) + "-" + QByteArray::number(start) + "-" + QByteArray::number(length);
    +
    178 QTest::newRow(name.constData()) << order << start << length;
    +
    179 }
    +
    180}
    +
    181
    +
    182void CoverageTest::extraction() {
    +
    183 QFETCH(int, order);
    +
    184 QFETCH(unsigned, start);
    +
    185 QFETCH(unsigned, length);
    +
    186 DecodeSignal signal;
    +
    187 signal.byteOrder = order == 0 ? ByteOrder::Intel : ByteOrder::Motorola;
    +
    188 signal.startBit = start;
    +
    189 signal.length = length;
    +
    190 const DecodeDatabase database = SingleSignal(signal);
    +
    191 RawCanFrame raw;
    +
    192 raw.canId = 17U;
    +
    193 const std::vector<std::vector<std::uint8_t>> patterns = {
    +
    194 std::vector<std::uint8_t>(10U, 0U),
    +
    195 std::vector<std::uint8_t>(10U, 255U),
    +
    196 {0xA5, 0x3C, 0x81, 0x7E, 0x12, 0xD4, 0x69, 0xB0, 0x5A, 0xC3}};
    +
    197 for (const std::vector<std::uint8_t> &data: patterns) {
    +
    198 raw.data = data;
    +
    199 const unsigned firstCoordinate = order == 0 ? start : (start / 8U) * 8U + 7U - start % 8U;
    +
    200 raw.data.resize((firstCoordinate + length + 7U) / 8U);
    +
    201 const DecodedFrameValue decoded = DbcDecoder().Decode(database, raw);
    +
    202 QVERIFY(decoded.signals[0].valid);
    +
    203 QCOMPARE(std::get<std::uint64_t>(decoded.signals[0].rawValue), ReferenceExtract(data, signal.byteOrder, start, length));
    +
    204 }
    +
    205}
    +
    206
    +
    207void CoverageTest::invalidSignalStatus_data() {
    +
    208 QTest::addColumn<int>("order");
    +
    209 QTest::addColumn<unsigned>("start");
    +
    210 QTest::addColumn<unsigned>("length");
    +
    211 QTest::addColumn<unsigned>("bytes");
    +
    212 QTest::addColumn<int>("status");
    +
    213 for (int order = 0; order < 2; ++order) {
    +
    214 const unsigned start = order == 0 ? 0U : 7U;
    +
    215 const QByteArray prefix = QByteArray::number(order);
    +
    216 QTest::newRow((prefix + "-zero").constData()) << order << start << 0U << 1U << int(SignalDecodeStatus::InvalidDefinition);
    +
    217 QTest::newRow((prefix + "-65").constData()) << order << start << 65U << 9U << int(SignalDecodeStatus::InvalidDefinition);
    +
    218 QTest::newRow((prefix + "-empty").constData()) << order << start << 8U << 0U << int(SignalDecodeStatus::InsufficientPayload);
    +
    219 QTest::newRow((prefix + "-short").constData()) << order << start << 16U << 1U << int(SignalDecodeStatus::InsufficientPayload);
    +
    220 QTest::newRow((prefix + "-large-start").constData()) << order << std::numeric_limits<unsigned>::max() << 8U << 1U << int(SignalDecodeStatus::InsufficientPayload);
    +
    221 }
    +
    222}
    +
    223
    +
    224void CoverageTest::invalidSignalStatus() {
    +
    225 QFETCH(int, order);
    +
    226 QFETCH(unsigned, start);
    +
    227 QFETCH(unsigned, length);
    +
    228 QFETCH(unsigned, bytes);
    +
    229 QFETCH(int, status);
    +
    230 DecodeSignal signal;
    +
    231 signal.startBit = start;
    +
    232 signal.length = length;
    +
    233 signal.byteOrder = order == 0 ? ByteOrder::Intel : ByteOrder::Motorola;
    +
    234 const DecodeDatabase database = SingleSignal(signal);
    +
    235 RawCanFrame raw;
    +
    236 raw.canId = 17U;
    +
    237 raw.data.assign(bytes, 255U);
    +
    238 const DecodedFrameValue decoded = DbcDecoder().Decode(database, raw);
    +
    239 QVERIFY(decoded.valid);
    +
    240 QVERIFY(!decoded.signals[0].valid);
    +
    241 QCOMPARE(int(decoded.signals[0].status), status);
    +
    242 QVERIFY(decoded.signals[0].GetValueDescription() == nullptr);
    +
    243}
    +
    244
    +
    245void CoverageTest::malformedRuntimeMultiplexing_data() {
    +
    246 QTest::addColumn<int>("kind");
    +
    247 QTest::newRow("two-selectors") << 0;
    +
    248 QTest::newRow("signed-selector") << 1;
    +
    249 QTest::newRow("65-bit-selector") << 2;
    +
    250 QTest::newRow("branch-out-of-range") << 3;
    +
    251}
    +
    252
    +
    253void CoverageTest::malformedRuntimeMultiplexing() {
    +
    254 QFETCH(int, kind);
    +
    255 DecodeSignal selector;
    +
    256 selector.length = 1U;
    +
    257 selector.multiplexing.role = MultiplexRole::Selector;
    +
    258 DecodeDatabase database = SingleSignal(selector);
    +
    259 DecodeSignal branch;
    +
    260 branch.startBit = 8U;
    +
    261 branch.length = 8U;
    +
    262 branch.multiplexing.role = MultiplexRole::Branch;
    +
    263 branch.multiplexing.value = 1U;
    +
    264 database.frames[0].signals.push_back(branch);
    +
    265 DecodeSignal ordinary;
    +
    266 ordinary.startBit = 16U;
    +
    267 ordinary.length = 8U;
    +
    268 database.frames[0].signals.push_back(ordinary);
    +
    269 if (kind == 0) database.frames[0].signals.push_back(selector);
    +
    270 if (kind == 1) database.frames[0].signals[0].valueType = ValueType::Signed;
    +
    271 if (kind == 2) database.frames[0].signals[0].length = 65U;
    +
    272 if (kind == 3) database.frames[0].signals[1].multiplexing.value = 2U;
    +
    273 RawCanFrame raw;
    +
    274 raw.canId = 17U;
    +
    275 raw.data = {1U, 42U, 99U};
    +
    276 const DecodedFrameValue result = DbcDecoder().Decode(database, raw);
    +
    277 QCOMPARE(int(result.signals[1].status), int(SignalDecodeStatus::InvalidDefinition));
    +
    278 QVERIFY(!result.signals[1].valid);
    +
    279 QVERIFY(result.signals[2].valid);
    +
    280 QCOMPARE(std::get<std::uint64_t>(result.signals[2].rawValue), std::uint64_t(99));
    +
    281 if (kind != 3) {
    +
    282 QCOMPARE(int(result.signals[0].status), int(SignalDecodeStatus::InvalidDefinition));
    +
    283 if (kind == 0) QCOMPARE(int(result.signals[3].status), int(SignalDecodeStatus::InvalidDefinition));
    +
    284 }
    +
    285}
    +
    286
    +
    287void CoverageTest::pgn_data() {
    +
    288 QTest::addColumn<unsigned>("id");
    +
    289 QTest::addColumn<unsigned>("expected");
    +
    290 QTest::addColumn<bool>("hasPgn");
    +
    291 QTest::newRow("standard") << 0x7FFU << 0U << false;
    +
    292 for (unsigned dp: {0U, 1U})
    +
    293 for (unsigned pf: {239U, 240U})
    +
    294 for (unsigned ps: {0U, 0xABU}) {
    +
    295 const unsigned id = 0x80000000U | (dp << 24U) | (pf << 16U) | (ps << 8U) | 0x42U;
    +
    296 const unsigned expected = (dp << 16U) | (pf == 239U ? 0xEF00U : 0xF000U | ps);
    +
    297 const QByteArray name = QByteArray::number(dp) + "-" + QByteArray::number(pf) + "-" + QByteArray::number(ps);
    +
    298 QTest::newRow(name.constData()) << id << expected << true;
    +
    299 }
    +
    300}
    +
    301
    +
    302void CoverageTest::pgn() {
    +
    303 QFETCH(unsigned, id);
    +
    304 QFETCH(unsigned, expected);
    +
    305 QFETCH(bool, hasPgn);
    +
    306 const DbcDatabase parsed = ParseText("BO_ " + std::to_string(id) + " Frame: 8 ECU\n");
    +
    307 QCOMPARE(parsed.frames[0].hasPgn, hasPgn);
    +
    308 QCOMPARE(parsed.frames[0].pgn, expected);
    +
    309}
    +
    310
    +
    311void CoverageTest::comments_data() {
    +
    312 QTest::addColumn<QString>("before");
    +
    313 QTest::addColumn<QString>("after");
    +
    314 QTest::addColumn<QString>("frameComment");
    +
    315 QTest::addColumn<QString>("signalComment");
    +
    316 QTest::newRow("tabs") << QString::fromUtf8("") << QString::fromUtf8("CM_\tBO_ 1 \"Frame\";\nCM_\tSG_ 1 State \"Signal\";\n") << QString::fromUtf8("Frame") << QString::fromUtf8("Signal");
    +
    317 QTest::newRow("empty-overwrite") << QString::fromUtf8("") << QString::fromUtf8("CM_ BO_ 1 \"Old\";\nCM_ BO_ 1 \"\";\nCM_ SG_ 1 State \"Old\";\nCM_ SG_ 1 State \"\";\n") << QString::fromUtf8("") << QString::fromUtf8("");
    +
    318 QTest::newRow("last-wins") << QString::fromUtf8("") << QString::fromUtf8("CM_ BO_ 1 \"First\";\nCM_ BO_ 1 \"Last\";\nCM_ SG_ 1 State \"First\";\nCM_ SG_ 1 State \"Last\";\n") << QString::fromUtf8("Last") << QString::fromUtf8("Last");
    +
    319 QTest::newRow("missing-targets") << QString::fromUtf8("") << QString::fromUtf8("CM_ BO_ 2 \"Unknown\";\nCM_ SG_ 2 State \"Unknown\";\nCM_ SG_ 1 Missing \"Unknown\";\n") << QString::fromUtf8("") << QString::fromUtf8("");
    +
    320 // Current documented limitation: comments resolve only already parsed targets.
    +
    321 QTest::newRow("before-definitions") << QString::fromUtf8("CM_ BO_ 1 \"Early\";\nCM_ SG_ 1 State \"Early\";\n") << QString::fromUtf8("") << QString::fromUtf8("") << QString::fromUtf8("");
    +
    322 QTest::newRow("missing-quotes") << QString::fromUtf8("") << QString::fromUtf8("CM_ BO_ 1 Missing;\nCM_ SG_ 1 State \"Unclosed;\n") << QString::fromUtf8("") << QString::fromUtf8("");
    +
    323}
    +
    324
    +
    325void CoverageTest::comments() {
    +
    326 QFETCH(QString, before);
    +
    327 QFETCH(QString, after);
    +
    328 QFETCH(QString, frameComment);
    +
    329 QFETCH(QString, signalComment);
    +
    330 const DbcDatabase parsed = ParseText(before.toStdString() + "BO_ 1 Frame: 1 ECU\nSG_ State : 0|8@1+ (1,0) [0|255] \"\" ECU\n" + after.toStdString());
    +
    331 QCOMPARE(parsed.frames[0].comment, frameComment.toStdString());
    +
    332 QCOMPARE(parsed.frames[0].signals[0].comment, signalComment.toStdString());
    +
    333}
    +
    334
    +
    335void CoverageTest::ignoredCommentStatements_data() {
    +
    336 QTest::addColumn<QString>("statement");
    +
    337 QTest::newRow("empty") << QString();
    +
    338 QTest::newRow("wrong-keyword") << QStringLiteral("OTHER_ BO_ 1 \"Ignored\";");
    +
    339 QTest::newRow("keyword-prefix") << QStringLiteral("CM_OTHER BO_ 1 \"Ignored\";");
    +
    340 QTest::newRow("frame-without-cm") << QStringLiteral("BO_ 1 \"Ignored\";");
    +
    341 QTest::newRow("missing-subtype") << QStringLiteral("CM_");
    +
    342 QTest::newRow("global-comment") << QStringLiteral("CM_ \"Ignored\";");
    +
    343 QTest::newRow("node-comment") << QStringLiteral("CM_ BU_ ECU \"Ignored\";");
    +
    344 QTest::newRow("environment-comment") << QStringLiteral("CM_ EV_ State \"Ignored\";");
    +
    345 QTest::newRow("unknown-subtype") << QStringLiteral("CM_ OTHER_ 1 \"Ignored\";");
    +
    346}
    +
    347
    +
    348void CoverageTest::ignoredCommentStatements() {
    +
    349 QFETCH(QString, statement);
    +
    350 DbcDatabase database;
    +
    351 FrameInfo frame;
    +
    352 frame.canId = 1U;
    +
    353 frame.name = "Frame";
    +
    354 frame.comment = "Existing frame comment";
    +
    355 SignalInfo signal;
    +
    356 signal.name = "State";
    +
    357 signal.comment = "Existing signal comment";
    +
    358 frame.signals.push_back(signal);
    +
    359 database.frames.push_back(frame);
    +
    360 DbcParseContext context{database, &database.frames[0]};
    +
    361
    +
    362 // The handler is public: callers may bypass keyword dispatch. Ignored input
    +
    363 // must preserve existing metadata, including comments already assigned.
    +
    364 DbcCommentHandler().Handle(statement.toStdString(), context);
    +
    365 QCOMPARE(database.frames.size(), std::size_t(1));
    +
    366 QCOMPARE(database.frames[0].canId, 1U);
    +
    367 QCOMPARE(database.frames[0].name, frame.name);
    +
    368 QCOMPARE(database.frames[0].comment, frame.comment);
    +
    369 QCOMPARE(database.frames[0].signals.size(), std::size_t(1));
    +
    370 QCOMPARE(database.frames[0].signals[0].name, signal.name);
    +
    371 QCOMPARE(database.frames[0].signals[0].comment, signal.comment);
    +
    372 QCOMPARE(context.currentFrame, &database.frames[0]);
    +
    373}
    +
    374
    +
    375void CoverageTest::ambiguousValueReferences_data() {
    +
    376 QTest::addColumn<bool>("duplicateFrames");
    +
    377 QTest::addColumn<bool>("extended");
    +
    378 QTest::newRow("duplicate-standard-frames") << true << false;
    +
    379 QTest::newRow("duplicate-extended-frames") << true << true;
    +
    380 QTest::newRow("duplicate-signals-in-standard-frame") << false << false;
    +
    381 QTest::newRow("duplicate-signals-in-extended-frame") << false << true;
    +
    382}
    +
    383
    +
    384void CoverageTest::ambiguousValueReferences() {
    +
    385 QFETCH(bool, duplicateFrames);
    +
    386 QFETCH(bool, extended);
    +
    387 DbcDatabase database;
    +
    388 FrameInfo frame;
    +
    389 frame.canId = 1U;
    +
    390 frame.name = "Frame";
    +
    391 frame.isExtended = extended;
    +
    392 SignalInfo signal;
    +
    393 signal.name = "State";
    +
    394 frame.signals.push_back(signal);
    +
    395 if (!duplicateFrames) frame.signals.push_back(signal);
    +
    396 database.frames.push_back(frame);
    +
    397 if (duplicateFrames) database.frames.push_back(frame);
    +
    398
    +
    399 // ParseFile rejects duplicate definitions earlier. Construct the database
    +
    400 // through the public metadata API to exercise the resolver's own checks.
    +
    401 DbcParseContext context{database, nullptr};
    +
    402 context.lineNumber = 37U;
    +
    403 const std::string rawId = extended ? "2147483649" : "1";
    +
    404 DbcValueDescriptionHandler().Handle("VAL_ " + rawId + " State 0 \"Off\";", context);
    +
    405 QCOMPARE(context.pendingValues.size(), std::size_t(1));
    +
    406 QCOMPARE(context.pendingValues[0].lineNumber, std::size_t(37));
    +
    407 const std::string path = "manual database.dbc";
    +
    408 try {
    +
    409 context.ResolveValueDescriptions(path);
    +
    410 QFAIL("The resolver must reject an ambiguous target");
    +
    411 } catch (const std::runtime_error &error) {
    +
    412 const std::string message = duplicateFrames ? "Ambiguous VAL_ frame reference."
    +
    413 : "Ambiguous VAL_ signal reference: State";
    +
    414 QCOMPARE(std::string(error.what()), path + ":37: " + message);
    +
    415 }
    +
    416 // Ambiguity must be detected before applying any descriptions.
    +
    417 for (const FrameInfo &candidate: database.frames)
    +
    418 for (const SignalInfo &candidateSignal: candidate.signals)
    +
    419 QVERIFY(candidateSignal.valueDescriptions.empty());
    +
    420}
    +
    421
    +
    422void CoverageTest::valueReferenceScope() {
    +
    423 DbcDatabase database;
    +
    424 FrameInfo frame;
    +
    425 frame.canId = 1U;
    +
    426 SignalInfo signal;
    +
    427 signal.name = "State";
    +
    428 frame.signals.push_back(signal);
    +
    429 database.frames.push_back(frame);
    +
    430 frame.isExtended = true;
    +
    431 database.frames.push_back(frame);
    +
    432 frame.canId = 2U;
    +
    433 frame.isExtended = false;
    +
    434 database.frames.push_back(frame);
    +
    435
    +
    436 DbcParseContext context{database, nullptr};
    +
    437 const DbcValueDescriptionHandler handler;
    +
    438 context.lineNumber = 3U;
    +
    439 handler.Handle("VAL_ 1 State 0 \"Standard\";", context);
    +
    440 context.lineNumber = 7U;
    +
    441 handler.Handle("VAL_ 2147483649 State 0 \"Extended\";", context);
    +
    442 context.ResolveValueDescriptions("manual database.dbc");
    +
    443
    +
    444 const std::string *standard = FindValueDescription(database.frames[0].signals[0].valueDescriptions, std::uint64_t(0));
    +
    445 const std::string *extended = FindValueDescription(database.frames[1].signals[0].valueDescriptions, std::uint64_t(0));
    +
    446 QVERIFY(standard != nullptr);
    +
    447 QVERIFY(extended != nullptr);
    +
    448 QCOMPARE(*standard, std::string("Standard"));
    +
    449 QCOMPARE(*extended, std::string("Extended"));
    +
    450 QVERIFY(database.frames[2].signals[0].valueDescriptions.empty());
    +
    451}
    +
    452
    +
    453void CoverageTest::fileFormatting_data() {
    +
    454 QTest::addColumn<QString>("text");
    +
    455 QTest::addColumn<unsigned>("frames");
    +
    456 QTest::newRow("empty") << QString::fromUtf8("") << 0U;
    +
    457 QTest::newRow("whitespace") << QString::fromUtf8(" \t\r\n\n\t") << 0U;
    +
    458 QTest::newRow("unknown-only") << QString::fromUtf8("VERSION \"test\"\nBU_: ECU\nUNKNOWN_ data\n") << 0U;
    +
    459 QTest::newRow("no-final-newline") << QString::fromUtf8("BO_ 1 Frame: 1 ECU\nSG_ State : 0|8@1+ (1,0) [0|255] \"\" ECU") << 1U;
    +
    460 QTest::newRow("crlf") << QString::fromUtf8("\r\nBO_ 1 Frame: 1 ECU\r\nSG_ State : 0|8@1+ (1,0) [0|255] \"\" ECU\r\nCM_ BO_ 1 \"Comment\";\r\nVAL_ 1 State 0 \"Off\";\r\n") << 1U;
    +
    461}
    +
    462
    +
    463void CoverageTest::fileFormatting() {
    +
    464 QFETCH(QString, text);
    +
    465 QFETCH(unsigned, frames);
    +
    466 const DbcDatabase parsed = ParseText(text.toStdString());
    +
    467 QCOMPARE(parsed.frames.size(), std::size_t(frames));
    +
    468 if (frames) {
    +
    469 QCOMPARE(parsed.frames[0].signals.size(), std::size_t(1));
    +
    470 if (text.contains("\r\nBO_")) {
    +
    471 QCOMPARE(parsed.frames[0].comment, std::string("Comment"));
    +
    472 const std::string *description = FindValueDescription(parsed.frames[0].signals[0].valueDescriptions, std::uint64_t(0));
    +
    473 QVERIFY(description != nullptr);
    +
    474 QCOMPARE(*description, std::string("Off"));
    +
    475 }
    +
    476 }
    +
    477}
    +
    478
    +
    479void CoverageTest::missingFile() {
    +
    480 QTemporaryFile file;
    +
    481 QVERIFY(file.open());
    +
    482 const QString path = file.fileName();
    +
    483 QVERIFY(file.remove());
    +
    484 try {
    +
    485 DbcParser().ParseFile(path.toStdString());
    +
    486 QFAIL("Missing file must throw");
    +
    487 } catch (const std::runtime_error &error) {
    +
    488 QCOMPARE(std::string(error.what()), "Failed to open DBC file: " + path.toStdString());
    +
    489 }
    +
    490}
    +
    491
    +
    492void CoverageTest::builders() {
    +
    493 const DecodeDatabase emptyRuntime = DbcDecodeBuilder().Build(DbcDatabase());
    +
    494 QVERIFY(emptyRuntime.frames.empty());
    +
    495 QVERIFY(emptyRuntime.frameIndexByKey.empty());
    +
    496 const std::unique_ptr<TreeNode> emptyTree = DbcTreeBuilder().Build(DbcDatabase());
    +
    497 QCOMPARE(emptyTree->GetType(), NodeType::Root);
    +
    498 QCOMPARE(emptyTree->GetName(), std::string("dbc"));
    +
    499 QCOMPARE(emptyTree->GetChildCount(), std::size_t(0));
    +
    500 QVERIFY(emptyTree->GetFrame() == nullptr && emptyTree->GetSignal() == nullptr);
    +
    501 const DbcDatabase expected = ParseText(
    +
    502 "BO_ 256 Standard: 3 ECU1\n"
    +
    503 "SG_ Mode M : 0|8@1+ (2,3) [0|513] \"mode\" ECU1,ECU2\n"
    +
    504 "SG_ Branch m1 : 15|8@0- (-2,5) [-249|261] \"rpm\" ECU2,ECU3\n"
    +
    505 "SG_ Always : 16|8@1+ (0.25,-1) [-1|62.75] \"V\" ECU3\n"
    +
    506 "CM_ BO_ 256 \"Frame comment\";\nCM_ SG_ 256 Branch \"Branch comment\";\n"
    +
    507 "VAL_ 256 Branch -1 \"Negative\" 1 \"Positive\";\n"
    +
    508 "BO_ 2163212866 Extended: 8 ECU4\n");
    +
    509 DecodeDatabase runtime;
    +
    510 std::unique_ptr<TreeNode> tree;
    +
    511 {
    +
    512 DbcDatabase source = expected;
    +
    513 runtime = DbcDecodeBuilder().Build(source);
    +
    514 tree = DbcTreeBuilder().Build(source);
    +
    515 source.frames[0].name = "Changed";
    +
    516 source.frames[0].signals[1].receivers.clear();
    +
    517 source.frames[0].signals[1].valueDescriptions.clear();
    +
    518 source.frames.clear();
    +
    519 }
    +
    520 QCOMPARE(runtime.frames.size(), expected.frames.size());
    +
    521 QCOMPARE(tree->GetChildCount(), expected.frames.size());
    +
    522 QCOMPARE(runtime.frameIndexByKey.size(), expected.frames.size());
    +
    523 for (std::size_t i = 0; i < expected.frames.size(); ++i) {
    +
    524 const FrameInfo &frame = expected.frames[i];
    +
    525 const DecodeFrame &decodedFrame = runtime.frames[i];
    +
    526 const TreeNode *node = tree->GetChild(i);
    +
    527 QVERIFY(node && node->GetFrame());
    +
    528 QCOMPARE(node->GetType(), NodeType::Frame);
    +
    529 QCOMPARE(node->GetName(), frame.name);
    +
    530 QVERIFY(node->GetSignal() == nullptr);
    +
    531 QCOMPARE(runtime.frameIndexByKey.at(FrameKey(frame.canId, frame.isExtended)), i);
    +
    532 const FrameInfo &copied = *node->GetFrame();
    +
    533 QCOMPARE(copied.name, frame.name);
    +
    534 QCOMPARE(decodedFrame.name, frame.name);
    +
    535 QCOMPARE(copied.canId, frame.canId);
    +
    536 QCOMPARE(decodedFrame.canId, frame.canId);
    +
    537 QCOMPARE(copied.isExtended, frame.isExtended);
    +
    538 QCOMPARE(decodedFrame.isExtended, frame.isExtended);
    +
    539 QCOMPARE(copied.dlc, frame.dlc);
    +
    540 QCOMPARE(decodedFrame.dlc, frame.dlc);
    +
    541 QCOMPARE(copied.pgn, frame.pgn);
    +
    542 QCOMPARE(decodedFrame.pgn, frame.pgn);
    +
    543 QCOMPARE(copied.hasPgn, frame.hasPgn);
    +
    544 QCOMPARE(decodedFrame.hasPgn, frame.hasPgn);
    +
    545 QCOMPARE(copied.transmitter, frame.transmitter);
    +
    546 QCOMPARE(decodedFrame.transmitter, frame.transmitter);
    +
    547 QCOMPARE(copied.comment, frame.comment);
    +
    548 QCOMPARE(decodedFrame.comment, frame.comment);
    +
    549 QCOMPARE(node->GetChildCount(), frame.signals.size());
    +
    550 QCOMPARE(copied.signals.size(), frame.signals.size());
    +
    551 QCOMPARE(decodedFrame.signals.size(), frame.signals.size());
    +
    552 for (std::size_t j = 0; j < frame.signals.size(); ++j) {
    +
    553 const SignalInfo &original = frame.signals[j];
    +
    554 const DecodeSignal &target = decodedFrame.signals[j];
    +
    555 const TreeNode *leaf = node->GetChild(j);
    +
    556 QVERIFY(leaf && leaf->GetSignal());
    +
    557 QCOMPARE(leaf->GetType(), NodeType::Signal);
    +
    558 QCOMPARE(leaf->GetName(), original.name);
    +
    559 QVERIFY(leaf->GetFrame() == nullptr);
    +
    560 // Check both the frame payload copy and each child payload copy.
    +
    561 for (const SignalInfo *copy: {&copied.signals[j], leaf->GetSignal()}) {
    +
    562 QCOMPARE(copy->name, original.name);
    +
    563 QCOMPARE(copy->startBit, original.startBit);
    +
    564 QCOMPARE(copy->length, original.length);
    +
    565 QCOMPARE(copy->isLittleEndian, original.isLittleEndian);
    +
    566 QCOMPARE(copy->isSigned, original.isSigned);
    +
    567 QCOMPARE(copy->factor, original.factor);
    +
    568 QCOMPARE(copy->offset, original.offset);
    +
    569 QCOMPARE(copy->minimum, original.minimum);
    +
    570 QCOMPARE(copy->maximum, original.maximum);
    +
    571 QCOMPARE(copy->unit, original.unit);
    +
    572 QCOMPARE(copy->comment, original.comment);
    +
    573 QVERIFY(copy->receivers == original.receivers);
    +
    574 QVERIFY(copy->valueDescriptions == original.valueDescriptions);
    +
    575 QCOMPARE(copy->multiplexing.role, original.multiplexing.role);
    +
    576 QCOMPARE(copy->multiplexing.value, original.multiplexing.value);
    +
    577 }
    +
    578 QCOMPARE(target.name, original.name);
    +
    579 QCOMPARE(target.startBit, original.startBit);
    +
    580 QCOMPARE(target.length, original.length);
    +
    581 QCOMPARE(target.byteOrder, original.isLittleEndian ? ByteOrder::Intel : ByteOrder::Motorola);
    +
    582 QCOMPARE(target.valueType, original.isSigned ? ValueType::Signed : ValueType::Unsigned);
    +
    583 QCOMPARE(target.factor, original.factor);
    +
    584 QCOMPARE(target.offset, original.offset);
    +
    585 QCOMPARE(target.minimum, original.minimum);
    +
    586 QCOMPARE(target.maximum, original.maximum);
    +
    587 QCOMPARE(target.unit, original.unit);
    +
    588 QCOMPARE(target.comment, original.comment);
    +
    589 QVERIFY(target.receivers == original.receivers);
    +
    590 QVERIFY(target.valueDescriptions == original.valueDescriptions);
    +
    591 QCOMPARE(target.multiplexing.role, original.multiplexing.role);
    +
    592 QCOMPARE(target.multiplexing.value, original.multiplexing.value);
    +
    593 }
    +
    594 }
    +
    595}
    +
    596
    +
    597void CoverageTest::physicalConversion_data() {
    +
    598 QTest::addColumn<double>("factor");
    +
    599 QTest::addColumn<double>("offset");
    +
    600 QTest::addColumn<double>("expected");
    +
    601 QTest::newRow("zero-factor") << 0.0 << 7.0 << 7.0;
    +
    602 QTest::newRow("negative-factor") << -2.0 << 5.0 << -15.0;
    +
    603 QTest::newRow("above-declared-range") << 2.0 << 3.0 << 23.0;
    +
    604}
    +
    605
    +
    606void CoverageTest::physicalConversion() {
    +
    607 QFETCH(double, factor);
    +
    608 QFETCH(double, offset);
    +
    609 QFETCH(double, expected);
    +
    610 DecodeSignal signal;
    +
    611 signal.length = 8U;
    +
    612 signal.factor = factor;
    +
    613 signal.offset = offset;
    +
    614 signal.minimum = 0.0;
    +
    615 signal.maximum = 1.0;
    +
    616 const DecodeDatabase database = SingleSignal(signal);
    +
    617 RawCanFrame raw;
    +
    618 raw.canId = 17U;
    +
    619 raw.data = {10U};
    +
    620 const DecodedFrameValue decoded = DbcDecoder().Decode(database, raw);
    +
    621 QVERIFY(decoded.signals[0].valid);
    +
    622 QCOMPARE(std::get<std::uint64_t>(decoded.signals[0].rawValue), std::uint64_t(10));
    +
    623 QCOMPARE(decoded.signals[0].physicalValue, expected);
    +
    624}
    +
    625
    +
    626void CoverageTest::multiplexingScenarios() {
    +
    627 const DecodeDatabase selectorOnly = DbcDecodeBuilder().Build(ParseText(
    +
    628 "BO_ 1 Frame: 1 ECU\nSG_ Mode M : 0|1@1+ (1,0) [0|1] \"\" ECU\n"));
    +
    629 RawCanFrame raw;
    +
    630 raw.canId = 1U;
    +
    631 raw.data = {1U};
    +
    632 const DecodedFrameValue only = DbcDecoder().Decode(selectorOnly, raw);
    +
    633 QCOMPARE(only.signals.size(), std::size_t(1));
    +
    634 QVERIFY(only.signals[0].valid);
    +
    635 const DecodeDatabase database = DbcDecodeBuilder().Build(ParseText(
    +
    636 "BO_ 1 First: 3 ECU\n"
    +
    637 "SG_ Mode M : 0|1@1+ (1,0) [0|1] \"\" ECU\n"
    +
    638 "SG_ A m0 : 8|8@1+ (1,0) [0|255] \"\" ECU\n"
    +
    639 "SG_ B m0 : 16|8@1+ (1,0) [0|255] \"\" ECU\n"
    +
    640 "BO_ 2 Second: 2 ECU\n"
    +
    641 "SG_ Mode M : 0|1@1+ (1,0) [0|1] \"\" ECU\n"
    +
    642 "SG_ A m1 : 8|8@1+ (1,0) [0|255] \"\" ECU\n"));
    +
    643 raw.data = {0U, 42U, 99U};
    +
    644 const DecodedFrameValue first = DbcDecoder().Decode(database, raw);
    +
    645 QVERIFY(first.signals[1].valid && first.signals[2].valid);
    +
    646 QCOMPARE(std::get<std::uint64_t>(first.signals[1].rawValue), std::uint64_t(42));
    +
    647 QCOMPARE(std::get<std::uint64_t>(first.signals[2].rawValue), std::uint64_t(99));
    +
    648 raw.canId = 2U;
    +
    649 const DecodedFrameValue secondInactive = DbcDecoder().Decode(database, raw);
    +
    650 QCOMPARE(secondInactive.signals[1].status, SignalDecodeStatus::Inactive);
    +
    651 raw.data[0] = 1U;
    +
    652 QVERIFY(DbcDecoder().Decode(database, raw).signals[1].valid);
    +
    653 raw.canId = 1U;
    +
    654 const DecodedFrameValue firstInactive = DbcDecoder().Decode(database, raw);
    +
    655 QCOMPARE(firstInactive.signals[1].status, SignalDecodeStatus::Inactive);
    +
    656 QCOMPARE(firstInactive.signals[2].status, SignalDecodeStatus::Inactive);
    +
    657}
    +
    658
    +
    659void CoverageTest::multiplexingErrorLocations_data() {
    +
    660 QTest::addColumn<QString>("text");
    +
    661 QTest::addColumn<unsigned>("line");
    +
    662 QTest::addColumn<QString>("message");
    +
    663 const QString header = "BO_ 1 Frame: 3 ECU\n\n";
    +
    664 const QString selector = "SG_ Mode M : 0|1@1+ (1,0) [0|1] \"\" ECU\n";
    +
    665 const QString branch = "SG_ A m1 : 8|8@1+ (1,0) [0|255] \"\" ECU\n";
    +
    666 QTest::newRow("missing-selector") << header + branch << 3U << QString::fromUtf8("Multiplexed branch has no selector.");
    +
    667 QTest::newRow("second-selector") << header + selector + "\nSG_ Other M : 16|1@1+ (1,0) [0|1] \"\" ECU\n"
    +
    668 << 5U << QString::fromUtf8("Multiplexing requires one unsigned selector per frame.");
    +
    669 QTest::newRow("signed-selector") << header + "SG_ Mode M : 0|1@1- (1,0) [-1|0] \"\" ECU\n"
    +
    670 << 3U << QString::fromUtf8("Multiplexing requires one unsigned selector per frame.");
    +
    671 QTest::newRow("branch-range") << header + "SG_ A m2 : 8|8@1+ (1,0) [0|255] \"\" ECU\n" + selector << 3U << QString::fromUtf8("Branch value exceeds selector raw range.");
    +
    672 QTest::newRow("same-branch-overlap") << header + selector + branch + "SG_ B m1 : 15|8@0+ (1,0) [0|255] \"\" ECU\n"
    +
    673 << 5U << QString::fromUtf8("Signals overlap without mutually exclusive multiplexing conditions.");
    +
    674 QTest::newRow("selector-overlap") << header + selector + "SG_ A m1 : 0|1@1+ (1,0) [0|1] \"\" ECU\n"
    +
    675 << 4U << QString::fromUtf8("Signals overlap without mutually exclusive multiplexing conditions.");
    +
    676 QTest::newRow("unconditional-overlap") << header + selector + branch + "SG_ Always : 8|8@1+ (1,0) [0|255] \"\" ECU\n"
    +
    677 << 5U << QString::fromUtf8("Signals overlap without mutually exclusive multiplexing conditions.");
    +
    678 QTest::newRow("ordinary-overlap") << header + "SG_ A : 8|8@1+ (1,0) [0|255] \"\" ECU\nSG_ B : 15|8@0+ (1,0) [0|255] \"\" ECU\n"
    +
    679 << 4U << QString::fromUtf8("Signals overlap without mutually exclusive multiplexing conditions.");
    +
    680 QTest::newRow("extended-multiplexing") << header + "SG_MUL_VAL_ 1 A Mode 1-2;\n"
    +
    681 << 3U << QString::fromUtf8("Extended and nested multiplexing are unsupported.");
    +
    682 QTest::newRow("nested-marker") << header + "SG_ A m1M : 8|8@1+ (1,0) [0|255] \"\" ECU\n"
    +
    683 << 3U << QString::fromUtf8("Invalid or unsupported multiplexing marker.");
    +
    684}
    +
    685
    +
    686void CoverageTest::multiplexingErrorLocations() {
    +
    687 QFETCH(QString, text);
    +
    688 QFETCH(unsigned, line);
    +
    689 QFETCH(QString, message);
    +
    690 QTemporaryFile file;
    +
    691 QVERIFY(file.open());
    +
    692 const QByteArray content = text.toUtf8();
    +
    693 QCOMPARE(file.write(content), qint64(content.size()));
    +
    694 QVERIFY(file.flush());
    +
    695 try {
    +
    696 DbcParser().ParseFile(file.fileName().toStdString());
    +
    697 QFAIL("Expected multiplexing rejection");
    +
    698 } catch (const std::runtime_error &error) {
    +
    699 QCOMPARE(QString::fromStdString(error.what()), file.fileName() + ":" + QString::number(line) + ": " + message);
    +
    700 }
    +
    701}
    +
    702
    +
    703void CoverageTest::escapedValueDescriptions() {
    +
    704 const DbcDatabase parsed = ParseText(
    +
    705 "BO_ 1 Frame: 1 ECU\nSG_ State : 0|8@1+ (1,0) [0|255] \"\" ECU\n"
    +
    706 R"dbc(VAL_ 1 State -0 "Ноль" 1 "C:\\trace" 2 "\\\"quoted\"\\";)dbc"
    +
    707 "\n");
    +
    708 const ValueDescriptions &values = parsed.frames[0].signals[0].valueDescriptions;
    +
    709 QCOMPARE(values.size(), std::size_t(3));
    +
    710 QVERIFY(values.find(RawSignalValue(std::int64_t(0))) == values.end());
    +
    711 const std::string *zero = FindValueDescription(values, std::int64_t(0));
    +
    712 const std::string *path = FindValueDescription(values, std::uint64_t(1));
    +
    713 const std::string *quoted = FindValueDescription(values, std::uint64_t(2));
    +
    714 QVERIFY(zero && path && quoted);
    +
    715 QCOMPARE(*zero, std::string("Ноль"));
    +
    716 QCOMPARE(*path, std::string("C:\\trace"));
    +
    717 QCOMPARE(*quoted, std::string("\\\"quoted\"\\"));
    +
    718 QVERIFY(NormalizeValueKey(RawSignalValue(std::int64_t(0))) == RawSignalValue(std::uint64_t(0)));
    +
    719 QVERIFY(NormalizeValueKey(RawSignalValue(std::int64_t(-1))) == RawSignalValue(std::int64_t(-1)));
    +
    720}
    +
    721
    +
    722void CoverageTest::factory() {
    + +
    724 QVERIFY(!factory.contains("value"));
    +
    725 QVERIFY_THROWS_EXCEPTION(std::out_of_range, static_cast<void>(factory.creator("missing")));
    +
    726 QVERIFY_THROWS_EXCEPTION(std::out_of_range, static_cast<void>(factory.create("missing", std::make_unique<int>(1))));
    +
    727 factory.registerType<FactoryFirst>("value");
    +
    728 QVERIFY(factory.contains("value"));
    +
    729 std::unique_ptr<int> argument = std::make_unique<int>(42);
    +
    730 const std::shared_ptr<FactoryBase> first = factory.create("value", std::move(argument));
    +
    731 QVERIFY(argument == nullptr);
    +
    732 QCOMPARE(first->Value(), 42);
    +
    733 const TypeFactory<std::string, FactoryBase, std::unique_ptr<int>>::CreatorFn creator = factory.creator("value");
    +
    734 QCOMPARE(creator(std::make_unique<int>(7))->Value(), 7);
    +
    735 factory.registerType<FactorySecond>("value");
    +
    736 QCOMPARE(factory.create("value", std::make_unique<int>(42))->Value(), 43);
    +
    737 QCOMPARE(first->Value(), 42);
    +
    738 QCOMPARE(creator(std::make_unique<int>(7))->Value(), 7);
    +
    739}
    +
    740
    +
    741int RunCoverageTests(int argc, char **argv) {
    +
    742 CoverageTest tests;
    +
    743 return QTest::qExec(&tests, argc, argv);
    +
    744}
    +
    745#include "dbc_coverage_test.moc"
    + +
    Converts parsed DBC data into runtime decode database.
    +
    DecodeDatabase Build(const DbcDatabase &source) const
    Build runtime decode database.
    +
    Runtime CAN decoder using prebuilt decode database.
    Definition dbc_decoder.h:72
    +
    DecodedFrameValue Decode(const DecodeDatabase &database, const RawCanFrame &frame) const
    Decode one raw CAN frame.
    +
    const DecodeFrame * FindFrame(const DecodeDatabase &database, std::uint32_t canId, bool isExtended) const
    Find frame definition by CAN ID.
    +
    Minimal DBC parser.
    Definition dbc_parser.h:34
    +
    DbcDatabase ParseFile(const std::string &filePath) const
    Parse DBC file.
    +
    Builds a simple tree from parsed DBC database.
    +
    std::unique_ptr< TreeNode > Build(const DbcDatabase &database) const
    Build tree representation of parsed DBC data.
    + +
    Tree node for later use in model/view or other hierarchy consumers.
    Definition tree_node.h:35
    +
    const SignalInfo * GetSignal() const
    Get signal payload if node is signal.
    Definition tree_node.cpp:64
    +
    const TreeNode * GetChild(std::size_t index) const
    Get child by index.
    Definition tree_node.cpp:38
    +
    const std::string & GetName() const
    Get display name.
    Definition tree_node.cpp:56
    +
    std::size_t GetChildCount() const
    Get child count.
    Definition tree_node.cpp:34
    +
    NodeType GetType() const
    Get node type.
    Definition tree_node.cpp:52
    +
    const FrameInfo * GetFrame() const
    Get frame payload if node is frame.
    Definition tree_node.cpp:60
    +
    Registry-based factory for creating objects by runtime identifier.
    Definition typefactory.h:59
    +
    bool contains(const ClassId &id) const
    Checks whether an id is registered.
    +
    BasePtr create(const ClassId &id, Args... args) const
    Creates an instance for the given id using provided arguments.
    Definition typefactory.h:97
    +
    void registerType(const ClassId &id)
    Registers a Derived type under the given id.
    Definition typefactory.h:76
    +
    CreatorFn creator(const ClassId &id) const
    Returns creator function for the given id.
    Definition typefactory.h:89
    +
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    +
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    +
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    +
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    +
    ByteOrder
    Signal byte order used for runtime decoding.
    +
    ValueType
    Signal numeric type.
    +
    Parsed DBC content stored in a simple internal form.
    +
    std::vector< FrameInfo > frames
    + +
    Runtime decode database with fast lookup by CAN ID.
    +
    Runtime-ready frame definition.
    +
    std::uint32_t pgn
    + +
    std::string comment
    + +
    std::uint8_t dlc
    +
    std::uint32_t canId
    +
    std::string name
    +
    std::string transmitter
    +
    Runtime-ready signal definition.
    + +
    std::string unit
    + + +
    std::string name
    +
    ValueDescriptions valueDescriptions
    + +
    ValueType valueType
    +
    std::uint32_t startBit
    +
    std::vector< std::string > receivers
    +
    ByteOrder byteOrder
    +
    std::uint32_t length
    +
    std::string comment
    +
    Fully decoded frame.
    Definition dbc_decoder.h:61
    + +
    const DecodeFrame * definition
    Definition dbc_decoder.h:62
    +
    Describes one CAN frame from a DBC file.
    Definition frame_info.h:24
    +
    bool isExtended
    Definition frame_info.h:27
    +
    bool hasPgn
    Definition frame_info.h:29
    +
    std::string transmitter
    Definition frame_info.h:31
    +
    std::uint8_t dlc
    Definition frame_info.h:30
    +
    std::string name
    Definition frame_info.h:25
    +
    std::string comment
    Definition frame_info.h:32
    +
    std::uint32_t pgn
    Definition frame_info.h:28
    +
    std::uint32_t canId
    Definition frame_info.h:26
    +
    Key for fast frame lookup.
    +
    Raw CAN frame used for runtime or trace decoding.
    Definition dbc_decoder.h:24
    +
    std::vector< std::uint8_t > data
    Definition dbc_decoder.h:27
    +
    std::uint32_t canId
    Definition dbc_decoder.h:25
    +
    bool isExtended
    Definition dbc_decoder.h:26
    +
    Describes one signal inside a DBC frame.
    Definition signal_info.h:24
    +
    std::uint32_t length
    Definition signal_info.h:28
    +
    std::string unit
    Definition signal_info.h:35
    +
    std::vector< std::string > receivers
    Definition signal_info.h:36
    +
    std::string name
    Definition signal_info.h:26
    +
    ValueDescriptions valueDescriptions
    Definition signal_info.h:37
    +
    bool isSigned
    Definition signal_info.h:30
    +
    double offset
    Definition signal_info.h:32
    +
    std::string comment
    Definition signal_info.h:38
    +
    std::uint32_t startBit
    Definition signal_info.h:27
    +
    double minimum
    Definition signal_info.h:33
    +
    double maximum
    Definition signal_info.h:34
    +
    double factor
    Definition signal_info.h:31
    +
    bool isLittleEndian
    Definition signal_info.h:29
    +
    +
    + + + + diff --git a/docs/html/dbc__decode__builder_8cpp_source.html b/docs/html/dbc__decode__builder_8cpp_source.html index 203858d..1b62c42 100644 --- a/docs/html/dbc__decode__builder_8cpp_source.html +++ b/docs/html/dbc__decode__builder_8cpp_source.html @@ -105,35 +105,35 @@ $(document).ready(function(){initNavTree('dbc__decode__builder_8cpp_source.html'
    15 DecodeDatabase result;
    16
    -
    17 for (std::size_t frameIndex = 0U; frameIndex < source.frames.size(); ++frameIndex) {
    -
    18 const FrameInfo &sourceFrame = source.frames[frameIndex];
    -
    19 DecodeFrame targetFrame;
    -
    20
    -
    21 targetFrame.name = sourceFrame.name;
    -
    22 targetFrame.canId = sourceFrame.canId;
    -
    23 targetFrame.isExtended = sourceFrame.isExtended;
    -
    24 targetFrame.dlc = sourceFrame.dlc;
    -
    25 targetFrame.pgn = sourceFrame.pgn;
    -
    26 targetFrame.hasPgn = sourceFrame.hasPgn;
    -
    27 targetFrame.transmitter = sourceFrame.transmitter;
    -
    28 targetFrame.comment = sourceFrame.comment;
    -
    29
    -
    30 for (std::size_t signalIndex = 0U; signalIndex < sourceFrame.signals.size(); ++signalIndex) {
    -
    31 const SignalInfo &sourceSignal = sourceFrame.signals[signalIndex];
    -
    32 DecodeSignal targetSignal;
    -
    33
    -
    34 targetSignal.name = sourceSignal.name;
    -
    35 targetSignal.startBit = sourceSignal.startBit;
    -
    36 targetSignal.length = sourceSignal.length;
    -
    37 targetSignal.byteOrder = sourceSignal.isLittleEndian ? ByteOrder::Intel : ByteOrder::Motorola;
    -
    38 targetSignal.valueType = sourceSignal.isSigned ? ValueType::Signed : ValueType::Unsigned;
    -
    39 targetSignal.factor = sourceSignal.factor;
    -
    40 targetSignal.offset = sourceSignal.offset;
    -
    41 targetSignal.minimum = sourceSignal.minimum;
    -
    42 targetSignal.maximum = sourceSignal.maximum;
    -
    43 targetSignal.unit = sourceSignal.unit;
    -
    44 targetSignal.receivers = sourceSignal.receivers;
    -
    45 targetSignal.comment = sourceSignal.comment;
    +
    17 for (const FrameInfo &sourceFrame : source.frames) {
    +
    18 DecodeFrame targetFrame;
    +
    19
    +
    20 targetFrame.name = sourceFrame.name;
    +
    21 targetFrame.canId = sourceFrame.canId;
    +
    22 targetFrame.isExtended = sourceFrame.isExtended;
    +
    23 targetFrame.dlc = sourceFrame.dlc;
    +
    24 targetFrame.pgn = sourceFrame.pgn;
    +
    25 targetFrame.hasPgn = sourceFrame.hasPgn;
    +
    26 targetFrame.transmitter = sourceFrame.transmitter;
    +
    27 targetFrame.comment = sourceFrame.comment;
    +
    28
    +
    29 for (const SignalInfo &sourceSignal : sourceFrame.signals) {
    +
    30 DecodeSignal targetSignal;
    +
    31
    +
    32 targetSignal.multiplexing = sourceSignal.multiplexing;
    +
    33 targetSignal.name = sourceSignal.name;
    +
    34 targetSignal.startBit = sourceSignal.startBit;
    +
    35 targetSignal.length = sourceSignal.length;
    +
    36 targetSignal.byteOrder = sourceSignal.isLittleEndian ? ByteOrder::Intel : ByteOrder::Motorola;
    +
    37 targetSignal.valueType = sourceSignal.isSigned ? ValueType::Signed : ValueType::Unsigned;
    +
    38 targetSignal.factor = sourceSignal.factor;
    +
    39 targetSignal.offset = sourceSignal.offset;
    +
    40 targetSignal.minimum = sourceSignal.minimum;
    +
    41 targetSignal.maximum = sourceSignal.maximum;
    +
    42 targetSignal.unit = sourceSignal.unit;
    +
    43 targetSignal.receivers = sourceSignal.receivers;
    +
    44 targetSignal.comment = sourceSignal.comment;
    +
    45 targetSignal.valueDescriptions = sourceSignal.valueDescriptions;
    46
    47 targetFrame.signals.push_back(targetSignal);
    48 }
    @@ -150,52 +150,33 @@ $(document).ready(function(){initNavTree('dbc__decode__builder_8cpp_source.html'
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    Parsed DBC content stored in a simple internal form.
    std::vector< FrameInfo > frames
    -
    Runtime decode database with fast lookup by CAN ID.
    -
    Runtime-ready frame definition.
    -
    std::uint32_t pgn
    - -
    std::string comment
    - -
    std::uint8_t dlc
    -
    std::uint32_t canId
    -
    std::string name
    -
    std::string transmitter
    -
    Runtime-ready signal definition.
    - -
    std::string unit
    - - -
    std::string name
    - -
    ValueType valueType
    -
    std::uint32_t startBit
    -
    std::vector< std::string > receivers
    -
    ByteOrder byteOrder
    -
    std::uint32_t length
    -
    std::string comment
    +
    Runtime decode database with fast lookup by CAN ID.
    +
    Runtime-ready frame definition.
    +
    std::uint32_t pgn
    + +
    std::string comment
    + +
    std::uint8_t dlc
    +
    std::uint32_t canId
    +
    std::string name
    +
    std::string transmitter
    +
    Runtime-ready signal definition.
    + +
    std::string unit
    + + +
    std::string name
    +
    ValueDescriptions valueDescriptions
    + +
    ValueType valueType
    +
    std::uint32_t startBit
    +
    std::vector< std::string > receivers
    +
    ByteOrder byteOrder
    +
    std::uint32_t length
    +
    std::string comment
    Describes one CAN frame from a DBC file.
    Definition frame_info.h:24
    -
    bool isExtended
    Definition frame_info.h:27
    -
    bool hasPgn
    Definition frame_info.h:29
    -
    std::string transmitter
    Definition frame_info.h:31
    -
    std::uint8_t dlc
    Definition frame_info.h:30
    -
    std::string name
    Definition frame_info.h:25
    -
    std::string comment
    Definition frame_info.h:32
    -
    std::uint32_t pgn
    Definition frame_info.h:28
    -
    std::uint32_t canId
    Definition frame_info.h:26
    Key for fast frame lookup.
    -
    Describes one signal inside a DBC frame.
    Definition signal_info.h:22
    -
    std::uint32_t length
    Definition signal_info.h:25
    -
    std::string unit
    Definition signal_info.h:32
    -
    std::vector< std::string > receivers
    Definition signal_info.h:33
    -
    std::string name
    Definition signal_info.h:23
    -
    bool isSigned
    Definition signal_info.h:27
    -
    double offset
    Definition signal_info.h:29
    -
    std::string comment
    Definition signal_info.h:34
    -
    std::uint32_t startBit
    Definition signal_info.h:24
    -
    double minimum
    Definition signal_info.h:30
    -
    double maximum
    Definition signal_info.h:31
    -
    double factor
    Definition signal_info.h:28
    -
    bool isLittleEndian
    Definition signal_info.h:26
    +
    Describes one signal inside a DBC frame.
    Definition signal_info.h:24
    diff --git a/docs/html/dbc__decode__builder_8h_source.html b/docs/html/dbc__decode__builder_8h_source.html index ec911a9..d3cd986 100644 --- a/docs/html/dbc__decode__builder_8h_source.html +++ b/docs/html/dbc__decode__builder_8h_source.html @@ -118,7 +118,7 @@ $(document).ready(function(){initNavTree('dbc__decode__builder_8h_source.html','
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    Parsed DBC content stored in a simple internal form.
    -
    Runtime decode database with fast lookup by CAN ID.
    +
    Runtime decode database with fast lookup by CAN ID.
    diff --git a/docs/html/dbc__decoder_8cpp_source.html b/docs/html/dbc__decoder_8cpp_source.html index ac28131..832e3ca 100644 --- a/docs/html/dbc__decoder_8cpp_source.html +++ b/docs/html/dbc__decoder_8cpp_source.html @@ -132,144 +132,186 @@ $(document).ready(function(){initNavTree('dbc__decoder_8cpp_source.html',''); in
    39 result.definition = definition;
    40 result.valid = true;
    41
    -
    42 for (std::size_t signalIndex = 0U; signalIndex < definition->signals.size(); ++signalIndex) {
    -
    43 const DecodeSignal &signal = definition->signals[signalIndex];
    -
    44 DecodedSignalValue decoded;
    -
    45 std::uint64_t unsignedValue = 0U;
    -
    46
    -
    47 decoded.definition = &signal;
    -
    48
    -
    49 if (!ExtractUnsigned(frame.data, signal, unsignedValue)) {
    -
    50 decoded.valid = false;
    -
    51 result.signals.push_back(decoded);
    -
    52 continue;
    -
    53 }
    -
    54
    -
    55 if (signal.valueType == ValueType::Signed)
    -
    56 decoded.rawValue = SignExtend(unsignedValue, signal.length);
    -
    57 else
    -
    58 decoded.rawValue = unsignedValue;
    -
    59
    -
    60 double numericValue;
    -
    61 if (const auto *signedValue = std::get_if<std::int64_t>(&decoded.rawValue))
    -
    62 numericValue = static_cast<double>(*signedValue);
    -
    63 else
    -
    64 numericValue = static_cast<double>(std::get<std::uint64_t>(decoded.rawValue));
    -
    65 decoded.physicalValue = numericValue * signal.factor + signal.offset;
    -
    66 decoded.valid = true;
    -
    67
    -
    68 result.signals.push_back(decoded);
    -
    69 }
    -
    70
    -
    71 return result;
    -
    72}
    +
    42 const SelectorState selector = ReadSelector(*definition, frame);
    +
    43 for (const DecodeSignal &signal : definition->signals)
    +
    44 result.signals.push_back(DecodeOneSignal(signal, frame, selector));
    +
    45
    +
    46 return result;
    +
    47}
    -
    73
    -
    74bool DbcDecoder::ExtractUnsigned(const std::vector<std::uint8_t> &data,
    -
    75 const DecodeSignal &signal,
    -
    76 std::uint64_t &value) {
    -
    77 if ((signal.length == 0U) || (signal.length > 64U))
    -
    78 return false;
    -
    79
    -
    80 if (signal.byteOrder == ByteOrder::Intel)
    -
    81 return ExtractIntel(data, signal.startBit, signal.length, value);
    -
    82
    -
    83 return ExtractMotorola(data, signal.startBit, signal.length, value);
    -
    84}
    -
    85
    -
    86bool DbcDecoder::ExtractIntel(const std::vector<std::uint8_t> &data,
    -
    87 std::uint32_t startBit,
    -
    88 std::uint32_t length,
    -
    89 std::uint64_t &value) {
    -
    90 value = 0U;
    -
    91
    -
    92 for (std::uint32_t bitIndex = 0U; bitIndex < length; ++bitIndex) {
    -
    93 const std::uint32_t absoluteBit = startBit + bitIndex;
    -
    94 const std::uint32_t byteIndex = absoluteBit / 8U;
    -
    95 const std::uint32_t bitInByte = absoluteBit % 8U;
    -
    96
    -
    97 if (byteIndex >= data.size())
    -
    98 return false;
    -
    99
    -
    100 const std::uint64_t bitValue =
    -
    101 (static_cast<std::uint64_t>((data[byteIndex] >> bitInByte) & 0x01U) << bitIndex);
    -
    102
    -
    103 value |= bitValue;
    -
    104 }
    -
    105
    -
    106 return true;
    -
    107}
    -
    108
    -
    109bool DbcDecoder::ExtractMotorola(const std::vector<std::uint8_t> &data,
    -
    110 std::uint32_t startBit,
    -
    111 std::uint32_t length,
    -
    112 std::uint64_t &value) {
    -
    113 /*
    -
    114 * DBC Motorola bit numbering:
    -
    115 * - startBit points to the most significant bit of the signal
    -
    116 * - inside a byte, bit numbering goes 7..0
    -
    117 * - crossing byte boundary moves to the next byte, bit 7
    -
    118 * Example: a signal starting at 7 follows 7..0, 15..8, 23..16.
    -
    119 */
    -
    120
    -
    121 value = 0U;
    -
    122
    -
    123 std::size_t byteIndex = startBit / 8U;
    -
    124 std::uint32_t bitInByte = startBit % 8U;
    -
    125
    -
    126 for (std::uint32_t bitIndex = 0U; bitIndex < length; ++bitIndex) {
    -
    127 if (byteIndex >= data.size())
    -
    128 return false;
    -
    129
    -
    130 value <<= 1U;
    -
    131 value |= static_cast<std::uint64_t>((data[byteIndex] >> bitInByte) & 0x01U);
    -
    132
    -
    133 if (bitInByte == 0U) {
    -
    134 ++byteIndex;
    -
    135 bitInByte = 7U;
    -
    136 } else
    -
    137 --bitInByte;
    -
    138 }
    -
    139
    -
    140 return true;
    -
    141}
    -
    142
    -
    143std::int64_t DbcDecoder::SignExtend(std::uint64_t value, std::uint32_t bitLength) {
    -
    144 if ((bitLength == 0U) || (bitLength > 64U))
    -
    145 return 0;
    -
    146
    -
    147 const std::uint64_t signMask = std::uint64_t(1U) << (bitLength - 1U);
    -
    148 const std::uint64_t valueMask = (bitLength == 64U)
    -
    149 ? ~std::uint64_t(0U)
    -
    150 : (std::uint64_t(1U) << bitLength) - 1U;
    -
    151 value &= valueMask;
    -
    152
    -
    153 if ((value & signMask) == 0U)
    -
    154 return static_cast<std::int64_t>(value);
    -
    155
    -
    156 // The complemented magnitude fits int64_t, including for INT64_MIN.
    -
    157 return -1 - static_cast<std::int64_t>((~value) & valueMask);
    -
    158}
    +
    48
    +
    49DbcDecoder::SelectorState DbcDecoder::ReadSelector(const DecodeFrame &definition,
    +
    50 const RawCanFrame &frame) {
    +
    51 SelectorState selector;
    +
    52 std::size_t count = 0U;
    +
    53 for (const DecodeSignal &signal : definition.signals) {
    +
    54 if (signal.multiplexing.role == MultiplexRole::Selector) {
    +
    55 selector.definition = &signal;
    +
    56 ++count;
    +
    57 }
    +
    58 }
    +
    59 if (count != 1U)
    +
    60 return selector;
    +
    61
    +
    62 const DecodeSignal &signal = *selector.definition;
    +
    63 selector.valid = signal.valueType == ValueType::Unsigned &&
    +
    64 signal.length > 0U && signal.length <= 64U;
    +
    65 selector.available = selector.valid && ExtractUnsigned(frame.data, signal, selector.value);
    +
    66 return selector;
    +
    67}
    +
    68
    +
    69DecodedSignalValue DbcDecoder::DecodeOneSignal(const DecodeSignal &signal,
    +
    70 const RawCanFrame &frame,
    +
    71 const SelectorState &selector) {
    +
    72 DecodedSignalValue decoded;
    +
    73 std::uint64_t unsignedValue = 0U;
    +
    74
    +
    75 decoded.definition = &signal;
    +
    76
    +
    77 if (signal.length == 0U || signal.length > 64U ||
    +
    78 (signal.multiplexing.role != MultiplexRole::Unconditional && !selector.valid)) {
    +
    79 return decoded;
    +
    80 }
    +
    81 if (signal.multiplexing.role == MultiplexRole::Branch) {
    +
    82 if (selector.definition->length < 64U && signal.multiplexing.value >= (std::uint64_t(1U) << selector.definition->length)) {
    +
    83 return decoded;
    +
    84 }
    +
    85 if (!selector.available) {
    +
    86 decoded.status = SignalDecodeStatus::SelectorUnavailable;
    +
    87 return decoded;
    +
    88 }
    +
    89 if (signal.multiplexing.value != selector.value) {
    +
    90 decoded.status = SignalDecodeStatus::Inactive;
    +
    91 return decoded;
    +
    92 }
    +
    93 }
    +
    94 if (!ExtractUnsigned(frame.data, signal, unsignedValue)) {
    +
    95 decoded.status = SignalDecodeStatus::InsufficientPayload;
    +
    96 return decoded;
    +
    97 }
    +
    98
    +
    99 if (signal.valueType == ValueType::Signed)
    +
    100 decoded.rawValue = SignExtend(unsignedValue, signal.length);
    +
    101 else
    +
    102 decoded.rawValue = unsignedValue;
    +
    103
    +
    104 double numericValue;
    +
    105 if (const std::int64_t *signedValue = std::get_if<std::int64_t>(&decoded.rawValue))
    +
    106 numericValue = static_cast<double>(*signedValue);
    +
    107 else
    +
    108 numericValue = static_cast<double>(std::get<std::uint64_t>(decoded.rawValue));
    +
    109 decoded.physicalValue = numericValue * signal.factor + signal.offset;
    +
    110 decoded.valid = true;
    +
    111 decoded.status = SignalDecodeStatus::Valid;
    +
    112
    +
    113 return decoded;
    +
    114}
    +
    115
    +
    116bool DbcDecoder::ExtractUnsigned(const std::vector<std::uint8_t> &data,
    +
    117 const DecodeSignal &signal,
    +
    118 std::uint64_t &value) {
    +
    119 if ((signal.length == 0U) || (signal.length > 64U))
    +
    120 return false;
    +
    121
    +
    122 if (signal.byteOrder == ByteOrder::Intel)
    +
    123 return ExtractIntel(data, signal.startBit, signal.length, value);
    +
    124
    +
    125 return ExtractMotorola(data, signal.startBit, signal.length, value);
    +
    126}
    +
    127
    +
    128bool DbcDecoder::ExtractIntel(const std::vector<std::uint8_t> &data,
    +
    129 std::uint32_t startBit,
    +
    130 std::uint32_t length,
    +
    131 std::uint64_t &value) {
    +
    132 value = 0U;
    +
    133
    +
    134 for (std::uint32_t bitIndex = 0U; bitIndex < length; ++bitIndex) {
    +
    135 const std::uint32_t absoluteBit = startBit + bitIndex;
    +
    136 const std::uint32_t byteIndex = absoluteBit / 8U;
    +
    137 const std::uint32_t bitInByte = absoluteBit % 8U;
    +
    138
    +
    139 if (byteIndex >= data.size())
    +
    140 return false;
    +
    141
    +
    142 const std::uint64_t bitValue =
    +
    143 (static_cast<std::uint64_t>((data[byteIndex] >> bitInByte) & 0x01U) << bitIndex);
    +
    144
    +
    145 value |= bitValue;
    +
    146 }
    +
    147
    +
    148 return true;
    +
    149}
    +
    150
    +
    151bool DbcDecoder::ExtractMotorola(const std::vector<std::uint8_t> &data,
    +
    152 std::uint32_t startBit,
    +
    153 std::uint32_t length,
    +
    154 std::uint64_t &value) {
    +
    155 /*
    +
    156 * DBC Motorola bit numbering:
    +
    157 * - startBit points to the most significant bit of the signal
    +
    158 * - inside a byte, bit numbering goes 7..0
    +
    159 * - crossing byte boundary moves to the next byte, bit 7
    +
    160 * Example: a signal starting at 7 follows 7..0, 15..8, 23..16.
    +
    161 */
    +
    162
    +
    163 value = 0U;
    +
    164
    +
    165 std::size_t byteIndex = startBit / 8U;
    +
    166 std::uint32_t bitInByte = startBit % 8U;
    +
    167
    +
    168 for (std::uint32_t bitIndex = 0U; bitIndex < length; ++bitIndex) {
    +
    169 if (byteIndex >= data.size())
    +
    170 return false;
    +
    171
    +
    172 value <<= 1U;
    +
    173 value |= static_cast<std::uint64_t>((data[byteIndex] >> bitInByte) & 0x01U);
    +
    174
    +
    175 if (bitInByte == 0U) {
    +
    176 ++byteIndex;
    +
    177 bitInByte = 7U;
    +
    178 } else
    +
    179 --bitInByte;
    +
    180 }
    +
    181
    +
    182 return true;
    +
    183}
    +
    184
    +
    185std::int64_t DbcDecoder::SignExtend(std::uint64_t value, std::uint32_t bitLength) {
    +
    186 if ((bitLength == 0U) || (bitLength > 64U))
    +
    187 return 0;
    +
    188
    +
    189 const std::uint64_t signMask = std::uint64_t(1U) << (bitLength - 1U);
    +
    190 const std::uint64_t valueMask = (bitLength == 64U)
    +
    191 ? ~std::uint64_t(0U)
    +
    192 : (std::uint64_t(1U) << bitLength) - 1U;
    +
    193 value &= valueMask;
    +
    194
    +
    195 if ((value & signMask) == 0U)
    +
    196 return static_cast<std::int64_t>(value);
    +
    197
    +
    198 // The complemented magnitude fits int64_t, including for INT64_MIN.
    +
    199 return -1 - static_cast<std::int64_t>((~value) & valueMask);
    +
    200}
    DecodedFrameValue Decode(const DecodeDatabase &database, const RawCanFrame &frame) const
    Decode one raw CAN frame.
    const DecodeFrame * FindFrame(const DecodeDatabase &database, std::uint32_t canId, bool isExtended) const
    Find frame definition by CAN ID.
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    -
    Runtime decode database with fast lookup by CAN ID.
    -
    Runtime-ready frame definition.
    -
    Runtime-ready signal definition.
    - - -
    ValueType valueType
    -
    std::uint32_t startBit
    -
    ByteOrder byteOrder
    -
    std::uint32_t length
    -
    Fully decoded frame.
    Definition dbc_decoder.h:51
    - -
    const DecodeFrame * definition
    Definition dbc_decoder.h:52
    -
    One decoded signal value.
    Definition dbc_decoder.h:37
    - -
    std::variant< std::int64_t, std::uint64_t > rawValue
    Definition dbc_decoder.h:39
    - -
    const DecodeSignal * definition
    Definition dbc_decoder.h:38
    +
    Runtime decode database with fast lookup by CAN ID.
    +
    Runtime-ready frame definition.
    +
    Runtime-ready signal definition.
    + + +
    ValueType valueType
    +
    std::uint32_t startBit
    +
    ByteOrder byteOrder
    +
    std::uint32_t length
    +
    Fully decoded frame.
    Definition dbc_decoder.h:61
    + +
    const DecodeFrame * definition
    Definition dbc_decoder.h:62
    +
    One decoded signal value.
    Definition dbc_decoder.h:43
    +
    RawSignalValue rawValue
    Definition dbc_decoder.h:45
    + + +
    const DecodeSignal * definition
    Definition dbc_decoder.h:44
    Key for fast frame lookup.
    Raw CAN frame used for runtime or trace decoding.
    Definition dbc_decoder.h:24
    std::vector< std::uint8_t > data
    Definition dbc_decoder.h:27
    diff --git a/docs/html/dbc__decoder_8h.html b/docs/html/dbc__decoder_8h.html index 3b2b071..5cdac13 100644 --- a/docs/html/dbc__decoder_8h.html +++ b/docs/html/dbc__decoder_8h.html @@ -91,7 +91,8 @@ $(document).ready(function(){initNavTree('dbc__decoder_8h.html',''); initResizab
    dbc_decoder.h File Reference
    @@ -119,13 +120,51 @@ Classes class  DbcDecoder  Runtime CAN decoder using prebuilt decode database. More...
      + + + +

    +Enumerations

    enum class  SignalDecodeStatus {
    +  InvalidDefinition +, InsufficientPayload +, SelectorUnavailable +, Inactive +,
    +  Valid +
    + }
     

    Detailed Description

    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)

    Licensed under the MIT License. See LICENSE file in the project root for full license text.

    Definition in file dbc_decoder.h.

    -
    +

    Enumeration Type Documentation

    + +

    ◆ SignalDecodeStatus

    + +
    +
    + + + + + +
    + + + + +
    enum class SignalDecodeStatus
    +
    +strong
    +
    + +

    Definition at line 32 of file dbc_decoder.h.

    + +
    +
    +
    -
    1#include "dbc_parser.h"
    -
    2#include "dbc_statement_handler.h"
    -
    3
    -
    4#include <QtTest>
    -
    5#include <chrono>
    -
    6#include <filesystem>
    -
    7#include <fstream>
    -
    8
    -
    9#define CHECK(condition, name) QVERIFY2((condition), std::string(name).c_str())
    -
    10#include <stdexcept>
    -
    11
    -
    12struct Fixture {
    -
    13 std::filesystem::path path = std::filesystem::temp_directory_path() /
    -
    14 ("dbc_parser_test_" + std::to_string(std::chrono::steady_clock::now().time_since_epoch().count()) + ".dbc");
    -
    15 ~Fixture() {
    -
    16 std::error_code error;
    -
    17 std::filesystem::remove(path, error);
    -
    18 }
    -
    19 void Write(const std::string &text) const {
    -
    20 std::ofstream output(path);
    -
    21 output << text;
    -
    22 if (!output)
    -
    23 throw std::runtime_error("Cannot write test fixture.");
    -
    24 }
    -
    25};
    -
    26
    -
    27class CountingHandler : public DbcStatementHandler {
    -
    28public:
    -
    29 inline static int instances = 0;
    -
    30 inline static int calls = 0;
    -
    31 CountingHandler() { ++instances; }
    -
    32 void Handle(const std::string &, DbcParseContext &context) const override {
    -
    33 ++calls;
    -
    34 context.database.frames.emplace_back();
    -
    35 }
    -
    36};
    -
    37
    -
    38std::string SignalLine(const std::string &start, const std::string &length,
    -
    39 const std::string &order, const std::string &factor,
    -
    40 const std::string &offset, const std::string &minimum,
    -
    41 const std::string &maximum) {
    -
    42 return "SG_ Value : " + start + "|" + length + "@" + order +
    -
    43 " (" + factor + "," + offset + ") [" + minimum + "|" + maximum + "] \"\" ECU";
    -
    44}
    -
    45
    -
    46class DbcParserTest : public QObject {
    -
    47 Q_OBJECT
    -
    48private:
    -
    49 void RejectSignal(const Fixture &fixture, const std::string &line, unsigned payload = 8U) {
    -
    50 fixture.Write("BO_ 1 Frame: " + std::to_string(payload) + " ECU\n\n" + line + "\n");
    -
    51 try {
    -
    52 DbcParser().ParseFile(fixture.path.string());
    -
    53 CHECK(false, "Reject " + line);
    -
    54 } catch (const std::runtime_error &error) {
    -
    55 const std::string prefix = fixture.path.string() + ":3: ";
    -
    56 CHECK(std::string(error.what()).find(prefix) == 0U &&
    -
    57 std::string(error.what()).size() > prefix.size(),
    -
    58 "Reject " + line);
    -
    59 }
    -
    60 }
    -
    61private Q_SLOTS:
    -
    62 void validFrames();
    -
    63 void invalidFrames();
    -
    64 void integration();
    -
    65 void invalidSignals();
    -
    66 void validSignals();
    -
    67 void dispatch();
    -
    68 void independentSessions();
    -
    69};
    -
    70
    -
    71void DbcParserTest::validFrames() {
    -
    72 Fixture fixture;
    -
    73 struct ValidCase {
    -
    74 const char *line;
    -
    75 std::uint32_t id;
    -
    76 bool extended;
    -
    77 unsigned length;
    -
    78 };
    -
    79 const ValidCase valid[] = {
    -
    80 {"BO_ 0 Frame: 0 ECU", 0U, false, 0U},
    -
    81 {"BO_ 2047 Frame: 8 ECU", 2047U, false, 8U},
    -
    82 {"BO_ 2048 Frame: 64 ECU", 2048U, true, 64U},
    -
    83 {"BO_ 536870911 Frame: 255 ECU", 0x1FFFFFFFU, true, 255U},
    -
    84 {"BO_ 2147483649 Frame: 8 ECU", 1U, true, 8U},
    -
    85 {"BO_ 2684354559 Frame: 8 ECU", 0x1FFFFFFFU, true, 8U},
    -
    86 {" BO_\t256\tFrame :\t8\tECU \r", 256U, false, 8U}};
    -
    87 for (const auto &test: valid) {
    -
    88 fixture.Write(std::string(test.line) + '\n');
    -
    89 try {
    -
    90 const auto database = DbcParser().ParseFile(fixture.path.string());
    -
    91 CHECK(database.frames.size() == 1U && database.frames[0].name == "Frame" &&
    -
    92 database.frames[0].canId == test.id &&
    -
    93 database.frames[0].isExtended == test.extended &&
    -
    94 database.frames[0].dlc == test.length &&
    -
    95 database.frames[0].transmitter == "ECU",
    -
    96 test.line);
    -
    97 } catch (const std::exception &error) { CHECK(false, error.what()); }
    -
    98 }
    -
    99}
    -
    100
    -
    101void DbcParserTest::invalidFrames() {
    -
    102 Fixture fixture;
    -
    103 const char *invalid[] = {
    -
    104 "BO_ invalid", "BO_", "BO_ 1", "BO_ 1 : 8 ECU", "BO_ 1 Frame 8 ECU",
    -
    105 "BO_ 1 Frame:", "BO_ 1 Frame: 8", "BO_ 1 Frame: 8 ECU extra",
    -
    106 "BO_ 1 Two Names: 8 ECU", "BO_ -1 Frame: 8 ECU", "BO_ +1 Frame: 8 ECU",
    -
    107 "BO_ 1x Frame: 8 ECU", "BO_ 0x123 Frame: 8 ECU", "BO_ 1.5 Frame: 8 ECU",
    -
    108 "BO_ 4294967296 Frame: 8 ECU", "BO_ 999999999999999999999 Frame: 8 ECU",
    -
    109 "BO_ 536870912 Frame: 8 ECU", "BO_ 1073741824 Frame: 8 ECU",
    -
    110 "BO_ 2684354560 Frame: 8 ECU", "BO_ 4294967295 Frame: 8 ECU",
    -
    111 "BO_ 1 Frame: -1 ECU", "BO_ 1 Frame: +8 ECU", "BO_ 1 Frame: 8x ECU",
    -
    112 "BO_ 1 Frame: 8.5 ECU", "BO_ 1 Frame: 256 ECU",
    -
    113 "BO_ 1 Frame: 4294967296 ECU", "BO_\tinvalid"};
    -
    114 for (const auto *line: invalid) {
    -
    115 fixture.Write(std::string("VERSION \"test\"\n\n") + line + '\n');
    -
    116 try {
    -
    117 DbcParser().ParseFile(fixture.path.string());
    -
    118 CHECK(false, line);
    -
    119 } catch (const std::runtime_error &error) {
    -
    120 const std::string prefix = fixture.path.string() + ":3: ";
    -
    121 CHECK(std::string(error.what()).find(prefix) == 0U &&
    -
    122 std::string(error.what()).size() > prefix.size(),
    -
    123 line);
    -
    124 }
    -
    125 }
    -
    126}
    -
    127
    -
    128void DbcParserTest::integration() {
    -
    129 Fixture fixture;
    -
    130 fixture.Write(
    -
    131 "BO_TX_BU_ 256 : ECU;\nBO_ 256 Frame: 8 ECU\n"
    -
    132 " SG_ Speed : 0|16@1+ (0.5,1) [0|100] \"rpm\" ECU\n"
    -
    133 "CM_ BO_ 256 \"Frame comment\";\nCM_ SG_ 256 Speed \"Signal comment\";\n"
    -
    134 "BO_ 257 Second: 8 ECU\n");
    -
    135 const auto database = DbcParser().ParseFile(fixture.path.string());
    -
    136 CHECK(database.frames.size() == 2U && database.frames[0].signals.size() == 1U &&
    -
    137 database.frames[0].comment == "Frame comment" &&
    -
    138 database.frames[0].signals[0].comment == "Signal comment",
    -
    139 "Integration");
    -
    140 fixture.Write("\nSG_ Speed : invalid\n");
    -
    141 try {
    -
    142 DbcParser().ParseFile(fixture.path.string());
    -
    143 CHECK(false, "Signal error location");
    -
    144 } catch (const std::runtime_error &error) {
    -
    145 CHECK(std::string(error.what()).find(fixture.path.string() + ":2: ") == 0U,
    -
    146 "Signal error location");
    -
    147 }
    -
    148}
    -
    149
    -
    150void DbcParserTest::invalidSignals() {
    -
    151 Fixture fixture;
    -
    152 const std::string ordinary = SignalLine("0", "8", "1+", "1", "0", "0", "255");
    -
    153 for (const std::string value: {"-1", "+1", "0junk", "0x10", "1.5",
    -
    154 "4294967296", "999999999999999999999"}) {
    -
    155 RejectSignal(fixture, SignalLine(value, "8", "1+", "1", "0", "0", "255"));
    -
    156 RejectSignal(fixture, SignalLine("0", value, "1+", "1", "0", "0", "255"));
    -
    157 }
    -
    158 for (const std::string length: {"0", "65"})
    -
    159 RejectSignal(fixture, SignalLine("0", length, "1+", "1", "0", "0", "255"));
    -
    160 for (const std::string order: {"2+", "9-", "1", "1x", "1++", "01+"})
    -
    161 RejectSignal(fixture, SignalLine("0", "8", order, "1", "0", "0", "255"));
    -
    162 for (const std::string value: {"1junk", "nan", "NaN", "inf", "-inf", "1e999", "1e-999", "0x1p2", "", "1e", "1.2.3"}) {
    -
    163 RejectSignal(fixture, SignalLine("0", "8", "1+", value, "0", "0", "255"));
    -
    164 RejectSignal(fixture, SignalLine("0", "8", "1+", "1", value, "0", "255"));
    -
    165 RejectSignal(fixture, SignalLine("0", "8", "1+", "1", "0", value, "255"));
    -
    166 RejectSignal(fixture, SignalLine("0", "8", "1+", "1", "0", "0", value));
    -
    167 }
    -
    168 RejectSignal(fixture, SignalLine("0", "8", "1+", "1", "0", "2", "1"));
    -
    169 for (const std::string name: {"", "Two Names", "Value M", "Value m1", "Value m1M"}) {
    -
    170 std::string line = ordinary;
    -
    171 line.replace(4U, 5U, name);
    -
    172 RejectSignal(fixture, line);
    -
    173 }
    -
    174 for (const std::string broken: {
    -
    175 "SG_", "SG_ Value", "SG_ Value : 0|8@1+ (1,0) [0|255] ECU",
    -
    176 "SG_ Value : 0|8@1+ (1,0) [0|255] \"\"",
    -
    177 "SG_ Value : 0|8@1+ (1,0) [0|255] \"\" ECU,",
    -
    178 "SG_ Value : 0|8@1+ (1,0) [0|255] \"\" ECU extra"})
    -
    179 RejectSignal(fixture, broken);
    -
    180 RejectSignal(fixture, SignalLine("64", "1", "1+", "1", "0", "0", "1"));
    -
    181 RejectSignal(fixture, SignalLine("63", "2", "1+", "1", "0", "0", "3"));
    -
    182 RejectSignal(fixture, SignalLine("56", "2", "0+", "1", "0", "0", "3"));
    -
    183 RejectSignal(fixture, SignalLine("4294967295", "64", "1+", "1", "0", "0", "1"));
    -
    184 RejectSignal(fixture, ordinary, 0U);
    -
    185 for (const char delimiter: {'|', '@', '(', ')', '[', ']', '"'}) {
    -
    186 std::string line = ordinary;
    -
    187 line.erase(line.find(delimiter), 1U);
    -
    188 RejectSignal(fixture, line);
    -
    189 }
    -
    190}
    -
    191
    -
    192void DbcParserTest::validSignals() {
    -
    193 Fixture fixture;
    -
    194 const DbcParser signalParser;
    -
    195 fixture.Write("BO_ 1 Frame: 8 ECU\n" +
    -
    196 SignalLine("0", "8", "1+", "0", "0", "0", "0") + "\n" +
    -
    197 SignalLine("8", "8", "1-", "-1", "0", "-255", "0") + "\n");
    -
    198 const auto factors = signalParser.ParseFile(fixture.path.string());
    -
    199 CHECK(factors.frames[0].signals.size() == 2U &&
    -
    200 factors.frames[0].signals[0].factor == 0.0 &&
    -
    201 factors.frames[0].signals[1].factor == -1.0,
    -
    202 "Zero and negative factors and equal range boundaries");
    -
    203
    -
    204 struct SignalCase {
    -
    205 const char *start;
    -
    206 const char *length;
    -
    207 const char *order;
    -
    208 unsigned payload;
    -
    209 };
    -
    210 const SignalCase validSignals[] = {
    -
    211 {"0", "1", "1+", 1U},
    -
    212 {"7", "1", "0-", 1U},
    -
    213 {"0", "64", "1+", 8U},
    -
    214 {"7", "64", "0-", 8U},
    -
    215 {"63", "1", "1+", 8U},
    -
    216 {"56", "1", "0+", 8U},
    -
    217 {"3", "12", "0+", 2U},
    -
    218 {"2039", "1", "1+", 255U}};
    -
    219 for (const auto &test: validSignals) {
    -
    220 fixture.Write("BO_ 1 Frame: " + std::to_string(test.payload) + " ECU\n" +
    -
    221 SignalLine(test.start, test.length, test.order, ".5e+1", "-2.5E-1", "-1.", "+2e2") + "\n");
    -
    222 try {
    -
    223 const auto parsed = signalParser.ParseFile(fixture.path.string());
    -
    224 const auto &signal = parsed.frames.at(0).signals.at(0);
    -
    225 CHECK(signal.startBit == std::stoul(test.start) &&
    -
    226 signal.length == std::stoul(test.length) &&
    -
    227 signal.isLittleEndian == (test.order[0] == '1') &&
    -
    228 signal.isSigned == (test.order[1] == '-') &&
    -
    229 signal.factor == 5.0 && signal.offset == -0.25 &&
    -
    230 signal.minimum == -1.0 && signal.maximum == 200.0,
    -
    231 "Valid signal boundary and numeric metadata");
    -
    232 } catch (const std::exception &error) { CHECK(false, error.what()); }
    -
    233 }
    -
    234 fixture.Write("BO_ 1 Frame: 8 ECU\n"
    -
    235 "SG_\tValue\t:\t0 | 8 @1+ ( 1 , 0 ) [ 0 | 255 ] \"rpm\" ECU1,\tECU2\n");
    -
    236 try {
    -
    237 const auto parsed = signalParser.ParseFile(fixture.path.string());
    -
    238 const auto &signal = parsed.frames.at(0).signals.at(0);
    -
    239 CHECK(signal.name == "Value" && signal.unit == "rpm" &&
    -
    240 signal.receivers == std::vector<std::string>({"ECU1", "ECU2"}),
    -
    241 "Signal tabs, spaces, and receiver list");
    -
    242 } catch (const std::exception &error) { CHECK(false, error.what()); }
    -
    243}
    -
    244
    -
    245void DbcParserTest::dispatch() {
    -
    246 CountingHandler::instances = 0;
    -
    247 CountingHandler::calls = 0;
    -
    248 DbcDatabase dispatchDatabase;
    -
    249 DbcParseContext context{dispatchDatabase, nullptr};
    -
    250 DbcStatementDispatcher dispatcher;
    -
    251 dispatcher.RegisterType<CountingHandler>("TEST_");
    -
    252 CHECK(dispatcher.Dispatch("TEST_ first", context) &&
    -
    253 dispatcher.Dispatch("TEST_ second", context) &&
    -
    254 CountingHandler::instances == 1 && CountingHandler::calls == 2 &&
    -
    255 dispatchDatabase.frames.size() == 2U,
    -
    256 "Factory dispatch and handler reuse");
    -
    257 CHECK(!dispatcher.Dispatch("TEST_OTHER data", context) &&
    -
    258 !dispatcher.Dispatch("BO_TX_BU_ 1 : ECU;", context) &&
    -
    259 !dispatcher.Dispatch("VAL_ 1 Speed 0 \"Stopped\";", context) &&
    -
    260 CountingHandler::calls == 2,
    -
    261 "Exact and unknown keyword dispatch");
    -
    262}
    -
    263
    -
    264void DbcParserTest::independentSessions() {
    -
    265 Fixture fixture;
    -
    266 const DbcParser parser;
    -
    267 fixture.Write("BO_ 1 First: 8 ECU\n");
    -
    268 CHECK(parser.ParseFile(fixture.path.string()).frames.size() == 1U, "First parse");
    -
    269 fixture.Write("SG_ Speed : invalid\n");
    -
    270 try {
    -
    271 parser.ParseFile(fixture.path.string());
    -
    272 CHECK(false, "Independent parse context");
    -
    273 } catch (const std::runtime_error &error) {
    -
    274 CHECK(std::string(error.what()).find("Signal found before any frame") !=
    -
    275 std::string::npos,
    -
    276 "Independent parse context");
    -
    277 }
    -
    278 fixture.Write("BO_ 2 Second: 8 ECU\n");
    -
    279 const auto recovered = parser.ParseFile(fixture.path.string());
    -
    280 CHECK(recovered.frames.size() == 1U && recovered.frames[0].canId == 2U,
    -
    281 "Fresh parse after error");
    -
    282}
    -
    283
    -
    284int RunParserTests(int argc, char **argv) {
    -
    285 DbcParserTest tests;
    -
    286 return QTest::qExec(&tests, argc, argv);
    -
    287}
    -
    288
    -
    289#include "dbc_parser_test.moc"
    -
    Minimal DBC parser.
    Definition dbc_parser.h:33
    -
    DbcDatabase ParseFile(const std::string &filePath) const
    Parse DBC file.
    - -
    bool Dispatch(const std::string &line, DbcParseContext &context) const
    - +
    +
    2#include "dbc_decoder.h"
    +
    3#include "dbc_parser.h"
    +
    4#include "dbc_statement_handler.h"
    +
    5#include "dbc_tree_builder.h"
    +
    6#include <limits>
    +
    7
    +
    8#include <QtTest>
    +
    9#include <chrono>
    +
    10#include <filesystem>
    +
    11#include <fstream>
    +
    12
    +
    13#define CHECK(condition, name) QVERIFY2((condition), std::string(name).c_str())
    +
    14#include <stdexcept>
    +
    15
    +
    16struct Fixture {
    +
    17 std::filesystem::path path = std::filesystem::temp_directory_path() /
    +
    18 ("dbc_parser_test_" + std::to_string(std::chrono::steady_clock::now().time_since_epoch().count()) + ".dbc");
    +
    19 ~Fixture() {
    +
    20 std::error_code error;
    +
    21 std::filesystem::remove(path, error);
    +
    22 }
    +
    23 void Write(const std::string &text) const {
    +
    24 std::ofstream output(path);
    +
    25 output << text;
    +
    26 if (!output)
    +
    27 throw std::runtime_error("Cannot write test fixture.");
    +
    28 }
    +
    29};
    +
    30
    +
    31class CountingHandler : public DbcStatementHandler {
    +
    32public:
    +
    33 inline static int instances = 0;
    +
    34 inline static int calls = 0;
    +
    35 CountingHandler() { ++instances; }
    +
    36 void Handle(const std::string &, DbcParseContext &context) const override {
    +
    37 ++calls;
    +
    38 context.database.frames.emplace_back();
    +
    39 }
    +
    40};
    +
    41
    +
    42std::string SignalLine(const std::string &start, const std::string &length,
    +
    43 const std::string &order, const std::string &factor,
    +
    44 const std::string &offset, const std::string &minimum,
    +
    45 const std::string &maximum, const std::string &name = "Value") {
    +
    46 return "SG_ " + name + " : " + start + "|" + length + "@" + order +
    +
    47 " (" + factor + "," + offset + ") [" + minimum + "|" + maximum + "] \"\" ECU";
    +
    48}
    +
    49
    +
    50class DbcParserTest : public QObject {
    +
    51 Q_OBJECT
    +
    52private:
    +
    53 void RejectSignal(const Fixture &fixture, const std::string &line, unsigned payload = 8U) {
    +
    54 fixture.Write("BO_ 1 Frame: " + std::to_string(payload) + " ECU\n\n" + line + "\n");
    +
    55 try {
    +
    56 DbcParser().ParseFile(fixture.path.string());
    +
    57 CHECK(false, "Reject " + line);
    +
    58 } catch (const std::runtime_error &error) {
    +
    59 const std::string prefix = fixture.path.string() + ":3: ";
    +
    60 CHECK(std::string(error.what()).find(prefix) == 0U &&
    +
    61 std::string(error.what()).size() > prefix.size(),
    +
    62 "Reject " + line);
    +
    63 }
    +
    64 }
    +
    65private Q_SLOTS:
    +
    66 void multiplexing();
    +
    67 void multiplexingBoundaries();
    +
    68 void validFrames();
    +
    69 void invalidFrames();
    +
    70 void duplicateFrames();
    +
    71 void duplicateSignals();
    +
    72 void distinctDefinitions();
    +
    73 void integration();
    +
    74 void invalidSignals();
    +
    75 void validSignals();
    +
    76 void dispatch();
    +
    77 void independentSessions();
    +
    78 void valueDescriptions();
    +
    79 void invalidValueDescriptions();
    +
    80};
    +
    81
    +
    82void DbcParserTest::validFrames() {
    +
    83 Fixture fixture;
    +
    84 struct ValidCase {
    +
    85 const char *line;
    +
    86 std::uint32_t id;
    +
    87 bool extended;
    +
    88 unsigned length;
    +
    89 };
    +
    90 const ValidCase valid[] = {
    +
    91 {"BO_ 0 Frame: 0 ECU", 0U, false, 0U},
    +
    92 {"BO_ 2047 Frame: 8 ECU", 2047U, false, 8U},
    +
    93 {"BO_ 2048 Frame: 64 ECU", 2048U, true, 64U},
    +
    94 {"BO_ 536870911 Frame: 255 ECU", 0x1FFFFFFFU, true, 255U},
    +
    95 {"BO_ 2147483649 Frame: 8 ECU", 1U, true, 8U},
    +
    96 {"BO_ 2684354559 Frame: 8 ECU", 0x1FFFFFFFU, true, 8U},
    +
    97 {" BO_\t256\tFrame :\t8\tECU \r", 256U, false, 8U}};
    +
    98 for (const ValidCase &test: valid) {
    +
    99 fixture.Write(std::string(test.line) + '\n');
    +
    100 try {
    +
    101 const DbcDatabase database = DbcParser().ParseFile(fixture.path.string());
    +
    102 QCOMPARE(database.frames.size(), std::size_t(1U));
    +
    103 const FrameInfo &frame = database.frames[0];
    +
    104 QCOMPARE(frame.name, std::string("Frame"));
    +
    105 QCOMPARE(frame.canId, test.id);
    +
    106 QCOMPARE(frame.isExtended, test.extended);
    +
    107 QCOMPARE(static_cast<unsigned>(frame.dlc), test.length);
    +
    108 QCOMPARE(frame.transmitter, std::string("ECU"));
    +
    109 } catch (const std::exception &error) { CHECK(false, error.what()); }
    +
    110 }
    +
    111}
    +
    112
    +
    113void DbcParserTest::invalidFrames() {
    +
    114 Fixture fixture;
    +
    115 const char *invalid[] = {
    +
    116 "BO_ invalid", "BO_", "BO_ 1", "BO_ 1 : 8 ECU", "BO_ 1 Frame 8 ECU",
    +
    117 "BO_ 1 Frame:", "BO_ 1 Frame: 8", "BO_ 1 Frame: 8 ECU extra",
    +
    118 "BO_ 1 Two Names: 8 ECU", "BO_ -1 Frame: 8 ECU", "BO_ +1 Frame: 8 ECU",
    +
    119 "BO_ 1x Frame: 8 ECU", "BO_ 0x123 Frame: 8 ECU", "BO_ 1.5 Frame: 8 ECU",
    +
    120 "BO_ 4294967296 Frame: 8 ECU", "BO_ 999999999999999999999 Frame: 8 ECU",
    +
    121 "BO_ 536870912 Frame: 8 ECU", "BO_ 1073741824 Frame: 8 ECU",
    +
    122 "BO_ 2684354560 Frame: 8 ECU", "BO_ 4294967295 Frame: 8 ECU",
    +
    123 "BO_ 1 Frame: -1 ECU", "BO_ 1 Frame: +8 ECU", "BO_ 1 Frame: 8x ECU",
    +
    124 "BO_ 1 Frame: 8.5 ECU", "BO_ 1 Frame: 256 ECU",
    +
    125 "BO_ 1 Frame: 4294967296 ECU", "BO_\tinvalid"};
    +
    126 for (const char *line: invalid) {
    +
    127 fixture.Write(std::string("VERSION \"test\"\n\n") + line + '\n');
    +
    128 try {
    +
    129 DbcParser().ParseFile(fixture.path.string());
    +
    130 CHECK(false, line);
    +
    131 } catch (const std::runtime_error &error) {
    +
    132 const std::string prefix = fixture.path.string() + ":3: ";
    +
    133 CHECK(std::string(error.what()).find(prefix) == 0U &&
    +
    134 std::string(error.what()).size() > prefix.size(),
    +
    135 line);
    +
    136 }
    +
    137 }
    +
    138}
    +
    139
    +
    140void DbcParserTest::duplicateFrames() {
    +
    141 Fixture fixture;
    +
    142 struct DuplicateCase {
    +
    143 const char *firstId;
    +
    144 const char *duplicateId;
    +
    145 const char *message;
    +
    146 };
    +
    147 const DuplicateCase cases[] = {
    +
    148 {"1", "1", "Duplicate standard frame CAN ID: 1"},
    +
    149 {"2147483649", "2147483649", "Duplicate extended frame CAN ID: 1"},
    +
    150 {"2048", "2147485696", "Duplicate extended frame CAN ID: 2048"},
    +
    151 {"2147485696", "2048", "Duplicate extended frame CAN ID: 2048"},
    +
    152 {"536870911", "2684354559", "Duplicate extended frame CAN ID: 536870911"}
    +
    153 };
    +
    154 const DbcParser parser;
    +
    155 for (const DuplicateCase &test : cases) {
    +
    156 fixture.Write("BO_ " + std::string(test.firstId) + " First: 8 ECU\n"
    +
    157 "BO_ 2 Other: 8 ECU\n\n"
    +
    158 " BO_\t" + test.duplicateId + "\tSecond: 8 ECU\n");
    +
    159 try {
    +
    160 parser.ParseFile(fixture.path.string());
    +
    161 CHECK(false, "Duplicate frame must be rejected");
    +
    162 } catch (const std::runtime_error &error) {
    +
    163 QCOMPARE(std::string(error.what()), fixture.path.string() + ":4: " + test.message);
    +
    164 }
    +
    165 }
    +
    166 fixture.Write("BO_ 1 First: 8 ECU\n");
    +
    167 QCOMPARE(parser.ParseFile(fixture.path.string()).frames.size(), std::size_t(1U));
    +
    168}
    +
    169
    +
    170void DbcParserTest::duplicateSignals() {
    +
    171 Fixture fixture;
    +
    172 const std::string first = "SG_ State : 0|8@1+ (1,0) [0|255] \"\" ECU\n";
    +
    173 const std::string duplicates[] = {
    +
    174 first,
    +
    175 " SG_\tState : 16|8@1+ (2,1) [0|511] \"V\" ECU\n",
    +
    176 "SG_ State m1 : 16|8@1+ (1,0) [0|255] \"\" ECU\n"
    +
    177 };
    +
    178 for (const std::string &duplicate : duplicates) {
    +
    179 fixture.Write("BO_ 1 Frame: 8 ECU\n" + first +
    +
    180 "SG_ Other : 8|8@1+ (1,0) [0|255] \"\" ECU\n\n" + duplicate);
    +
    181 try {
    +
    182 DbcParser().ParseFile(fixture.path.string());
    +
    183 CHECK(false, "Duplicate signal must be rejected");
    +
    184 } catch (const std::runtime_error &error) {
    +
    185 QCOMPARE(std::string(error.what()), fixture.path.string() +
    +
    186 ":5: Duplicate signal name 'State' in frame 'Frame'.");
    +
    187 }
    +
    188 }
    +
    189}
    +
    190
    +
    191void DbcParserTest::distinctDefinitions() {
    +
    192 Fixture fixture;
    +
    193 fixture.Write("BO_ 1 Shared: 1 ECU\n"
    +
    194 "SG_ State : 0|8@1+ (1,0) [0|255] \"\" ECU\n"
    +
    195 "BO_ 2147483649 Shared: 1 ECU\n"
    +
    196 "SG_ State : 0|8@1+ (1,0) [0|255] \"\" ECU\n"
    +
    197 "BO_ 2 Shared: 2 ECU\n"
    +
    198 "SG_ State : 0|8@1+ (1,0) [0|255] \"\" ECU\n"
    +
    199 "SG_ state : 8|8@1+ (1,0) [0|255] \"\" ECU\n"
    +
    200 "CM_ BO_ 1 \"Standard\";\n"
    +
    201 "CM_ BO_ 2147483649 \"Extended\";\n"
    +
    202 "CM_ SG_ 1 State \"Standard state\";\n"
    +
    203 "CM_ SG_ 2147483649 State \"Extended state\";\n");
    +
    204 const DbcDatabase parsed = DbcParser().ParseFile(fixture.path.string());
    +
    205 QCOMPARE(parsed.frames.size(), std::size_t(3U));
    +
    206 QCOMPARE(parsed.frames[0].canId, parsed.frames[1].canId);
    +
    207 CHECK(!parsed.frames[0].isExtended && parsed.frames[1].isExtended,
    +
    208 "Standard and extended frames with the same numeric ID remain distinct");
    +
    209 QCOMPARE(parsed.frames[0].comment, std::string("Standard"));
    +
    210 QCOMPARE(parsed.frames[1].comment, std::string("Extended"));
    +
    211 QCOMPARE(parsed.frames[0].signals[0].comment, std::string("Standard state"));
    +
    212 QCOMPARE(parsed.frames[1].signals[0].comment, std::string("Extended state"));
    +
    213 QCOMPARE(parsed.frames[2].signals.size(), std::size_t(2U));
    +
    214 const DecodeDatabase runtime = DbcDecodeBuilder().Build(parsed);
    +
    215 RawCanFrame raw;
    +
    216 raw.canId = 1U;
    +
    217 raw.data = {7U};
    +
    218 const DecodedFrameValue standard = DbcDecoder().Decode(runtime, raw);
    +
    219 QVERIFY(standard.valid);
    +
    220 QCOMPARE(standard.definition->comment, std::string("Standard"));
    +
    221 raw.isExtended = true;
    +
    222 const DecodedFrameValue extended = DbcDecoder().Decode(runtime, raw);
    +
    223 QVERIFY(extended.valid);
    +
    224 QCOMPARE(extended.definition->comment, std::string("Extended"));
    +
    225}
    +
    226
    +
    227void DbcParserTest::integration() {
    +
    228 Fixture fixture;
    +
    229 fixture.Write(
    +
    230 "BO_TX_BU_ 256 : ECU;\nBO_ 256 Frame: 8 ECU\n"
    +
    231 " SG_ Speed : 0|16@1+ (0.5,1) [0|100] \"rpm\" ECU\n"
    +
    232 "CM_ BO_ 256 \"Frame comment\";\nCM_ SG_ 256 Speed \"Signal comment\";\n"
    +
    233 "BO_ 257 Second: 8 ECU\n");
    +
    234 const DbcDatabase database = DbcParser().ParseFile(fixture.path.string());
    +
    235 CHECK(database.frames.size() == 2U && database.frames[0].signals.size() == 1U &&
    +
    236 database.frames[0].comment == "Frame comment" &&
    +
    237 database.frames[0].signals[0].comment == "Signal comment",
    +
    238 "Integration");
    +
    239 fixture.Write("\nSG_ Speed : invalid\n");
    +
    240 try {
    +
    241 DbcParser().ParseFile(fixture.path.string());
    +
    242 CHECK(false, "Signal error location");
    +
    243 } catch (const std::runtime_error &error) {
    +
    244 CHECK(std::string(error.what()).find(fixture.path.string() + ":2: ") == 0U,
    +
    245 "Signal error location");
    +
    246 }
    +
    247}
    +
    248
    +
    249void DbcParserTest::multiplexing() {
    +
    250 Fixture fixture;
    +
    251 const std::string selector = "SG_ Mode M : 0|8@1+ (10,3) [0|255] \"\" ECU\n";
    +
    252 const std::string first = "SG_ First m1 : 8|8@1- (2,0) [-128|127] \"V\" ECU\n";
    +
    253 const std::string second = "SG_ Second m2 : 15|8@0+ (1,0) [0|255] \"\" ECU\n";
    +
    254 const std::string common = "SG_ Common : 16|8@1+ (1,0) [0|255] \"\" ECU\n";
    +
    255 fixture.Write("BO_ 1 Frame: 3 ECU\n" + first + second + common + selector +
    +
    256 "VAL_ 1 First -1 \"Negative\";\n");
    +
    257 const DbcDatabase parsed = DbcParser().ParseFile(fixture.path.string());
    +
    258 const DecodeDatabase runtime = DbcDecodeBuilder().Build(parsed);
    +
    259 CHECK(parsed.frames[0].signals[3].multiplexing.role == MultiplexRole::Selector,
    +
    260 "Selector declared after branches");
    +
    261 const std::unique_ptr<TreeNode> tree = DbcTreeBuilder().Build(parsed);
    +
    262 CHECK(tree->GetChild(0U)->GetChild(0U)->GetSignal()->multiplexing.value == 1U,
    +
    263 "Tree preserves multiplexing");
    +
    264 RawCanFrame raw;
    +
    265 raw.canId = 1U;
    +
    266 raw.data = {1U, 255U, 7U};
    +
    267 DecodedFrameValue result = DbcDecoder().Decode(runtime, raw);
    +
    268 CHECK(result.signals[0].valid && std::get<std::int64_t>(result.signals[0].rawValue) == -1 &&
    +
    269 result.signals[0].physicalValue == -2 && *result.signals[0].GetValueDescription() == "Negative",
    +
    270 "Active signed branch and VAL_ use exact raw selector");
    +
    271 CHECK(!result.signals[1].valid && result.signals[1].status == SignalDecodeStatus::Inactive &&
    +
    272 result.signals[1].GetValueDescription() == nullptr && result.signals[2].valid,
    +
    273 "Inactive branch and unconditional signal");
    +
    274 raw.data[0] = 2U;
    +
    275 result = DbcDecoder().Decode(runtime, raw);
    +
    276 CHECK(result.signals[0].status == SignalDecodeStatus::Inactive && result.signals[1].valid &&
    +
    277 std::get<std::uint64_t>(result.signals[1].rawValue) == 255U,
    +
    278 "Motorola branch becomes active");
    +
    279 raw.data = {3U};
    +
    280 result = DbcDecoder().Decode(runtime, raw);
    +
    281 CHECK(result.signals[0].status == SignalDecodeStatus::Inactive &&
    +
    282 result.signals[1].status == SignalDecodeStatus::Inactive &&
    +
    283 result.signals[2].status == SignalDecodeStatus::InsufficientPayload,
    +
    284 "Unmapped selector leaves branches inactive even with missing bytes");
    +
    285 raw.data = {1U};
    +
    286 result = DbcDecoder().Decode(runtime, raw);
    +
    287 CHECK(result.signals[0].status == SignalDecodeStatus::InsufficientPayload,
    +
    288 "Active branch requires payload");
    +
    289 raw.data.clear();
    +
    290 result = DbcDecoder().Decode(runtime, raw);
    +
    291 CHECK(result.signals[0].status == SignalDecodeStatus::SelectorUnavailable &&
    +
    292 result.signals[3].status == SignalDecodeStatus::InsufficientPayload,
    +
    293 "Unavailable selector does not imply inactive branch");
    +
    294
    +
    295 const std::vector<std::string> invalid = {
    +
    296 first,
    +
    297 selector + "SG_ Other M : 16|8@1+ (1,0) [0|255] \"\" ECU\n",
    +
    298 "SG_ Mode M : 0|8@1- (1,0) [-128|127] \"\" ECU\n",
    +
    299 selector + "SG_ TooLarge m256 : 8|8@1+ (1,0) [0|255] \"\" ECU\n",
    +
    300 selector + first + "SG_ Same m1 : 15|8@0+ (1,0) [0|255] \"\" ECU\n",
    +
    301 selector + "SG_ Collision m1 : 0|8@1+ (1,0) [0|255] \"\" ECU\n",
    +
    302 selector + first + "SG_ Always : 8|8@1+ (1,0) [0|255] \"\" ECU\n",
    +
    303 "SG_MUL_VAL_ 1 First Mode 1-2;\n"
    +
    304 };
    +
    305 for (const std::string &signals : invalid) {
    +
    306 fixture.Write("BO_ 1 Frame: 3 ECU\n" + signals);
    +
    307 bool rejected = false;
    +
    308 try {
    +
    309 DbcParser().ParseFile(fixture.path.string());
    +
    310 } catch (const std::runtime_error &error) {
    +
    311 rejected = std::string(error.what()).find(fixture.path.string() + ":") == 0U;
    +
    312 }
    +
    313 CHECK(rejected, "Invalid multiplexing rejected with location");
    +
    314 }
    +
    315 for (const std::string marker : {"m", "m-1", "m+1", "m1M", "m18446744073709551616", "M m1"})
    +
    316 RejectSignal(fixture, "SG_ Bad " + marker + " : 8|8@1+ (1,0) [0|255] \"\" ECU");
    +
    317}
    +
    318
    +
    319void DbcParserTest::multiplexingBoundaries() {
    +
    320 Fixture fixture;
    +
    321 fixture.Write("BO_ 1 Frame: 9 ECU\n"
    +
    322 "SG_ Branch m18446744073709551615 : 64|8@1+ (1,0) [0|255] \"\" ECU\n"
    +
    323 "SG_ Mode M : 7|64@0+ (0,5) [0|1] \"\" ECU\n");
    +
    324 const DbcDatabase parsed = DbcParser().ParseFile(fixture.path.string());
    +
    325 DecodeDatabase runtime = DbcDecodeBuilder().Build(parsed);
    +
    326 CHECK(runtime.frames[0].signals[0].multiplexing.value == std::numeric_limits<std::uint64_t>::max(),
    +
    327 "Exact uint64 branch metadata");
    +
    328 RawCanFrame raw;
    +
    329 raw.canId = 1U;
    +
    330 raw.data = std::vector<std::uint8_t>(9U, 255U);
    +
    331 DecodedFrameValue result = DbcDecoder().Decode(runtime, raw);
    +
    332 CHECK(result.signals[0].valid && result.signals[1].valid &&
    +
    333 std::get<std::uint64_t>(result.signals[1].rawValue) == std::numeric_limits<std::uint64_t>::max(),
    +
    334 "Motorola uint64 selector compares raw value before zero scaling");
    +
    335 raw.data[7] = 254U;
    +
    336 result = DbcDecoder().Decode(runtime, raw);
    +
    337 CHECK(result.signals[0].status == SignalDecodeStatus::Inactive,
    +
    338 "Adjacent large integers remain distinct");
    +
    339 runtime.frames[0].signals[1].length = 0U;
    +
    340 result = DbcDecoder().Decode(runtime, raw);
    +
    341 CHECK(result.signals[0].status == SignalDecodeStatus::InvalidDefinition &&
    +
    342 result.signals[1].status == SignalDecodeStatus::InvalidDefinition,
    +
    343 "Malformed runtime selector distinguished from payload errors");
    +
    344 runtime.frames[0].signals.pop_back();
    +
    345 result = DbcDecoder().Decode(runtime, raw);
    +
    346 CHECK(result.signals[0].status == SignalDecodeStatus::InvalidDefinition,
    +
    347 "Missing runtime selector");
    +
    348 fixture.Write("BO_ 1 Frame: 2 ECU\n\n"
    +
    349 "SG_ Branch m2 : 8|8@1+ (1,0) [0|255] \"\" ECU\n"
    +
    350 "SG_ Mode M : 0|1@1+ (1,0) [0|1] \"\" ECU\n");
    +
    351 bool rejected = false;
    +
    352 try {
    +
    353 DbcParser().ParseFile(fixture.path.string());
    +
    354 } catch (const std::runtime_error &error) {
    +
    355 rejected = std::string(error.what()).find(fixture.path.string() + ":3: ") == 0U;
    +
    356 }
    +
    357 CHECK(rejected, "Deferred validation reports branch source line");
    +
    358 fixture.Write("BO_ 1 Frame: 2 ECU\n"
    +
    359 "SG_ A : 8|8@1+ (1,0) [0|255] \"\" ECU\n"
    +
    360 "SG_ B : 15|8@0+ (1,0) [0|255] \"\" ECU\n");
    +
    361 rejected = false;
    +
    362 try {
    +
    363 DbcParser().ParseFile(fixture.path.string());
    +
    364 } catch (const std::runtime_error &) {
    +
    365 rejected = true;
    +
    366 }
    +
    367 CHECK(rejected, "Ordinary overlapping signals rejected");
    +
    368}
    +
    369
    +
    370void DbcParserTest::invalidSignals() {
    +
    371 Fixture fixture;
    +
    372 const std::string ordinary = SignalLine("0", "8", "1+", "1", "0", "0", "255");
    +
    373 for (const std::string value: {"-1", "+1", "0junk", "0x10", "1.5",
    +
    374 "4294967296", "999999999999999999999"}) {
    +
    375 RejectSignal(fixture, SignalLine(value, "8", "1+", "1", "0", "0", "255"));
    +
    376 RejectSignal(fixture, SignalLine("0", value, "1+", "1", "0", "0", "255"));
    +
    377 }
    +
    378 for (const std::string length: {"0", "65"})
    +
    379 RejectSignal(fixture, SignalLine("0", length, "1+", "1", "0", "0", "255"));
    +
    380 for (const std::string order: {"2+", "9-", "1", "1x", "1++", "01+"})
    +
    381 RejectSignal(fixture, SignalLine("0", "8", order, "1", "0", "0", "255"));
    +
    382 for (const std::string value: {"1junk", "nan", "NaN", "inf", "-inf", "1e999", "1e-999", "0x1p2", "", "1e", "1.2.3"}) {
    +
    383 RejectSignal(fixture, SignalLine("0", "8", "1+", value, "0", "0", "255"));
    +
    384 RejectSignal(fixture, SignalLine("0", "8", "1+", "1", value, "0", "255"));
    +
    385 RejectSignal(fixture, SignalLine("0", "8", "1+", "1", "0", value, "255"));
    +
    386 RejectSignal(fixture, SignalLine("0", "8", "1+", "1", "0", "0", value));
    +
    387 }
    +
    388 RejectSignal(fixture, SignalLine("0", "8", "1+", "1", "0", "2", "1"));
    +
    389 for (const std::string name: {"", "Two Names", "Value m1M"}) {
    +
    390 std::string line = ordinary;
    +
    391 line.replace(4U, 5U, name);
    +
    392 RejectSignal(fixture, line);
    +
    393 }
    +
    394 for (const std::string broken: {
    +
    395 "SG_", "SG_ Value", "SG_ Value : 0|8@1+ (1,0) [0|255] ECU",
    +
    396 "SG_ Value : 0|8@1+ (1,0) [0|255] \"\"",
    +
    397 "SG_ Value : 0|8@1+ (1,0) [0|255] \"\" ECU,",
    +
    398 "SG_ Value : 0|8@1+ (1,0) [0|255] \"\" ECU extra"})
    +
    399 RejectSignal(fixture, broken);
    +
    400 RejectSignal(fixture, SignalLine("64", "1", "1+", "1", "0", "0", "1"));
    +
    401 RejectSignal(fixture, SignalLine("63", "2", "1+", "1", "0", "0", "3"));
    +
    402 RejectSignal(fixture, SignalLine("56", "2", "0+", "1", "0", "0", "3"));
    +
    403 RejectSignal(fixture, SignalLine("4294967295", "64", "1+", "1", "0", "0", "1"));
    +
    404 RejectSignal(fixture, ordinary, 0U);
    +
    405 for (const char delimiter: {'|', '@', '(', ')', '[', ']', '"'}) {
    +
    406 std::string line = ordinary;
    +
    407 line.erase(line.find(delimiter), 1U);
    +
    408 RejectSignal(fixture, line);
    +
    409 }
    +
    410}
    +
    411
    +
    412void DbcParserTest::validSignals() {
    +
    413 Fixture fixture;
    +
    414 const DbcParser signalParser;
    +
    415 fixture.Write("BO_ 1 Frame: 8 ECU\n" +
    +
    416 SignalLine("0", "8", "1+", "0", "0", "0", "0") + "\n" +
    +
    417 SignalLine("8", "8", "1-", "-1", "0", "-255", "0", "Negative") + "\n");
    +
    418 const DbcDatabase factors = signalParser.ParseFile(fixture.path.string());
    +
    419 CHECK(factors.frames[0].signals.size() == 2U &&
    +
    420 factors.frames[0].signals[0].factor == 0.0 &&
    +
    421 factors.frames[0].signals[1].factor == -1.0,
    +
    422 "Zero and negative factors and equal range boundaries");
    +
    423
    +
    424 struct SignalCase {
    +
    425 const char *start;
    +
    426 const char *length;
    +
    427 const char *order;
    +
    428 unsigned payload;
    +
    429 };
    +
    430 const SignalCase validSignals[] = {
    +
    431 {"0", "1", "1+", 1U},
    +
    432 {"7", "1", "0-", 1U},
    +
    433 {"0", "64", "1+", 8U},
    +
    434 {"7", "64", "0-", 8U},
    +
    435 {"63", "1", "1+", 8U},
    +
    436 {"56", "1", "0+", 8U},
    +
    437 {"3", "12", "0+", 2U},
    +
    438 {"2039", "1", "1+", 255U}};
    +
    439 for (const SignalCase &test: validSignals) {
    +
    440 fixture.Write("BO_ 1 Frame: " + std::to_string(test.payload) + " ECU\n" +
    +
    441 SignalLine(test.start, test.length, test.order, ".5e+1", "-2.5E-1", "-1.", "+2e2") + "\n");
    +
    442 try {
    +
    443 const DbcDatabase parsed = signalParser.ParseFile(fixture.path.string());
    +
    444 const SignalInfo &signal = parsed.frames.at(0).signals.at(0);
    +
    445 QCOMPARE(signal.startBit, static_cast<std::uint32_t>(std::stoul(test.start)));
    +
    446 QCOMPARE(signal.length, static_cast<std::uint32_t>(std::stoul(test.length)));
    +
    447 QCOMPARE(signal.isLittleEndian, test.order[0] == '1');
    +
    448 QCOMPARE(signal.isSigned, test.order[1] == '-');
    +
    449 QCOMPARE(signal.factor, 5.0);
    +
    450 QCOMPARE(signal.offset, -0.25);
    +
    451 QCOMPARE(signal.minimum, -1.0);
    +
    452 QCOMPARE(signal.maximum, 200.0);
    +
    453 } catch (const std::exception &error) { CHECK(false, error.what()); }
    +
    454 }
    +
    455 fixture.Write("BO_ 1 Frame: 8 ECU\n"
    +
    456 "SG_\tValue\t:\t0 | 8 @1+ ( 1 , 0 ) [ 0 | 255 ] \"rpm\" ECU1,\tECU2\n");
    +
    457 try {
    +
    458 const DbcDatabase parsed = signalParser.ParseFile(fixture.path.string());
    +
    459 const SignalInfo &signal = parsed.frames.at(0).signals.at(0);
    +
    460 CHECK(signal.name == "Value" && signal.unit == "rpm" &&
    +
    461 signal.receivers == std::vector<std::string>({"ECU1", "ECU2"}),
    +
    462 "Signal tabs, spaces, and receiver list");
    +
    463 } catch (const std::exception &error) { CHECK(false, error.what()); }
    +
    464}
    +
    465
    +
    466void DbcParserTest::dispatch() {
    +
    467 CountingHandler::instances = 0;
    +
    468 CountingHandler::calls = 0;
    +
    469 DbcDatabase dispatchDatabase;
    +
    470 DbcParseContext context{dispatchDatabase, nullptr};
    +
    471 DbcStatementDispatcher dispatcher;
    +
    472 dispatcher.RegisterType<CountingHandler>("TEST_");
    +
    473 CHECK(dispatcher.Dispatch("TEST_ first", context) &&
    +
    474 dispatcher.Dispatch("TEST_ second", context) &&
    +
    475 CountingHandler::instances == 1 && CountingHandler::calls == 2 &&
    +
    476 dispatchDatabase.frames.size() == 2U,
    +
    477 "Factory dispatch and handler reuse");
    +
    478 CHECK(!dispatcher.Dispatch("TEST_OTHER data", context) &&
    +
    479 !dispatcher.Dispatch("BO_TX_BU_ 1 : ECU;", context) &&
    +
    480 !dispatcher.Dispatch("VAL_TABLE_ States 0 \"Stopped\";", context) &&
    +
    481 CountingHandler::calls == 2,
    +
    482 "Exact and unknown keyword dispatch");
    +
    483}
    +
    484
    +
    485void DbcParserTest::independentSessions() {
    +
    486 Fixture fixture;
    +
    487 const DbcParser parser;
    +
    488 fixture.Write("BO_ 1 First: 8 ECU\n");
    +
    489 CHECK(parser.ParseFile(fixture.path.string()).frames.size() == 1U, "First parse");
    +
    490 fixture.Write("SG_ Speed : invalid\n");
    +
    491 try {
    +
    492 parser.ParseFile(fixture.path.string());
    +
    493 CHECK(false, "Independent parse context");
    +
    494 } catch (const std::runtime_error &error) {
    +
    495 CHECK(std::string(error.what()).find("Signal found before any frame") !=
    +
    496 std::string::npos,
    +
    497 "Independent parse context");
    +
    498 }
    +
    499 fixture.Write("BO_ 2 Second: 8 ECU\n");
    +
    500 const DbcDatabase recovered = parser.ParseFile(fixture.path.string());
    +
    501 CHECK(recovered.frames.size() == 1U && recovered.frames[0].canId == 2U,
    +
    502 "Fresh parse after error");
    +
    503}
    +
    504
    +
    505
    +
    506void DbcParserTest::valueDescriptions() {
    +
    507 Fixture fixture;
    +
    508 fixture.Write(
    +
    509 "VAL_\t256\tState\t0\t\"Off\"\t1 \"On\" 2 \"Error with spaces; and \\\"quotes\\\"\";\n"
    +
    510 "BO_ 256 Status: 8 ECU\n"
    +
    511 "SG_ State : 0|8@1+ (2,10) [0|520] \"\" ECU\n"
    +
    512 "VAL_ 256 State 3 \"\";\n"
    +
    513 "VAL_ 2147483904 State -9223372036854775808 \"Minimum\" -1 \"Negative\" 9223372036854775807 \"Maximum\";\n"
    +
    514 "BO_ 2147483904 Extended: 8 ECU\n"
    +
    515 "SG_ State : 0|64@1- (1,0) [-1e20|1e20] \"\" ECU\n"
    +
    516 "BO_ 2048 Unsigned: 8 ECU\n"
    +
    517 "SG_ State : 0|64@1+ (1,0) [0|2e20] \"\" ECU\n"
    +
    518 "VAL_ 2147485696 State 9223372036854775808 \"High\" 18446744073709551615 \"Full\";\n");
    +
    519 const DbcDatabase parsed = DbcParser().ParseFile(fixture.path.string());
    +
    520 const DecodeDatabase runtime = DbcDecodeBuilder().Build(parsed);
    +
    521 const std::unique_ptr<TreeNode> tree = DbcTreeBuilder().Build(parsed);
    +
    522 CHECK(tree->GetChild(0)->GetSignal() == nullptr, "Frame node");
    +
    523 for (std::size_t index = 0; index < parsed.frames.size(); ++index) {
    +
    524 CHECK(tree->GetChild(index)->GetChild(0)->GetSignal()->valueDescriptions ==
    +
    525 parsed.frames[index].signals[0].valueDescriptions &&
    +
    526 runtime.frames[index].signals[0].valueDescriptions ==
    +
    527 parsed.frames[index].signals[0].valueDescriptions,
    +
    528 "All mappings survive both builders");
    +
    529 }
    +
    530 CHECK(tree->GetChild(0)->GetChild(0)->GetSignal()->valueDescriptions ==
    +
    531 runtime.frames[0].signals[0].valueDescriptions,
    +
    532 "Both builders preserve descriptions");
    +
    533 RawCanFrame frame;
    +
    534 frame.canId = 256;
    +
    535 frame.data.resize(8);
    +
    536 const std::string expected[] = {"Off", "On", "Error with spaces; and \"quotes\"", ""};
    +
    537 for (unsigned value = 0; value < 5; ++value) {
    +
    538 frame.data[0] = value;
    +
    539 const DecodedSignalValue decoded = DbcDecoder().Decode(runtime, frame).signals[0];
    +
    540 CHECK(decoded.valid && decoded.physicalValue == value * 2 + 10, "Numeric scaling unchanged");
    +
    541 const std::string *description = decoded.GetValueDescription();
    +
    542 CHECK(value < 4 ? description && *description == expected[value] : !description,
    +
    543 "Raw lookup and unknown value");
    +
    544 }
    +
    545 frame.isExtended = true;
    +
    546 struct Boundary {
    +
    547 std::uint64_t bits;
    +
    548 const char *description;
    +
    549 };
    +
    550 for (const Boundary &test: {Boundary{0x8000000000000000ULL, "Minimum"},
    +
    551 Boundary{0xFFFFFFFFFFFFFFFFULL, "Negative"},
    +
    552 Boundary{0x7FFFFFFFFFFFFFFFULL, "Maximum"}}) {
    +
    553 for (unsigned byte = 0; byte < 8; ++byte)
    +
    554 frame.data[byte] = static_cast<std::uint8_t>(test.bits >> (byte * 8));
    +
    555 const DecodedSignalValue decoded = DbcDecoder().Decode(runtime, frame).signals[0];
    +
    556 CHECK(decoded.GetValueDescription() && *decoded.GetValueDescription() == test.description,
    +
    557 "Signed boundaries and distinct extended frame");
    +
    558 }
    +
    559 frame.canId = 2048;
    +
    560 for (const Boundary &test: {Boundary{0x8000000000000000ULL, "High"},
    +
    561 Boundary{0xFFFFFFFFFFFFFFFFULL, "Full"}}) {
    +
    562 for (unsigned byte = 0; byte < 8; ++byte)
    +
    563 frame.data[byte] = static_cast<std::uint8_t>(test.bits >> (byte * 8));
    +
    564 const DecodedSignalValue decoded = DbcDecoder().Decode(runtime, frame).signals[0];
    +
    565 CHECK(decoded.GetValueDescription() && *decoded.GetValueDescription() == test.description,
    +
    566 "Unsigned boundaries");
    +
    567 }
    +
    568 CHECK(FindValueDescription(runtime.frames[0].signals[0].valueDescriptions, std::int64_t(1)) != nullptr,
    +
    569 "Nonnegative signed lookup matches unsigned key");
    +
    570 frame.data.clear();
    +
    571 CHECK(!DbcDecoder().Decode(runtime, frame).signals[0].GetValueDescription(), "Invalid decode has no description");
    +
    572}
    +
    573
    +
    574void DbcParserTest::invalidValueDescriptions() {
    +
    575 Fixture fixture;
    +
    576 const std::string definitions = "BO_ 1 Frame: 8 ECU\nSG_ State : 0|64@1+ (1,0) [0|2e20] \"\" ECU\n";
    +
    577 for (const std::string statement: {
    +
    578 "VAL_", "VAL_ 1 State;", "VAL_ 1 State ;", "VAL_ 1 State 0 \"Off\"",
    +
    579 "VAL_ 1 State 0 \"Off\"; junk", "VAL_ 1 State 0 Off;",
    +
    580 "VAL_ 1 State 0 \"Unclosed;", "VAL_ 1 State 0 \"Off\"1 \"On\";",
    +
    581 "VAL_ 1 State 0 \"Off\" 00 \"Duplicate\";",
    +
    582 "VAL_ 1 State 0 \"Off\" -0 \"Duplicate\";",
    +
    583 "VAL_ 1 State 0 \"Off\";\nVAL_ 1 State 0 \"Duplicate\";",
    +
    584 "VAL_ 2 State 0 \"Missing frame\";", "VAL_ 1 Missing 0 \"Missing signal\";",
    +
    585 "VAL_ -1 State 0 \"Bad ID\";", "VAL_ 536870912 State 0 \"Bad ID\";",
    +
    586 "VAL_ 4294967296 State 0 \"Bad ID\";", "VAL_ Environment 0 \"Unsupported\";",
    +
    587 "VAL_ 1 State 0 \"Bad\\q escape\";"}) {
    +
    588 fixture.Write(definitions + statement + '\n');
    +
    589 const int line = statement.find('\n') == std::string::npos ? 3 : 4;
    +
    590 try {
    +
    591 DbcParser().ParseFile(fixture.path.string());
    +
    592 CHECK(false, statement);
    +
    593 } catch (const std::runtime_error &error) {
    +
    594 CHECK(std::string(error.what()).find(fixture.path.string() + ":" + std::to_string(line) + ": ") == 0,
    +
    595 statement + " " + error.what());
    +
    596 }
    +
    597 }
    +
    598 for (const std::string suffix: {
    +
    599 "BO_ 1 Other: 8 ECU\n", // Duplicate frame definition.
    +
    600 "SG_ State : 0|8@1+ (1,0) [0|255] \"\" ECU\n",// Duplicate signal definition.
    +
    601 ""}) {
    +
    602 fixture.Write("VAL_ 1 " + std::string(suffix.empty() ? "Missing" : "State") +
    +
    603 " 0 \"Description\";\n" + definitions + suffix);
    +
    604 try {
    +
    605 DbcParser().ParseFile(fixture.path.string());
    +
    606 CHECK(false, "Missing reference or duplicate definition");
    +
    607 } catch (const std::runtime_error &error) {
    +
    608 const std::string line = suffix.empty() ? "1" : "4";
    +
    609 CHECK(std::string(error.what()).find(fixture.path.string() + ":" + line + ": ") == 0,
    +
    610 "Error retains the reference or duplicate definition source location");
    +
    611 }
    +
    612 }
    +
    613 for (const std::string number: {"+1", "1x", "0x10", "1.5", "1e2", "--1",
    +
    614 "-9223372036854775809", "18446744073709551616"}) {
    +
    615 fixture.Write("VAL_ 1 State " + number + " \"Bad\";\n" + definitions);
    +
    616 try {
    +
    617 DbcParser().ParseFile(fixture.path.string());
    +
    618 CHECK(false, number);
    +
    619 } catch (const std::runtime_error &error) {
    +
    620 CHECK(std::string(error.what()).find(fixture.path.string() + ":1: ") == 0, number);
    +
    621 }
    +
    622 }
    +
    623}
    +
    624
    +
    625int RunParserTests(int argc, char **argv) {
    +
    626 DbcParserTest tests;
    +
    627 return QTest::qExec(&tests, argc, argv);
    +
    628}
    +
    629
    +
    630#include "dbc_parser_test.moc"
    +
    Converts parsed DBC data into runtime decode database.
    +
    DecodeDatabase Build(const DbcDatabase &source) const
    Build runtime decode database.
    +
    Runtime CAN decoder using prebuilt decode database.
    Definition dbc_decoder.h:72
    +
    DecodedFrameValue Decode(const DecodeDatabase &database, const RawCanFrame &frame) const
    Decode one raw CAN frame.
    +
    Minimal DBC parser.
    Definition dbc_parser.h:34
    +
    DbcDatabase ParseFile(const std::string &filePath) const
    Parse DBC file.
    + +
    bool Dispatch(const std::string &line, DbcParseContext &context) const
    + +
    Builds a simple tree from parsed DBC database.
    +
    std::unique_ptr< TreeNode > Build(const DbcDatabase &database) const
    Build tree representation of parsed DBC data.
    +
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    +
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    +
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    Parsed DBC content stored in a simple internal form.
    std::vector< FrameInfo > frames
    - + +
    Runtime decode database with fast lookup by CAN ID.
    +
    std::string comment
    +
    Fully decoded frame.
    Definition dbc_decoder.h:61
    + +
    const DecodeFrame * definition
    Definition dbc_decoder.h:62
    +
    One decoded signal value.
    Definition dbc_decoder.h:43
    + + +
    const std::string * GetValueDescription() const
    Definition dbc_decoder.h:51
    +
    Describes one CAN frame from a DBC file.
    Definition frame_info.h:24
    +
    bool isExtended
    Definition frame_info.h:27
    +
    std::string transmitter
    Definition frame_info.h:31
    +
    std::uint8_t dlc
    Definition frame_info.h:30
    +
    std::string name
    Definition frame_info.h:25
    +
    std::uint32_t canId
    Definition frame_info.h:26
    +
    Raw CAN frame used for runtime or trace decoding.
    Definition dbc_decoder.h:24
    +
    std::vector< std::uint8_t > data
    Definition dbc_decoder.h:27
    +
    std::uint32_t canId
    Definition dbc_decoder.h:25
    +
    bool isExtended
    Definition dbc_decoder.h:26
    +
    Describes one signal inside a DBC frame.
    Definition signal_info.h:24
    +
    std::uint32_t length
    Definition signal_info.h:28
    +
    std::string unit
    Definition signal_info.h:35
    +
    std::vector< std::string > receivers
    Definition signal_info.h:36
    +
    std::string name
    Definition signal_info.h:26
    +
    bool isSigned
    Definition signal_info.h:30
    +
    double offset
    Definition signal_info.h:32
    +
    std::uint32_t startBit
    Definition signal_info.h:27
    +
    double minimum
    Definition signal_info.h:33
    +
    double maximum
    Definition signal_info.h:34
    +
    double factor
    Definition signal_info.h:31
    +
    bool isLittleEndian
    Definition signal_info.h:29
    diff --git a/docs/html/dbc__statement__handler_8cpp_source.html b/docs/html/dbc__statement__handler_8cpp_source.html index b59fda7..97e7cb9 100644 --- a/docs/html/dbc__statement__handler_8cpp_source.html +++ b/docs/html/dbc__statement__handler_8cpp_source.html @@ -100,7 +100,7 @@ $(document).ready(function(){initNavTree('dbc__statement__handler_8cpp_source.ht
    1// SPDX-License-Identifier: MIT
    2#include "dbc_statement_handler.h"
    -
    3#include <cctype>
    +
    3#include "text_utils.h"
    4#include <charconv>
    5#include <cmath>
    6#include <limits>
    @@ -113,7 +113,7 @@ $(document).ready(function(){initNavTree('dbc__statement__handler_8cpp_source.ht
    13 std::uint32_t maximum,
    14 const char *field) {
    15 std::uint32_t value = 0U;
    -
    16 const auto parsed = std::from_chars(text.data(), text.data() + text.size(), value);
    +
    16 const std::from_chars_result parsed = std::from_chars(text.data(), text.data() + text.size(), value);
    17 if (text.empty() || parsed.ec != std::errc() ||
    18 parsed.ptr != text.data() + text.size() || value > maximum)
    19 throw std::runtime_error(std::string("Invalid ") + field + ": " + text);
    @@ -137,292 +137,492 @@ $(document).ready(function(){initNavTree('dbc__statement__handler_8cpp_source.ht
    37 return value;
    38 }
    39
    -
    45 std::string TrimText(const std::string &text) {
    -
    46 std::string::size_type begin = 0U;
    -
    47 while ((begin < text.size()) &&
    -
    48 std::isspace(static_cast<unsigned char>(text[begin])))
    -
    49 ++begin;
    -
    50
    -
    51 std::string::size_type end = text.size();
    -
    52 while ((end > begin) &&
    -
    53 std::isspace(static_cast<unsigned char>(text[end - 1U])))
    -
    54 --end;
    -
    55
    -
    56 return text.substr(begin, end - begin);
    -
    57 }
    -
    58 FrameInfo *FindFrameById(DbcDatabase &, std::uint32_t, bool);
    -
    59 SignalInfo *FindSignalByName(FrameInfo &, const std::string &);
    -
    60}// namespace
    -
    61
    -
    62namespace {
    -
    63 std::vector<std::string> SplitReceivers(const std::string &text) {
    -
    64 std::vector<std::string> receivers;
    -
    65 std::string token;
    -
    66 std::istringstream stream(text);
    -
    67
    -
    68 while (std::getline(stream, token, ',')) {
    -
    69 token = TrimText(token);
    -
    70 if (!token.empty())
    -
    71 receivers.push_back(token);
    -
    72 }
    -
    73
    -
    74 return receivers;
    -
    75 }
    -
    76
    -
    77 void NormalizeCanId(std::uint32_t rawCanId,
    -
    78 std::uint32_t &normalizedCanId,
    -
    79 bool &isExtended) {
    -
    80 /*
    -
    81 * DBC commonly stores extended identifiers with bit 31 set.
    -
    82 * Example:
    -
    83 * raw id = 0x80000000 | actual_29_bit_id
    -
    84 */
    -
    85 if ((rawCanId & 0x80000000U) != 0U) {
    -
    86 isExtended = true;
    -
    87 normalizedCanId = (rawCanId & 0x1FFFFFFFU);
    -
    88 } else {
    -
    89 isExtended = (rawCanId > 0x7FFU);
    -
    90 normalizedCanId = rawCanId;
    -
    91 }
    -
    92 }
    -
    93
    -
    94 std::uint32_t TryExtractPgn(std::uint32_t canId, bool isExtended, bool &hasPgn) {
    -
    95 hasPgn = false;
    -
    96
    -
    97 if (!isExtended)
    -
    98 return 0U;
    -
    99
    -
    100 if ((canId & 0x1FFFFFFFU) != canId)
    -
    101 return 0U;
    -
    102
    -
    103 const std::uint32_t pf = (canId >> 16U) & 0xFFU;
    -
    104 const std::uint32_t ps = (canId >> 8U) & 0xFFU;
    -
    105 const std::uint32_t dp = (canId >> 24U) & 0x01U;
    -
    106
    -
    107 std::uint32_t pgn = 0U;
    -
    108
    -
    109 if (pf < 240U)
    -
    110 pgn = (dp << 16U) | (pf << 8U);
    -
    111 else
    -
    112 pgn = (dp << 16U) | (pf << 8U) | ps;
    -
    113
    -
    114 hasPgn = true;
    -
    115 return pgn;
    -
    116 }
    -
    117
    -
    118}// namespace
    -
    119
    -
    120FrameInfo DbcFrameHandler::ParseFrameLine(const std::string &line) {
    -
    121 /*
    -
    122 * Example:
    -
    123 * BO_ 256 EngineData: 8 EEC1
    -
    124 */
    -
    125
    -
    126 std::istringstream stream(line);
    -
    127 std::string keyword;
    -
    128 std::string idText;
    -
    129 if (!(stream >> keyword >> idText) || keyword != "BO_")
    -
    130 throw std::runtime_error("Missing CAN ID in frame definition.");
    -
    131
    -
    132 const std::uint32_t rawCanId = ParseDecimal(
    -
    133 idText, std::numeric_limits<std::uint32_t>::max(), "CAN ID");
    -
    134 // Only bit 31 may accompany the actual 29-bit identifier.
    -
    135 if ((rawCanId & 0x60000000U) != 0U)
    -
    136 throw std::runtime_error("CAN ID exceeds the 29-bit identifier range.");
    -
    137
    -
    138 std::string nameText;
    -
    139 if (!std::getline(stream, nameText, ':') || stream.eof())
    -
    140 throw std::runtime_error("Missing ':' in frame definition.");
    -
    141 std::istringstream nameStream(nameText);
    -
    142 FrameInfo frame;
    -
    143 std::string extra;
    -
    144 if (!(nameStream >> frame.name) || (nameStream >> extra))
    -
    145 throw std::runtime_error("Missing or invalid frame name.");
    -
    146
    -
    147 std::string lengthText;
    -
    148 if (!(stream >> lengthText))
    -
    149 throw std::runtime_error("Missing payload length in frame definition.");
    -
    150 frame.dlc = static_cast<std::uint8_t>(ParseDecimal(
    -
    151 lengthText, std::numeric_limits<std::uint8_t>::max(), "payload length"));
    -
    152 if (!(stream >> frame.transmitter))
    -
    153 throw std::runtime_error("Missing transmitter in frame definition.");
    -
    154 if (stream >> extra)
    -
    155 throw std::runtime_error("Unexpected trailing field in frame definition: " + extra);
    +
    40 Multiplexing ParseMultiplexingMarker(const std::string &marker) {
    +
    41 Multiplexing result;
    +
    42 if (marker == "M")
    +
    43 result.role = MultiplexRole::Selector;
    +
    44 else if (!marker.empty()) {
    +
    45 if (marker[0] != 'm')
    +
    46 throw std::runtime_error("Unsupported multiplexing marker.");
    +
    47 const std::string value = marker.substr(1U);
    +
    48 const std::from_chars_result parsed =
    +
    49 std::from_chars(value.data(), value.data() + value.size(), result.value);
    +
    50 if (value.empty() || parsed.ec != std::errc() || parsed.ptr != value.data() + value.size())
    +
    51 throw std::runtime_error("Invalid or unsupported multiplexing marker.");
    +
    52 result.role = MultiplexRole::Branch;
    +
    53 }
    +
    54
    +
    55 return result;
    +
    56 }
    +
    57
    +
    58 RawSignalValue ParseValueKey(const std::string &number) {
    +
    59 RawSignalValue key;
    +
    60 if (!number.empty() && number[0] == '-') {
    +
    61 std::int64_t value = 0;
    +
    62 const std::from_chars_result parsed =
    +
    63 std::from_chars(number.data(), number.data() + number.size(), value);
    +
    64 if (parsed.ec != std::errc() || parsed.ptr != number.data() + number.size())
    +
    65 throw std::runtime_error("Invalid VAL_ integer: " + number);
    +
    66 key = NormalizeValueKey(RawSignalValue(value));
    +
    67 } else {
    +
    68 std::uint64_t value = 0;
    +
    69 const std::from_chars_result parsed =
    +
    70 std::from_chars(number.data(), number.data() + number.size(), value);
    +
    71 if (number.empty() || parsed.ec != std::errc() || parsed.ptr != number.data() + number.size())
    +
    72 throw std::runtime_error("Invalid VAL_ integer: " + number);
    +
    73 key = value;
    +
    74 }
    +
    75 return key;
    +
    76 }
    +
    77
    +
    78 std::string UnescapeDescription(const std::string &quoted) {
    +
    79 std::string description;
    +
    80 for (std::size_t i = 0; i < quoted.size(); ++i) {
    +
    81 if (quoted[i] == '\\')
    +
    82 ++i;
    +
    83 description += quoted[i];
    +
    84 }
    +
    85 return description;
    +
    86 }
    +
    87
    +
    88 FrameInfo *FindUniqueFrame(DbcDatabase &database, std::uint32_t canId, bool isExtended) {
    +
    89 FrameInfo *frame = nullptr;
    +
    90 for (FrameInfo &candidate : database.frames) {
    +
    91 if (candidate.canId == canId && candidate.isExtended == isExtended) {
    +
    92 if (frame)
    +
    93 throw std::runtime_error("Ambiguous VAL_ frame reference.");
    +
    94 frame = &candidate;
    +
    95 }
    +
    96 }
    +
    97 if (!frame)
    +
    98 throw std::runtime_error("Unresolved VAL_ frame reference.");
    +
    99 return frame;
    +
    100 }
    +
    101
    +
    102 SignalInfo *FindUniqueSignal(FrameInfo &frame, const std::string &signalName) {
    +
    103 SignalInfo *signal = nullptr;
    +
    104 for (SignalInfo &candidate : frame.signals) {
    +
    105 if (candidate.name == signalName) {
    +
    106 if (signal)
    +
    107 throw std::runtime_error("Ambiguous VAL_ signal reference: " + signalName);
    +
    108 signal = &candidate;
    +
    109 }
    +
    110 }
    +
    111 if (!signal)
    +
    112 throw std::runtime_error("Unresolved VAL_ signal reference: " + signalName);
    +
    113 return signal;
    +
    114 }
    +
    115
    +
    116 std::uint64_t NextSignalBit(std::uint64_t bit, bool isLittleEndian) {
    +
    117 if (isLittleEndian)
    +
    118 return bit + 1U;
    +
    119 // From bit 0, Motorola continues at bit 7 of the next byte (0 -> 15).
    +
    120 return bit % 8U == 0U ? bit + 15U : bit - 1U;
    +
    121 }
    +
    122
    +
    123 FrameInfo *FindFrameById(DbcDatabase &, std::uint32_t, bool);
    +
    124 SignalInfo *FindSignalByName(FrameInfo &, const std::string &);
    +
    125} // namespace
    +
    126
    +
    127namespace {
    +
    128 std::vector<std::string> SplitReceivers(const std::string &text) {
    +
    129 std::vector<std::string> receivers;
    +
    130 std::string token;
    +
    131 std::istringstream stream(text);
    +
    132
    +
    133 while (std::getline(stream, token, ',')) {
    +
    134 token = dbc_detail::TrimText(token);
    +
    135 if (!token.empty())
    +
    136 receivers.push_back(token);
    +
    137 }
    +
    138
    +
    139 return receivers;
    +
    140 }
    +
    141
    +
    142 void NormalizeCanId(std::uint32_t rawCanId, std::uint32_t &normalizedCanId, bool &isExtended) {
    +
    143 /*
    +
    144 * DBC commonly stores extended identifiers with bit 31 set.
    +
    145 * Example:
    +
    146 * raw id = 0x80000000 | actual_29_bit_id
    +
    147 */
    +
    148 if ((rawCanId & 0x80000000U) != 0U) {
    +
    149 isExtended = true;
    +
    150 normalizedCanId = (rawCanId & 0x1FFFFFFFU);
    +
    151 } else {
    +
    152 isExtended = (rawCanId > 0x7FFU);
    +
    153 normalizedCanId = rawCanId;
    +
    154 }
    +
    155 }
    156
    -
    157 NormalizeCanId(rawCanId, frame.canId, frame.isExtended);
    -
    158 frame.pgn = TryExtractPgn(frame.canId, frame.isExtended, frame.hasPgn);
    +
    157 std::uint32_t TryExtractPgn(std::uint32_t canId, bool isExtended, bool &hasPgn) {
    +
    158 hasPgn = false;
    159
    -
    160 return frame;
    -
    161}
    +
    160 if (!isExtended)
    +
    161 return 0U;
    162
    -
    163SignalInfo DbcSignalHandler::ParseSignalLine(const std::string &line) {
    -
    164 // Match the complete statement before converting any numeric fields.
    -
    165 static const std::regex syntax(
    -
    166 R"dbc(^SG_[ \t]+([^:]+):[ \t]*([^| \t]+)[ \t]*\|[ \t]*([^@ \t]+)[ \t]*@[ \t]*([01])([+-])[ \t]*\‍([ \t]*([^, \t]+)[ \t]*,[ \t]*([^ )\t]+)[ \t]*\)[ \t]*\[[ \t]*([^| \t]+)[ \t]*\|[ \t]*([^\] \t]+)[ \t]*\][ \t]*"([^"\r\n]*)"[ \t]+([^ \t,]+(?:[ \t]*,[ \t]*[^ \t,]+)*)[ \t]*$)dbc");
    -
    167 std::smatch fields;
    -
    168 if (!std::regex_match(line, fields, syntax))
    -
    169 throw std::runtime_error("Malformed or unsupported SG_ signal definition.");
    -
    170
    -
    171 SignalInfo signal;
    -
    172 signal.name = TrimText(fields[1].str());
    -
    173 if (signal.name.empty() || signal.name.find_first_of(" \t\r\n") != std::string::npos)
    -
    174 throw std::runtime_error("Invalid signal name or unsupported multiplexing syntax.");
    -
    175
    -
    176 signal.startBit = ParseDecimal(fields[2].str(),
    -
    177 std::numeric_limits<std::uint32_t>::max(), "signal start bit");
    -
    178 signal.length = ParseDecimal(fields[3].str(), 64U, "signal length");
    -
    179 if (signal.length == 0U)
    -
    180 throw std::runtime_error("Signal length must be within 1..64 bits.");
    -
    181 signal.isLittleEndian = fields[4].str() == "1";
    -
    182 signal.isSigned = fields[5].str() == "-";
    -
    183
    -
    184 signal.factor = ParsePhysicalValue(fields[6].str(), "signal factor");
    -
    185 signal.offset = ParsePhysicalValue(fields[7].str(), "signal offset");
    -
    186 signal.minimum = ParsePhysicalValue(fields[8].str(), "signal minimum");
    -
    187 signal.maximum = ParsePhysicalValue(fields[9].str(), "signal maximum");
    -
    188 if (signal.minimum > signal.maximum)
    -
    189 throw std::runtime_error("Signal minimum exceeds maximum.");
    -
    190 signal.unit = fields[10].str();
    -
    191 signal.receivers = SplitReceivers(fields[11].str());
    -
    192 return signal;
    -
    193}
    +
    163 if ((canId & 0x1FFFFFFFU) != canId)
    +
    164 return 0U;
    +
    165
    +
    166 const std::uint32_t pf = (canId >> 16U) & 0xFFU;
    +
    167 const std::uint32_t ps = (canId >> 8U) & 0xFFU;
    +
    168 const std::uint32_t dp = (canId >> 24U) & 0x01U;
    +
    169
    +
    170 std::uint32_t pgn = 0U;
    +
    171
    +
    172 if (pf < 240U)
    +
    173 pgn = (dp << 16U) | (pf << 8U);
    +
    174 else
    +
    175 pgn = (dp << 16U) | (pf << 8U) | ps;
    +
    176
    +
    177 hasPgn = true;
    +
    178 return pgn;
    +
    179 }
    +
    180
    +
    181} // namespace
    +
    182
    +
    183FrameInfo DbcFrameHandler::ParseFrameLine(const std::string &line) {
    +
    184 /*
    +
    185 * Example:
    +
    186 * BO_ 256 EngineData: 8 EEC1
    +
    187 */
    +
    188
    +
    189 std::istringstream stream(line);
    +
    190 std::string keyword;
    +
    191 std::string idText;
    +
    192 if (!(stream >> keyword >> idText) || keyword != "BO_")
    +
    193 throw std::runtime_error("Missing CAN ID in frame definition.");
    194
    -
    195void DbcCommentHandler::ParseCommentLine(const std::string &line, DbcDatabase &database) {
    -
    196 /*
    -
    197 * Examples:
    -
    198 * CM_ BO_ 256 "Frame comment";
    -
    199 * CM_ SG_ 256 EngineSpeed "Signal comment";
    -
    200 */
    -
    201
    -
    202 std::istringstream stream(line);
    -
    203 std::string token;
    -
    204 stream >> token;
    -
    205
    -
    206 if (token != "CM_")
    -
    207 return;
    -
    208
    -
    209 stream >> token;
    -
    210
    -
    211 if (token == "BO_") {
    -
    212 std::uint32_t rawCanId = 0U;
    -
    213 std::uint32_t canId = 0U;
    -
    214 bool isExtended = false;
    -
    215
    -
    216 stream >> rawCanId;
    -
    217 NormalizeCanId(rawCanId, canId, isExtended);
    -
    218
    -
    219 const std::string::size_type quoteBegin = line.find('"');
    -
    220 const std::string::size_type quoteEnd = line.rfind('"');
    -
    221
    -
    222 if ((quoteBegin == std::string::npos) ||
    -
    223 (quoteEnd == std::string::npos) ||
    -
    224 (quoteEnd <= quoteBegin))
    -
    225 return;
    -
    226
    -
    227 FrameInfo *frame = FindFrameById(database, canId, isExtended);
    -
    228 if (frame != nullptr)
    -
    229 frame->comment = line.substr(quoteBegin + 1U, quoteEnd - quoteBegin - 1U);
    -
    230 } else if (token == "SG_") {
    -
    231 std::uint32_t rawCanId = 0U;
    -
    232 std::uint32_t canId = 0U;
    -
    233 bool isExtended = false;
    -
    234 std::string signalName;
    -
    235
    -
    236 stream >> rawCanId;
    -
    237 stream >> signalName;
    -
    238
    -
    239 NormalizeCanId(rawCanId, canId, isExtended);
    -
    240
    -
    241 const std::string::size_type quoteBegin = line.find('"');
    -
    242 const std::string::size_type quoteEnd = line.rfind('"');
    -
    243
    -
    244 if ((quoteBegin == std::string::npos) ||
    -
    245 (quoteEnd == std::string::npos) ||
    -
    246 (quoteEnd <= quoteBegin))
    -
    247 return;
    -
    248
    -
    249 FrameInfo *frame = FindFrameById(database, canId, isExtended);
    -
    250 if (frame != nullptr) {
    -
    251 SignalInfo *signal = FindSignalByName(*frame, signalName);
    -
    252 if (signal != nullptr)
    -
    253 signal->comment = line.substr(quoteBegin + 1U, quoteEnd - quoteBegin - 1U);
    -
    254 }
    -
    255 }
    -
    256}
    -
    257
    -
    258namespace {
    -
    259 FrameInfo *FindFrameById(DbcDatabase &database,
    -
    260 std::uint32_t canId,
    -
    261 bool isExtended) {
    -
    262 for (std::size_t index = 0U; index < database.frames.size(); ++index) {
    -
    263 if ((database.frames[index].canId == canId) &&
    -
    264 (database.frames[index].isExtended == isExtended))
    -
    265 return &database.frames[index];
    -
    266 }
    -
    267
    -
    268 return nullptr;
    -
    269 }
    -
    270
    -
    271 SignalInfo *FindSignalByName(FrameInfo &frame, const std::string &signalName) {
    -
    272 for (std::size_t index = 0U; index < frame.signals.size(); ++index) {
    -
    273 if (frame.signals[index].name == signalName)
    -
    274 return &frame.signals[index];
    -
    275 }
    -
    276
    -
    277 return nullptr;
    -
    278 }
    -
    279}// namespace
    -
    280
    -
    281void DbcFrameHandler::Handle(const std::string &line, DbcParseContext &context) const {
    -
    282 context.database.frames.push_back(ParseFrameLine(line));
    -
    283 context.currentFrame = &context.database.frames.back();
    -
    284}
    +
    195 const std::uint32_t rawCanId = ParseDecimal(
    +
    196 idText, std::numeric_limits<std::uint32_t>::max(), "CAN ID");
    +
    197 // Only bit 31 may accompany the actual 29-bit identifier.
    +
    198 if ((rawCanId & 0x60000000U) != 0U)
    +
    199 throw std::runtime_error("CAN ID exceeds the 29-bit identifier range.");
    +
    200
    +
    201 std::string nameText;
    +
    202 if (!std::getline(stream, nameText, ':') || stream.eof())
    +
    203 throw std::runtime_error("Missing ':' in frame definition.");
    +
    204 std::istringstream nameStream(nameText);
    +
    205 FrameInfo frame;
    +
    206 std::string extra;
    +
    207 if (!(nameStream >> frame.name) || (nameStream >> extra))
    +
    208 throw std::runtime_error("Missing or invalid frame name.");
    +
    209
    +
    210 std::string lengthText;
    +
    211 if (!(stream >> lengthText))
    +
    212 throw std::runtime_error("Missing payload length in frame definition.");
    +
    213 frame.dlc = static_cast<std::uint8_t>(ParseDecimal(
    +
    214 lengthText, std::numeric_limits<std::uint8_t>::max(), "payload length"));
    +
    215 if (!(stream >> frame.transmitter))
    +
    216 throw std::runtime_error("Missing transmitter in frame definition.");
    +
    217 if (stream >> extra)
    +
    218 throw std::runtime_error("Unexpected trailing field in frame definition: " + extra);
    +
    219
    +
    220 NormalizeCanId(rawCanId, frame.canId, frame.isExtended);
    +
    221 frame.pgn = TryExtractPgn(frame.canId, frame.isExtended, frame.hasPgn);
    +
    222
    +
    223 return frame;
    +
    224}
    +
    225
    +
    226SignalInfo DbcSignalHandler::ParseSignalLine(const std::string &line) {
    +
    227 // Match the complete statement before converting any numeric fields.
    +
    228 enum Field {
    +
    229 NameAndMarker = 1, StartBit, BitLength, ByteOrder, Signedness,
    +
    230 Factor, Offset, Minimum, Maximum, Unit, Receivers
    +
    231 };
    +
    232 static const std::regex syntax(
    +
    233 // Name and optional multiplexing marker.
    +
    234 R"dbc(^SG_[ \t]+([^:]+):[ \t]*)dbc"
    +
    235 // Bit position, length, byte order and signedness.
    +
    236 R"dbc(([^| \t]+)[ \t]*\|[ \t]*([^@ \t]+)[ \t]*@[ \t]*([01])([+-])[ \t]*)dbc"
    +
    237 // Scaling factor and offset.
    +
    238 R"dbc(\‍([ \t]*([^, \t]+)[ \t]*,[ \t]*([^ )\t]+)[ \t]*\)[ \t]*)dbc"
    +
    239 // Physical range.
    +
    240 R"dbc(\[[ \t]*([^| \t]+)[ \t]*\|[ \t]*([^\] \t]+)[ \t]*\][ \t]*)dbc"
    +
    241 // Unit and receivers.
    +
    242 R"dbc("([^"\r\n]*)"[ \t]+([^ \t,]+(?:[ \t]*,[ \t]*[^ \t,]+)*)[ \t]*$)dbc");
    +
    243 std::smatch fields;
    +
    244 if (!std::regex_match(line, fields, syntax))
    +
    245 throw std::runtime_error("Malformed or unsupported SG_ signal definition.");
    +
    246
    +
    247 SignalInfo signal;
    +
    248 std::istringstream nameFields(fields[NameAndMarker].str());
    +
    249 std::string marker;
    +
    250 std::string extra;
    +
    251 nameFields >> signal.name >> marker;
    +
    252 if (signal.name.empty() || (nameFields >> extra))
    +
    253 throw std::runtime_error("Invalid signal name or multiplexing marker.");
    +
    254 signal.multiplexing = ParseMultiplexingMarker(marker);
    +
    255
    +
    256 signal.startBit = ParseDecimal(fields[StartBit].str(),
    +
    257 std::numeric_limits<std::uint32_t>::max(), "signal start bit");
    +
    258 signal.length = ParseDecimal(fields[BitLength].str(), 64U, "signal length");
    +
    259 if (signal.length == 0U)
    +
    260 throw std::runtime_error("Signal length must be within 1..64 bits.");
    +
    261 signal.isLittleEndian = fields[ByteOrder].str() == "1";
    +
    262 signal.isSigned = fields[Signedness].str() == "-";
    +
    263
    +
    264 signal.factor = ParsePhysicalValue(fields[Factor].str(), "signal factor");
    +
    265 signal.offset = ParsePhysicalValue(fields[Offset].str(), "signal offset");
    +
    266 signal.minimum = ParsePhysicalValue(fields[Minimum].str(), "signal minimum");
    +
    267 signal.maximum = ParsePhysicalValue(fields[Maximum].str(), "signal maximum");
    +
    268 if (signal.minimum > signal.maximum)
    +
    269 throw std::runtime_error("Signal minimum exceeds maximum.");
    +
    270 signal.unit = fields[Unit].str();
    +
    271 signal.receivers = SplitReceivers(fields[Receivers].str());
    +
    272 return signal;
    +
    273}
    +
    274
    +
    275void DbcCommentHandler::ParseCommentLine(const std::string &line, DbcDatabase &database) {
    +
    276 /*
    +
    277 * Examples:
    +
    278 * CM_ BO_ 256 "Frame comment";
    +
    279 * CM_ SG_ 256 EngineSpeed "Signal comment";
    +
    280 */
    +
    281
    +
    282 std::istringstream stream(line);
    +
    283 std::string token;
    +
    284 stream >> token;
    285
    -
    286void DbcSignalHandler::Handle(const std::string &line, DbcParseContext &context) const {
    -
    287 if (context.currentFrame == nullptr)
    -
    288 throw std::runtime_error("Signal found before any frame definition.");
    -
    289 SignalInfo signal = ParseSignalLine(line);
    -
    290 const std::uint64_t payloadBits = static_cast<std::uint64_t>(context.currentFrame->dlc) * 8U;
    -
    291 std::uint64_t bit = signal.startBit;
    -
    292 for (std::uint32_t index = 0U; index < signal.length; ++index) {
    -
    293 if (bit >= payloadBits)
    -
    294 throw std::runtime_error("Signal exceeds the frame payload length.");
    -
    295 if (signal.isLittleEndian)
    -
    296 ++bit;
    -
    297 else
    -
    298 bit = (bit % 8U == 0U) ? bit + 15U : bit - 1U;
    -
    299 }
    -
    300 context.currentFrame->signals.push_back(std::move(signal));
    -
    301}
    -
    302
    -
    303void DbcCommentHandler::Handle(const std::string &line, DbcParseContext &context) const {
    -
    304 if (line.compare(0U, 4U, "CM_ ") == 0)
    -
    305 ParseCommentLine(line, context.database);
    -
    306}
    -
    307
    -
    308DbcStatementDispatcher::DbcStatementDispatcher() {
    -
    309 RegisterType<DbcFrameHandler>("BO_");
    -
    310 RegisterType<DbcSignalHandler>("SG_");
    -
    311 RegisterType<DbcCommentHandler>("CM_");
    -
    312}
    -
    313
    -
    -
    314bool DbcStatementDispatcher::Dispatch(const std::string &line,
    -
    315 DbcParseContext &context) const {
    -
    316 std::istringstream stream(line);
    -
    317 std::string keyword;
    -
    318 stream >> keyword;
    -
    319 const auto handler = m_handlers.find(keyword);
    -
    320 if (handler == m_handlers.end())
    -
    321 return false;
    -
    322 handler->second->Handle(line, context);
    -
    323 return true;
    -
    324}
    +
    286 if (token != "CM_")
    +
    287 return;
    +
    288
    +
    289 stream >> token;
    +
    290 if (token != "BO_" && token != "SG_")
    +
    291 return;
    +
    292
    +
    293 std::uint32_t rawCanId = 0U;
    +
    294 std::uint32_t canId = 0U;
    +
    295 bool isExtended = false;
    +
    296 std::string signalName;
    +
    297 stream >> rawCanId;
    +
    298 if (token == "SG_")
    +
    299 stream >> signalName;
    +
    300 NormalizeCanId(rawCanId, canId, isExtended);
    +
    301
    +
    302 const std::string::size_type quoteBegin = line.find('"');
    +
    303 const std::string::size_type quoteEnd = line.rfind('"');
    +
    304 if (quoteBegin == std::string::npos || quoteEnd == std::string::npos || quoteEnd <= quoteBegin)
    +
    305 return;
    +
    306
    +
    307 FrameInfo *frame = FindFrameById(database, canId, isExtended);
    +
    308 if (frame == nullptr)
    +
    309 return;
    +
    310 const std::string comment = line.substr(quoteBegin + 1U, quoteEnd - quoteBegin - 1U);
    +
    311 if (token == "BO_") {
    +
    312 frame->comment = comment;
    +
    313 return;
    +
    314 }
    +
    315 SignalInfo *signal = FindSignalByName(*frame, signalName);
    +
    316 if (signal != nullptr)
    +
    317 signal->comment = comment;
    +
    318}
    +
    319
    +
    320namespace {
    +
    321 FrameInfo *FindFrameById(DbcDatabase &database,
    +
    322 std::uint32_t canId,
    +
    323 bool isExtended) {
    +
    324 for (FrameInfo &frame : database.frames) {
    +
    325 if (frame.canId == canId && frame.isExtended == isExtended)
    +
    326 return &frame;
    +
    327 }
    +
    328
    +
    329 return nullptr;
    +
    330 }
    +
    331
    +
    332 SignalInfo *FindSignalByName(FrameInfo &frame, const std::string &signalName) {
    +
    333 for (SignalInfo &signal : frame.signals) {
    +
    334 if (signal.name == signalName)
    +
    335 return &signal;
    +
    336 }
    +
    337
    +
    338 return nullptr;
    +
    339 }
    +
    340}// namespace
    +
    341
    +
    342void DbcFrameHandler::Handle(const std::string &line, DbcParseContext &context) const {
    +
    343 FrameInfo frame = ParseFrameLine(line);
    +
    344 if (FindFrameById(context.database, frame.canId, frame.isExtended) != nullptr)
    +
    345 throw std::runtime_error("Duplicate " + std::string(frame.isExtended ? "extended" : "standard") +
    +
    346 " frame CAN ID: " + std::to_string(frame.canId));
    +
    347 context.database.frames.push_back(std::move(frame));
    +
    348 context.currentFrame = &context.database.frames.back();
    +
    349 context.signalLines.emplace_back();
    +
    350}
    +
    351
    +
    352void DbcSignalHandler::Handle(const std::string &line, DbcParseContext &context) const {
    +
    353 if (context.currentFrame == nullptr)
    +
    354 throw std::runtime_error("Signal found before any frame definition.");
    +
    355 SignalInfo signal = ParseSignalLine(line);
    +
    356 if (FindSignalByName(*context.currentFrame, signal.name) != nullptr)
    +
    357 throw std::runtime_error("Duplicate signal name '" + signal.name +
    +
    358 "' in frame '" + context.currentFrame->name + "'.");
    +
    359 const std::uint64_t payloadBits = static_cast<std::uint64_t>(context.currentFrame->dlc) * 8U;
    +
    360 std::uint64_t bit = signal.startBit;
    +
    361 for (std::uint32_t index = 0U; index < signal.length; ++index) {
    +
    362 if (bit >= payloadBits)
    +
    363 throw std::runtime_error("Signal exceeds the frame payload length.");
    +
    364 bit = NextSignalBit(bit, signal.isLittleEndian);
    +
    365 }
    +
    366 context.currentFrame->signals.push_back(std::move(signal));
    +
    367 context.signalLines.back().push_back(context.lineNumber);
    +
    368}
    +
    369
    +
    370void DbcCommentHandler::Handle(const std::string &line, DbcParseContext &context) const {
    +
    371 ParseCommentLine(line, context.database);
    +
    372}
    +
    373
    +
    374DbcStatementDispatcher::DbcStatementDispatcher() {
    +
    375 RegisterType<DbcUnsupportedMultiplexingHandler>("SG_MUL_VAL_");
    +
    376 RegisterType<DbcFrameHandler>("BO_");
    +
    377 RegisterType<DbcSignalHandler>("SG_");
    +
    378 RegisterType<DbcCommentHandler>("CM_");
    +
    379 RegisterType<DbcValueDescriptionHandler>("VAL_");
    +
    380}
    +
    381
    +
    +
    382bool DbcStatementDispatcher::Dispatch(const std::string &line,
    +
    383 DbcParseContext &context) const {
    +
    384 std::istringstream stream(line);
    +
    385 std::string keyword;
    +
    386 stream >> keyword;
    +
    387 const HandlerMap::const_iterator handler = m_handlers.find(keyword);
    +
    388 if (handler == m_handlers.end())
    +
    389 return false;
    +
    390 handler->second->Handle(line, context);
    +
    391 return true;
    +
    392}
    -
    bool Dispatch(const std::string &line, DbcParseContext &context) const
    +
    393
    +
    394void DbcValueDescriptionHandler::Handle(const std::string &line, DbcParseContext &context) const {
    +
    395 static const std::regex header(R"(^VAL_[ \t]+([^ \t]+)[ \t]+([^ \t;]+)[ \t]+(.*)$)");
    +
    396 static const std::regex pair(R"dbc(^([^ \t]+)[ \t]+"((?:[^"\\]|\\["\\])*)")dbc");
    +
    397 std::smatch fields;
    +
    398 if (!std::regex_match(line, fields, header))
    +
    399 throw std::runtime_error("Malformed or unsupported VAL_ statement.");
    +
    400 const std::uint32_t rawId = ParseDecimal(fields[1].str(), std::numeric_limits<std::uint32_t>::max(), "VAL_ CAN ID");
    +
    401 if ((rawId & 0x60000000U) != 0U)
    +
    402 throw std::runtime_error("VAL_ CAN ID exceeds the 29-bit identifier range.");
    + +
    404 NormalizeCanId(rawId, pending.canId, pending.isExtended);
    +
    405 pending.signalName = fields[2].str();
    +
    406 pending.lineNumber = context.lineNumber;
    +
    407 std::string rest = fields[3].str();
    +
    408 while (rest != ";") {
    +
    409 if (!std::regex_search(rest, fields, pair))
    +
    410 throw std::runtime_error("Malformed VAL_ value/description pair or missing semicolon.");
    +
    411 const std::string number = fields[1].str();
    +
    412 const RawSignalValue key = ParseValueKey(number);
    +
    413 const std::string description = UnescapeDescription(fields[2].str());
    +
    414 if (!pending.descriptions.emplace(key, description).second)
    +
    415 throw std::runtime_error("Duplicate VAL_ value key: " + number);
    +
    416 const std::size_t consumed = static_cast<std::size_t>(fields.length());
    +
    417 rest.erase(0, consumed);
    +
    418 if (!rest.empty() && rest[0] != ';' && rest[0] != ' ' && rest[0] != '\t')
    +
    419 throw std::runtime_error("Missing whitespace between VAL_ pairs.");
    +
    420 rest = dbc_detail::TrimText(rest);
    +
    421 }
    +
    422 if (pending.descriptions.empty())
    +
    423 throw std::runtime_error("VAL_ requires at least one value/description pair.");
    +
    424 context.pendingValues.push_back(std::move(pending));
    +
    425}
    +
    426
    +
    427void DbcParseContext::ResolveValueDescriptions(const std::string &filePath) {
    +
    428 for (const PendingValueDescriptions &pending: pendingValues) {
    +
    429 try {
    +
    430 FrameInfo *frame = FindUniqueFrame(database, pending.canId, pending.isExtended);
    +
    431 SignalInfo *signal = FindUniqueSignal(*frame, pending.signalName);
    +
    432 for (const ValueDescriptions::value_type &entry: pending.descriptions) {
    +
    433 if (!signal->valueDescriptions.insert(entry).second)
    +
    434 throw std::runtime_error("Duplicate VAL_ value key for signal: " + pending.signalName);
    +
    435 }
    +
    436 } catch (const std::exception &error) {
    +
    437 throw std::runtime_error(filePath + ":" + std::to_string(pending.lineNumber) + ": " + error.what());
    +
    438 }
    +
    439 }
    +
    440}
    +
    441
    +
    442void DbcUnsupportedMultiplexingHandler::Handle(const std::string &, DbcParseContext &) const {
    +
    443 throw std::runtime_error("Extended and nested multiplexing are unsupported.");
    +
    444}
    +
    445
    +
    446namespace {
    +
    447 std::vector<std::uint64_t> SignalBits(const SignalInfo &signal) {
    +
    448 std::vector<std::uint64_t> bits;
    +
    449 std::uint64_t bit = signal.startBit;
    +
    450 for (std::uint32_t index = 0U; index < signal.length; ++index) {
    +
    451 bits.push_back(bit);
    +
    452 bit = NextSignalBit(bit, signal.isLittleEndian);
    +
    453 }
    +
    454 return bits;
    +
    455 }
    +
    456
    +
    457 bool AreMutuallyExclusive(const SignalInfo &first, const SignalInfo &second) {
    +
    458 return first.multiplexing.role == MultiplexRole::Branch &&
    +
    459 second.multiplexing.role == MultiplexRole::Branch &&
    +
    460 first.multiplexing.value != second.multiplexing.value;
    +
    461 }
    +
    462
    +
    463 std::string ValidateBranch(const SignalInfo &signal, const SignalInfo *selector) {
    +
    464 if (signal.multiplexing.role != MultiplexRole::Branch)
    +
    465 return {};
    +
    466 if (selector == nullptr)
    +
    467 return "Multiplexed branch has no selector.";
    +
    468 if (selector->length < 64U && signal.multiplexing.value >= (std::uint64_t(1U) << selector->length))
    +
    469 return "Branch value exceeds selector raw range.";
    +
    470 return {};
    +
    471 }
    +
    472
    +
    473 const SignalInfo *FindSelector(const FrameInfo &frame,
    +
    474 const std::vector<std::size_t> &lines,
    +
    475 const std::string &filePath) {
    +
    476 const SignalInfo *selector = nullptr;
    +
    477 for (std::size_t index = 0U; index < frame.signals.size(); ++index) {
    +
    478 const SignalInfo &signal = frame.signals[index];
    +
    479 if (signal.multiplexing.role != MultiplexRole::Selector)
    +
    480 continue;
    +
    481 if (selector != nullptr || signal.isSigned)
    +
    482 throw std::runtime_error(filePath + ":" + std::to_string(lines[index]) +
    +
    483 ": Multiplexing requires one unsigned selector per frame.");
    +
    484 selector = &signal;
    +
    485 }
    +
    486 return selector;
    +
    487 }
    +
    488
    +
    489 bool SignalsOverlap(const SignalInfo &first, const SignalInfo &second) {
    +
    490 const std::vector<std::uint64_t> firstBits = SignalBits(first);
    +
    491 const std::vector<std::uint64_t> secondBits = SignalBits(second);
    +
    492 for (const std::uint64_t firstBit : firstBits) {
    +
    493 for (const std::uint64_t secondBit : secondBits) {
    +
    494 if (firstBit == secondBit)
    +
    495 return true;
    +
    496 }
    +
    497 }
    +
    498 return false;
    +
    499 }
    +
    500}
    +
    501
    +
    502void DbcParseContext::ValidateMultiplexing(const std::string &filePath) const {
    +
    503 for (std::size_t frameIndex = 0U; frameIndex < database.frames.size(); ++frameIndex) {
    +
    504 const FrameInfo &frame = database.frames[frameIndex];
    +
    505 const SignalInfo *selector = FindSelector(frame, signalLines[frameIndex], filePath);
    +
    506 for (std::size_t index = 0U; index < frame.signals.size(); ++index) {
    +
    507 const SignalInfo &signal = frame.signals[index];
    +
    508 std::string error = ValidateBranch(signal, selector);
    +
    509 for (std::size_t previous = 0U; previous < index && error.empty(); ++previous) {
    +
    510 const SignalInfo &other = frame.signals[previous];
    +
    511 if (!AreMutuallyExclusive(signal, other) && SignalsOverlap(signal, other))
    +
    512 error = "Signals overlap without mutually exclusive multiplexing conditions.";
    +
    513 }
    +
    514 if (!error.empty())
    +
    515 throw std::runtime_error(filePath + ":" + std::to_string(signalLines[frameIndex][index]) + ": " + error);
    +
    516 }
    +
    517 }
    +
    518}
    +
    bool Dispatch(const std::string &line, DbcParseContext &context) const
    +
    ByteOrder
    Signal byte order used for runtime decoding.
    Parsed DBC content stored in a simple internal form.
    std::vector< FrameInfo > frames
    - +
    Describes one CAN frame from a DBC file.
    Definition frame_info.h:24
    bool isExtended
    Definition frame_info.h:27
    bool hasPgn
    Definition frame_info.h:29
    @@ -432,19 +632,22 @@ $(document).ready(function(){initNavTree('dbc__statement__handler_8cpp_source.ht
    std::string comment
    Definition frame_info.h:32
    std::uint32_t pgn
    Definition frame_info.h:28
    std::uint32_t canId
    Definition frame_info.h:26
    -
    Describes one signal inside a DBC frame.
    Definition signal_info.h:22
    -
    std::uint32_t length
    Definition signal_info.h:25
    -
    std::string unit
    Definition signal_info.h:32
    -
    std::vector< std::string > receivers
    Definition signal_info.h:33
    -
    std::string name
    Definition signal_info.h:23
    -
    bool isSigned
    Definition signal_info.h:27
    -
    double offset
    Definition signal_info.h:29
    -
    std::string comment
    Definition signal_info.h:34
    -
    std::uint32_t startBit
    Definition signal_info.h:24
    -
    double minimum
    Definition signal_info.h:30
    -
    double maximum
    Definition signal_info.h:31
    -
    double factor
    Definition signal_info.h:28
    -
    bool isLittleEndian
    Definition signal_info.h:26
    + + +
    Describes one signal inside a DBC frame.
    Definition signal_info.h:24
    +
    std::uint32_t length
    Definition signal_info.h:28
    +
    std::string unit
    Definition signal_info.h:35
    +
    std::vector< std::string > receivers
    Definition signal_info.h:36
    +
    std::string name
    Definition signal_info.h:26
    +
    ValueDescriptions valueDescriptions
    Definition signal_info.h:37
    +
    bool isSigned
    Definition signal_info.h:30
    +
    double offset
    Definition signal_info.h:32
    +
    std::string comment
    Definition signal_info.h:38
    +
    std::uint32_t startBit
    Definition signal_info.h:27
    +
    double minimum
    Definition signal_info.h:33
    +
    double maximum
    Definition signal_info.h:34
    +
    double factor
    Definition signal_info.h:31
    +
    bool isLittleEndian
    Definition signal_info.h:29
    diff --git a/docs/html/dbc__statement__handler_8h_source.html b/docs/html/dbc__statement__handler_8h_source.html index 52949e7..1aa4f62 100644 --- a/docs/html/dbc__statement__handler_8h_source.html +++ b/docs/html/dbc__statement__handler_8h_source.html @@ -107,85 +107,120 @@ $(document).ready(function(){initNavTree('dbc__statement__handler_8h_source.html
    7#include <string>
    8#include <unordered_map>
    9
    -
    - -
    12 DbcDatabase &database;
    -
    13 FrameInfo *currentFrame = nullptr;
    -
    14};
    +
    + +
    11 std::uint32_t canId;
    +
    12 bool isExtended;
    +
    13 std::string signalName;
    +
    14 ValueDescriptions descriptions;
    +
    15 std::size_t lineNumber;
    +
    16};
    -
    15
    -
    - -
    17public:
    -
    18 virtual ~DbcStatementHandler() = default;
    -
    19 virtual void Handle(const std::string &line, DbcParseContext &context) const = 0;
    -
    20};
    +
    17
    +
    + +
    20 DbcDatabase &database;
    +
    21 FrameInfo *currentFrame = nullptr;
    +
    22 std::size_t lineNumber = 0U;
    +
    23 std::vector<PendingValueDescriptions> pendingValues = {};
    +
    24
    +
    25 std::vector<std::vector<std::size_t>> signalLines = {};
    +
    26 void ValidateMultiplexing(const std::string &filePath) const;
    +
    27
    +
    28 void ResolveValueDescriptions(const std::string &filePath);
    +
    29};
    -
    21
    -
    - -
    23public:
    -
    24 void Handle(const std::string &line, DbcParseContext &context) const override;
    -
    25
    -
    26private:
    -
    27 static FrameInfo ParseFrameLine(const std::string &line);
    -
    28};
    +
    30
    +
    + +
    32public:
    +
    33 virtual ~DbcStatementHandler() = default;
    +
    34 virtual void Handle(const std::string &line, DbcParseContext &context) const = 0;
    +
    35};
    -
    29
    -
    - -
    31public:
    -
    32 void Handle(const std::string &line, DbcParseContext &context) const override;
    -
    33
    -
    34private:
    -
    35 static SignalInfo ParseSignalLine(const std::string &line);
    -
    36};
    +
    36
    +
    + +
    38public:
    +
    39 void Handle(const std::string &line, DbcParseContext &context) const override;
    +
    40
    +
    41private:
    +
    42 static FrameInfo ParseFrameLine(const std::string &line);
    +
    43};
    -
    37
    -
    - -
    39public:
    -
    40 void Handle(const std::string &line, DbcParseContext &context) const override;
    -
    41
    -
    42private:
    -
    43 static void ParseCommentLine(const std::string &line, DbcDatabase &database);
    -
    44};
    +
    44
    +
    + +
    46public:
    +
    47 void Handle(const std::string &line, DbcParseContext &context) const override;
    +
    48
    +
    49private:
    +
    50 static SignalInfo ParseSignalLine(const std::string &line);
    +
    51};
    -
    45
    -
    - -
    48public:
    - -
    50
    -
    51 template<class Handler>
    -
    52 void RegisterType(const std::string &keyword) {
    -
    53 m_factory.registerType<Handler>(keyword);
    -
    54 m_handlers.insert_or_assign(keyword, m_factory.create(keyword));
    -
    55 }
    +
    52
    +
    + +
    54public:
    +
    55 void Handle(const std::string &line, DbcParseContext &context) const override;
    56
    -
    58 bool Dispatch(const std::string &line, DbcParseContext &context) const;
    -
    59
    -
    60private:
    - -
    62 std::unordered_map<std::string, std::shared_ptr<DbcStatementHandler>> m_handlers;
    -
    63};
    +
    57private:
    +
    58 static void ParseCommentLine(const std::string &line, DbcDatabase &database);
    +
    59};
    -
    64
    -
    65#endif /* DBC_STATEMENT_HANDLER_H */
    - - - - -
    bool Dispatch(const std::string &line, DbcParseContext &context) const
    - +
    60
    +
    + +
    62public:
    +
    63 void Handle(const std::string &line, DbcParseContext &context) const override;
    +
    64};
    +
    +
    65
    +
    + +
    67public:
    +
    68 void Handle(const std::string &line, DbcParseContext &context) const override;
    +
    69};
    +
    +
    70
    +
    + +
    73public:
    + +
    75
    +
    76 template<class Handler>
    +
    77 void RegisterType(const std::string &keyword) {
    +
    78 m_factory.registerType<Handler>(keyword);
    +
    79 m_handlers.insert_or_assign(keyword, m_factory.create(keyword));
    +
    80 }
    +
    81
    +
    83 bool Dispatch(const std::string &line, DbcParseContext &context) const;
    +
    84
    +
    85private:
    +
    86 using HandlerMap = std::unordered_map<std::string, std::shared_ptr<DbcStatementHandler>>;
    + +
    88 HandlerMap m_handlers;
    +
    89};
    +
    +
    90
    +
    91#endif /* DBC_STATEMENT_HANDLER_H */
    + + + + +
    bool Dispatch(const std::string &line, DbcParseContext &context) const
    + + +
    Registry-based factory for creating objects by runtime identifier.
    Definition typefactory.h:59
    BasePtr create(const ClassId &id, Args... args) const
    Creates an instance for the given id using provided arguments.
    Definition typefactory.h:97
    void registerType(const ClassId &id)
    Registers a Derived type under the given id.
    Definition typefactory.h:76
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    Parsed DBC content stored in a simple internal form.
    - +
    Describes one CAN frame from a DBC file.
    Definition frame_info.h:24
    -
    Describes one signal inside a DBC frame.
    Definition signal_info.h:22
    + +
    Describes one signal inside a DBC frame.
    Definition signal_info.h:24
    diff --git a/docs/html/dbc__tree__builder_8cpp_source.html b/docs/html/dbc__tree__builder_8cpp_source.html index a62c3d5..8916c8a 100644 --- a/docs/html/dbc__tree__builder_8cpp_source.html +++ b/docs/html/dbc__tree__builder_8cpp_source.html @@ -103,31 +103,28 @@ $(document).ready(function(){initNavTree('dbc__tree__builder_8cpp_source.html','
    13
    14std::unique_ptr<TreeNode> DbcTreeBuilder::Build(const DbcDatabase &database) const {
    -
    15 std::unique_ptr<TreeNode> root(new TreeNode());
    +
    15 std::unique_ptr<TreeNode> root = std::make_unique<TreeNode>();
    16
    -
    17 for (std::size_t frameIndex = 0U; frameIndex < database.frames.size(); ++frameIndex) {
    -
    18 const FrameInfo &frame = database.frames[frameIndex];
    -
    19 std::unique_ptr<TreeNode> frameNode(new TreeNode(frame));
    -
    20
    -
    21 for (std::size_t signalIndex = 0U; signalIndex < frame.signals.size(); ++signalIndex) {
    -
    22 const SignalInfo &signal = frame.signals[signalIndex];
    -
    23 std::unique_ptr<TreeNode> signalNode(new TreeNode(signal));
    -
    24 frameNode->AddChild(std::move(signalNode));
    -
    25 }
    -
    26
    -
    27 root->AddChild(std::move(frameNode));
    -
    28 }
    -
    29
    -
    30 return root;
    -
    31}
    +
    17 for (const FrameInfo &frame : database.frames) {
    +
    18 std::unique_ptr<TreeNode> frameNode = std::make_unique<TreeNode>(frame);
    +
    19
    +
    20 for (const SignalInfo &signal : frame.signals) {
    +
    21 std::unique_ptr<TreeNode> signalNode = std::make_unique<TreeNode>(signal);
    +
    22 frameNode->AddChild(std::move(signalNode));
    +
    23 }
    +
    24
    +
    25 root->AddChild(std::move(frameNode));
    +
    26 }
    +
    27
    +
    28 return root;
    +
    29}
    std::unique_ptr< TreeNode > Build(const DbcDatabase &database) const
    Build tree representation of parsed DBC data.
    -
    Tree node for later use in model/view or other hierarchy consumers.
    Definition tree_node.h:35
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    Parsed DBC content stored in a simple internal form.
    std::vector< FrameInfo > frames
    Describes one CAN frame from a DBC file.
    Definition frame_info.h:24
    -
    Describes one signal inside a DBC frame.
    Definition signal_info.h:22
    +
    Describes one signal inside a DBC frame.
    Definition signal_info.h:24
    diff --git a/docs/html/dbc__tree__model_8cpp_source.html b/docs/html/dbc__tree__model_8cpp_source.html new file mode 100644 index 0000000..2827a63 --- /dev/null +++ b/docs/html/dbc__tree__model_8cpp_source.html @@ -0,0 +1,281 @@ + + + + + + + +DBC Framework: dbc_tree_model.cpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    DBC Framework +
    +
    DBC parsing and CAN signal decoding framework
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    dbc_tree_model.cpp
    +
    +
    +
    1// SPDX-License-Identifier: MIT
    +
    2#include "dbc_tree_model.h"
    +
    3#include <QVariantList>
    +
    4#include <QVariantMap>
    +
    5#include <limits>
    +
    6#include <stdexcept>
    +
    7
    +
    8namespace {
    +
    9 QVariantList ToVariantList(const ValueDescriptions &values) {
    +
    10 QVariantList descriptions;
    +
    11 for (const ValueDescriptions::value_type &entry : values) {
    +
    12 QVariantMap pair;
    +
    13 if (const std::int64_t *number = std::get_if<std::int64_t>(&entry.first))
    +
    14 pair.insert("value", QVariant::fromValue(static_cast<qlonglong>(*number)));
    +
    15 else
    +
    16 pair.insert("value", QVariant::fromValue(
    +
    17 static_cast<qulonglong>(std::get<std::uint64_t>(entry.first))));
    +
    18 pair.insert("description", QString::fromStdString(entry.second));
    +
    19 descriptions.append(pair);
    +
    20 }
    +
    21 return descriptions;
    +
    22 }
    +
    23} // namespace
    +
    24
    +
    25DbcTreeModel::DbcTreeModel(QObject *parent) : QAbstractItemModel(parent) {}
    +
    26
    +
    27void DbcTreeModel::SetTree(std::unique_ptr<TreeNode> root) {
    +
    28 if (root && (root->GetType() != NodeType::Root || root->GetParent()))
    +
    29 throw std::invalid_argument("Model requires a detached root node");
    +
    30 beginResetModel();
    +
    31 m_root = std::move(root);
    +
    32 endResetModel();
    +
    33}
    +
    34
    +
    35const TreeNode *DbcTreeModel::Node(const QModelIndex &index) const {
    +
    36 if (!index.isValid() || index.model() != this || index.column() < 0 ||
    +
    37 index.column() >= ColumnCount || index.row() < 0)
    +
    38 return nullptr;
    +
    39 return static_cast<const TreeNode *>(index.internalPointer());
    +
    40}
    +
    41
    +
    42QModelIndex DbcTreeModel::index(int row, int column, const QModelIndex &parentIndex) const {
    +
    43 if (row < 0 || column < 0 || column >= ColumnCount ||
    +
    44 (parentIndex.isValid() && parentIndex.column() != 0))
    +
    45 return {};
    +
    46 const TreeNode *owner = parentIndex.isValid() ? Node(parentIndex) : m_root.get();
    +
    47 if (!owner)
    +
    48 return {};
    +
    49 const TreeNode *child = owner->GetChild(static_cast<std::size_t>(row));
    +
    50 return child ? createIndex(row, column, const_cast<TreeNode *>(child)) : QModelIndex();
    +
    51}
    +
    52
    +
    53QModelIndex DbcTreeModel::parent(const QModelIndex &childIndex) const {
    +
    54 const TreeNode *child = Node(childIndex);
    +
    55 const TreeNode *owner = child ? child->GetParent() : nullptr;
    +
    56 if (!owner || owner == m_root.get())
    +
    57 return {};
    +
    58 return createIndex(static_cast<int>(owner->GetRow()), 0, const_cast<TreeNode *>(owner));
    +
    59}
    +
    60
    +
    61int DbcTreeModel::rowCount(const QModelIndex &parentIndex) const {
    +
    62 if (parentIndex.isValid() && parentIndex.column() != 0)
    +
    63 return 0;
    +
    64 const TreeNode *owner = parentIndex.isValid() ? Node(parentIndex) : m_root.get();
    +
    65 if (!owner)
    +
    66 return 0;
    +
    67 return static_cast<int>(qMin(owner->GetChildCount(), static_cast<std::size_t>(std::numeric_limits<int>::max())));
    +
    68}
    +
    69
    +
    70int DbcTreeModel::columnCount(const QModelIndex &parentIndex) const {
    +
    71 return parentIndex.isValid() && !Node(parentIndex) ? 0 : ColumnCount;
    +
    72}
    +
    73
    +
    74QVariant DbcTreeModel::data(const QModelIndex &item, int role) const {
    +
    75 const TreeNode *node = Node(item);
    +
    76 if (!node)
    +
    77 return {};
    +
    78 const FrameInfo *frame = node->GetFrame();
    +
    79 const SignalInfo *signal = node->GetSignal();
    +
    80 QString comment;
    +
    81 if (frame != nullptr)
    +
    82 comment = QString::fromStdString(frame->comment);
    +
    83 else if (signal != nullptr)
    +
    84 comment = QString::fromStdString(signal->comment);
    +
    85 if (role == Qt::ToolTipRole || role == CommentRole)
    +
    86 return comment;
    +
    87 if (role == NodeTypeRole)
    +
    88 return static_cast<int>(node->GetType());
    +
    89 if (role == ValueDescriptionsRole && signal) {
    +
    90 return ToVariantList(signal->valueDescriptions);
    +
    91 }
    +
    92 if (frame) {
    +
    93 if (role == CanIdRole)
    +
    94 return frame->canId;
    +
    95 if (role == PayloadLengthRole)
    +
    96 return static_cast<int>(frame->dlc);
    +
    97 if (role == ExtendedRole)
    +
    98 return frame->isExtended;
    +
    99 }
    +
    100 if (signal) {
    +
    101 if (role == StartBitRole)
    +
    102 return signal->startBit;
    +
    103 if (role == BitLengthRole)
    +
    104 return signal->length;
    +
    105 if (role == LittleEndianRole)
    +
    106 return signal->isLittleEndian;
    +
    107 if (role == SignedRole)
    +
    108 return signal->isSigned;
    +
    109 if (role == UnitRole)
    +
    110 return QString::fromStdString(signal->unit);
    +
    111 }
    +
    112 if (role != Qt::DisplayRole)
    +
    113 return {};
    +
    114 switch (item.column()) {
    +
    115 case Name:
    +
    116 return QString::fromStdString(node->GetName());
    +
    117 case CanId:
    +
    118 return frame ? QVariant(QString("0x%1").arg(frame->canId, 0, 16).toUpper()) : QVariant();
    +
    119 case PayloadLength:
    +
    120 return frame ? QVariant(static_cast<int>(frame->dlc)) : QVariant();
    +
    121 case StartBit:
    +
    122 return signal ? QVariant(signal->startBit) : QVariant();
    +
    123 case BitLength:
    +
    124 return signal ? QVariant(signal->length) : QVariant();
    +
    125 case ByteOrder:
    +
    126 return signal ? QVariant(signal->isLittleEndian ? "Intel" : "Motorola") : QVariant();
    +
    127 case Signed:
    +
    128 return signal ? QVariant(signal->isSigned ? "Signed" : "Unsigned") : QVariant();
    +
    129 case Unit:
    +
    130 return signal ? QVariant(QString::fromStdString(signal->unit)) : QVariant();
    +
    131 case Comment:
    +
    132 return comment;
    +
    133 default:
    +
    134 return {};
    +
    135 }
    +
    136}
    +
    137
    +
    138QVariant DbcTreeModel::headerData(int section, Qt::Orientation orientation, int role) const {
    +
    139 static const char *const headers[] = {"Name", "CAN ID", "Payload (bytes)", "Start bit", "Length (bits)", "Byte order", "Signedness", "Unit", "Comment"};
    +
    140 if (orientation != Qt::Horizontal || role != Qt::DisplayRole || section < 0 || section >= ColumnCount)
    +
    141 return {};
    +
    142 return QString::fromLatin1(headers[section]);
    +
    143}
    +
    144
    +
    145Qt::ItemFlags DbcTreeModel::flags(const QModelIndex &item) const {
    +
    146 return Node(item) ? Qt::ItemIsEnabled | Qt::ItemIsSelectable : Qt::NoItemFlags;
    +
    147}
    +
    Tree node for later use in model/view or other hierarchy consumers.
    Definition tree_node.h:35
    +
    const SignalInfo * GetSignal() const
    Get signal payload if node is signal.
    Definition tree_node.cpp:64
    +
    const TreeNode * GetChild(std::size_t index) const
    Get child by index.
    Definition tree_node.cpp:38
    +
    const TreeNode * GetParent() const
    Definition tree_node.cpp:68
    +
    const std::string & GetName() const
    Get display name.
    Definition tree_node.cpp:56
    +
    std::size_t GetChildCount() const
    Get child count.
    Definition tree_node.cpp:34
    +
    std::size_t GetRow() const
    Definition tree_node.cpp:72
    +
    NodeType GetType() const
    Get node type.
    Definition tree_node.cpp:52
    +
    const FrameInfo * GetFrame() const
    Get frame payload if node is frame.
    Definition tree_node.cpp:60
    +
    ByteOrder
    Signal byte order used for runtime decoding.
    +
    Describes one CAN frame from a DBC file.
    Definition frame_info.h:24
    +
    bool isExtended
    Definition frame_info.h:27
    +
    std::uint8_t dlc
    Definition frame_info.h:30
    +
    std::string comment
    Definition frame_info.h:32
    +
    std::uint32_t canId
    Definition frame_info.h:26
    +
    Describes one signal inside a DBC frame.
    Definition signal_info.h:24
    +
    std::uint32_t length
    Definition signal_info.h:28
    +
    std::string unit
    Definition signal_info.h:35
    +
    ValueDescriptions valueDescriptions
    Definition signal_info.h:37
    +
    bool isSigned
    Definition signal_info.h:30
    +
    std::string comment
    Definition signal_info.h:38
    +
    std::uint32_t startBit
    Definition signal_info.h:27
    +
    bool isLittleEndian
    Definition signal_info.h:29
    +
    +
    + + + + diff --git a/docs/html/dbc__tree__model_8h_source.html b/docs/html/dbc__tree__model_8h_source.html new file mode 100644 index 0000000..c485175 --- /dev/null +++ b/docs/html/dbc__tree__model_8h_source.html @@ -0,0 +1,164 @@ + + + + + + + +DBC Framework: dbc_tree_model.h Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    DBC Framework +
    +
    DBC parsing and CAN signal decoding framework
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    dbc_tree_model.h
    +
    +
    +
    1// SPDX-License-Identifier: MIT
    +
    2#ifndef DBC_TREE_MODEL_H
    +
    3#define DBC_TREE_MODEL_H
    +
    4
    +
    5#include "tree_node.h"
    +
    6#include <QAbstractItemModel>
    +
    7
    +
    +
    11class DbcTreeModel : public QAbstractItemModel {
    +
    12public:
    +
    13 enum Column { Name,
    +
    14 CanId,
    +
    15 PayloadLength,
    +
    16 StartBit,
    +
    17 BitLength,
    + +
    19 Signed,
    +
    20 Unit,
    +
    21 Comment,
    +
    22 ColumnCount };
    +
    23 // Metadata roles apply on every column; inapplicable roles return invalid QVariant.
    +
    24 enum Role { NodeTypeRole = Qt::UserRole + 1,
    +
    25 CanIdRole,
    +
    26 PayloadLengthRole,
    +
    27 StartBitRole,
    +
    28 BitLengthRole,
    +
    29 LittleEndianRole,
    +
    30 SignedRole,
    +
    31 UnitRole,
    +
    32 CommentRole,
    +
    33 ValueDescriptionsRole,
    +
    34 ExtendedRole };
    +
    35
    +
    36 explicit DbcTreeModel(QObject *parent = nullptr);
    +
    37 void SetTree(std::unique_ptr<TreeNode> root);
    +
    38 QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
    +
    39 QModelIndex parent(const QModelIndex &child) const override;
    +
    40 int rowCount(const QModelIndex &parent = QModelIndex()) const override;
    +
    41 int columnCount(const QModelIndex &parent = QModelIndex()) const override;
    +
    42 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
    +
    43 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
    +
    44 Qt::ItemFlags flags(const QModelIndex &index) const override;
    +
    45
    +
    46private:
    +
    47 const TreeNode *Node(const QModelIndex &index) const;
    +
    48 std::unique_ptr<TreeNode> m_root;
    +
    49};
    +
    +
    50#endif
    + +
    Tree node for later use in model/view or other hierarchy consumers.
    Definition tree_node.h:35
    +
    ByteOrder
    Signal byte order used for runtime decoding.
    +
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    +
    +
    + + + + diff --git a/docs/html/dbc__tree__model__test_8cpp_source.html b/docs/html/dbc__tree__model__test_8cpp_source.html new file mode 100644 index 0000000..b9f0e3a --- /dev/null +++ b/docs/html/dbc__tree__model__test_8cpp_source.html @@ -0,0 +1,349 @@ + + + + + + + +DBC Framework: dbc_tree_model_test.cpp Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    DBC Framework +
    +
    DBC parsing and CAN signal decoding framework
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    dbc_tree_model_test.cpp
    +
    +
    +
    1#include "dbc_parser.h"
    +
    2#include "dbc_tree_builder.h"
    +
    3#include "dbc_tree_model.h"
    +
    4#include <QAbstractItemModelTester>
    +
    5#include <QGuiApplication>
    +
    6#include <QSignalSpy>
    +
    7#include <QStringList>
    +
    8#include <QTemporaryFile>
    +
    9#include <QtTest>
    +
    10#include <limits>
    +
    11
    +
    12static std::unique_ptr<TreeNode> ParsedTree() {
    +
    13 QTemporaryFile fixture;
    +
    14 if (!fixture.open()) throw std::runtime_error("Fixture creation failed");
    +
    15 fixture.write("BO_ 256 Status: 8 ECU\n SG_ State : 0|8@1+ (1,0) [0|255] \"rpm\" ECU\n"
    +
    16 " SG_ Other : 8|8@1+ (1,0) [0|255] \"\" ECU\n"
    +
    17 "BO_ 257 Second: 8 ECU\n SG_ Value : 0|8@1+ (1,0) [0|255] \"\" ECU\n"
    +
    18 "CM_ BO_ 256 \"Frame comment\";\nCM_ SG_ 256 State \"Signal comment\";\n"
    +
    19 "VAL_ 256 State -1 \"Negative\" 0 \"Off\" 18446744073709551615 \"Maximum\";\n");
    +
    20 fixture.flush();
    +
    21 return DbcTreeBuilder().Build(DbcParser().ParseFile(fixture.fileName().toStdString()));
    +
    22}
    +
    23
    +
    24class ModelTest : public QObject {
    +
    25 Q_OBJECT
    +
    26private Q_SLOTS:
    +
    27 void additionalMetadata() {
    +
    28 DbcDatabase database;
    +
    29 FrameInfo frame;
    +
    30 frame.name = "Extended";
    +
    31 frame.canId = 0x18F00442U;
    +
    32 frame.isExtended = true;
    +
    33 frame.dlc = 8U;
    +
    34 frame.comment = "Frame tooltip";
    +
    35 SignalInfo signal;
    +
    36 signal.name = "SignedMotorola";
    +
    37 signal.startBit = 7U;
    +
    38 signal.length = 16U;
    +
    39 signal.isLittleEndian = false;
    +
    40 signal.isSigned = true;
    +
    41 signal.unit = "rpm";
    +
    42 signal.comment = "Signal tooltip";
    +
    43 frame.signals.push_back(signal);
    +
    44 database.frames.push_back(frame);
    +
    45 DbcTreeModel model;
    +
    46 model.SetTree(DbcTreeBuilder().Build(database));
    +
    47 const QModelIndex parent = model.index(0, 0);
    +
    48 QCOMPARE(model.data(model.index(0, DbcTreeModel::ByteOrder, parent)).toString(), QString("Motorola"));
    +
    49 QCOMPARE(model.data(model.index(0, DbcTreeModel::Signed, parent)).toString(), QString("Signed"));
    +
    50 QCOMPARE(model.data(model.index(0, DbcTreeModel::CanId)).toString(), QString("0X18F00442"));
    +
    51 const QStringList headers = {"Name", "CAN ID", "Payload (bytes)", "Start bit",
    +
    52 "Length (bits)", "Byte order", "Signedness", "Unit", "Comment"};
    +
    53 for (int column = 0; column < model.columnCount(); ++column) {
    +
    54 const QModelIndex frameIndex = model.index(0, column);
    +
    55 const QModelIndex signalIndex = model.index(0, column, parent);
    +
    56 QCOMPARE(model.headerData(column, Qt::Horizontal).toString(), headers.at(column));
    +
    57 QVERIFY(!model.headerData(column, Qt::Horizontal, Qt::ToolTipRole).isValid());
    +
    58 QCOMPARE(model.data(frameIndex, Qt::ToolTipRole).toString(), QString("Frame tooltip"));
    +
    59 QCOMPARE(model.data(signalIndex, Qt::ToolTipRole).toString(), QString("Signal tooltip"));
    +
    60 QCOMPARE(model.data(frameIndex, DbcTreeModel::CommentRole).toString(), QString("Frame tooltip"));
    +
    61 QCOMPARE(model.data(signalIndex, DbcTreeModel::CommentRole).toString(), QString("Signal tooltip"));
    +
    62 QCOMPARE(model.data(frameIndex, DbcTreeModel::CanIdRole).toUInt(), frame.canId);
    +
    63 QCOMPARE(model.data(frameIndex, DbcTreeModel::PayloadLengthRole).toInt(), 8);
    +
    64 QCOMPARE(model.data(frameIndex, DbcTreeModel::ExtendedRole).toBool(), true);
    +
    65 QCOMPARE(model.data(signalIndex, DbcTreeModel::StartBitRole).toUInt(), 7U);
    +
    66 QCOMPARE(model.data(signalIndex, DbcTreeModel::BitLengthRole).toUInt(), 16U);
    +
    67 QCOMPARE(model.data(signalIndex, DbcTreeModel::LittleEndianRole).toBool(), false);
    +
    68 QCOMPARE(model.data(signalIndex, DbcTreeModel::SignedRole).toBool(), true);
    +
    69 QCOMPARE(model.data(signalIndex, DbcTreeModel::UnitRole).toString(), QString("rpm"));
    +
    70 const QVariant descriptions = model.data(signalIndex, DbcTreeModel::ValueDescriptionsRole);
    +
    71 QVERIFY(descriptions.isValid());
    +
    72 QVERIFY(descriptions.toList().isEmpty());
    +
    73 QVERIFY(!model.data(frameIndex, Qt::UserRole + 1000).isValid());
    +
    74 QVERIFY(!model.data(signalIndex, Qt::UserRole + 1000).isValid());
    +
    75 QVERIFY(!model.setData(frameIndex, "Changed", Qt::EditRole));
    +
    76 QVERIFY(!model.setData(signalIndex, "Changed", Qt::EditRole));
    +
    77 }
    +
    78 QCOMPARE(model.data(parent).toString(), QString("Extended"));
    +
    79 QCOMPARE(model.data(model.index(0, 0, parent)).toString(), QString("SignedMotorola"));
    +
    80 }
    +
    81 void emptyRootAndRejectedReplacement() {
    +
    82 DbcTreeModel model;
    +
    83 QAbstractItemModelTester tester(&model, QAbstractItemModelTester::FailureReportingMode::QtTest);
    +
    84 model.SetTree(ParsedTree());
    +
    85 QPersistentModelIndex retained(model.index(0, 0));
    +
    86 QSignalSpy resets(&model, &QAbstractItemModel::modelReset);
    +
    87 QVERIFY_THROWS_EXCEPTION(std::invalid_argument, model.SetTree(std::make_unique<TreeNode>(SignalInfo())));
    +
    88 QCOMPARE(resets.count(), 0);
    +
    89 QVERIFY(retained.isValid());
    +
    90 QCOMPARE(model.rowCount(), 2);
    +
    91 model.SetTree(DbcTreeBuilder().Build(DbcDatabase()));
    +
    92 QCOMPARE(resets.count(), 1);
    +
    93 QVERIFY(!retained.isValid());
    +
    94 QCOMPARE(model.rowCount(), 0);
    +
    95 QVERIFY(!model.index(0, 0).isValid());
    +
    96 }
    +
    97 void navigation() {
    +
    98 DbcTreeModel model;
    +
    99 QAbstractItemModelTester tester(&model, QAbstractItemModelTester::FailureReportingMode::QtTest);
    +
    100 QCOMPARE(model.rowCount(), 0);
    +
    101 model.SetTree(ParsedTree());
    +
    102 QCOMPARE(model.rowCount(), 2);
    +
    103 for (int row = 0; row < model.rowCount(); ++row) {
    +
    104 const QModelIndex frame = model.index(row, 0);
    +
    105 for (int column = 0; column < model.columnCount(); ++column) {
    +
    106 const QModelIndex frameColumn = model.index(row, column);
    +
    107 QVERIFY(!model.parent(frameColumn).isValid());
    +
    108 QCOMPARE(model.rowCount(frameColumn), column == 0 ? (row == 0 ? 2 : 1) : 0);
    +
    109 for (int signalRow = 0; signalRow < model.rowCount(frame); ++signalRow) {
    +
    110 const QModelIndex signal = model.index(signalRow, column, frame);
    +
    111 QCOMPARE(model.parent(signal), frame);
    +
    112 QCOMPARE(model.rowCount(signal), 0);
    +
    113 QVERIFY(!model.index(0, 0, signal).isValid());
    +
    114 QCOMPARE(model.flags(signal), Qt::ItemIsEnabled | Qt::ItemIsSelectable);
    +
    115 }
    +
    116 }
    +
    117 }
    +
    118 QVERIFY(!model.index(-1, 0).isValid());
    +
    119 QVERIFY(!model.index(2, 0).isValid());
    +
    120 QVERIFY(!model.index(0, -1).isValid());
    +
    121 QVERIFY(!model.index(0, model.columnCount()).isValid());
    +
    122 QVERIFY(!model.index(0, 0, model.index(0, 1)).isValid());
    +
    123 QVERIFY(!model.parent({}).isValid());
    +
    124 QVERIFY(!model.data({}).isValid());
    +
    125 QCOMPARE(model.flags({}), Qt::NoItemFlags);
    +
    126 DbcTreeModel other;
    +
    127 other.SetTree(ParsedTree());
    +
    128 const QModelIndex foreign = other.index(0, 0);
    +
    129 QVERIFY(!model.index(0, 0, foreign).isValid());
    +
    130 QVERIFY(!model.parent(foreign).isValid());
    +
    131 QCOMPARE(model.rowCount(foreign), 0);
    +
    132 QCOMPARE(model.columnCount(foreign), 0);
    +
    133 QVERIFY(!model.data(foreign).isValid());
    +
    134 QCOMPARE(model.flags(foreign), Qt::NoItemFlags);
    +
    135 }
    +
    136 void metadata() {
    +
    137 DbcTreeModel model;
    +
    138 model.SetTree(ParsedTree());
    +
    139 const QModelIndex frame = model.index(0, 0);
    +
    140 const QModelIndex signal = model.index(0, 0, frame);
    +
    141 QCOMPARE(model.data(frame).toString(), QString("Status"));
    +
    142 QCOMPARE(model.data(model.index(0, DbcTreeModel::CanId)).toString(), QString("0X100"));
    +
    143 QCOMPARE(model.data(frame, DbcTreeModel::CanIdRole).toUInt(), 256U);
    +
    144 QCOMPARE(model.data(frame, DbcTreeModel::PayloadLengthRole).toInt(), 8);
    +
    145 QCOMPARE(model.data(signal, DbcTreeModel::UnitRole).toString(), QString("rpm"));
    +
    146 const QVariantList expectedSignal = {"State", QVariant(), QVariant(), 0U, 8U,
    +
    147 "Intel", "Unsigned", "rpm", "Signal comment"};
    +
    148 const QVariantList expectedFrame = {"Status", "0X100", 8, QVariant(), QVariant(),
    +
    149 QVariant(), QVariant(), QVariant(), "Frame comment"};
    +
    150 for (int column = 0; column < model.columnCount(); ++column) {
    +
    151 QCOMPARE(model.data(model.index(0, column, frame)), expectedSignal.at(column));
    +
    152 QCOMPARE(model.data(model.index(0, column)), expectedFrame.at(column));
    +
    153 }
    +
    154 QCOMPARE(model.data(frame, DbcTreeModel::NodeTypeRole).toInt(), static_cast<int>(NodeType::Frame));
    +
    155 QCOMPARE(model.data(signal, DbcTreeModel::NodeTypeRole).toInt(), static_cast<int>(NodeType::Signal));
    +
    156 QCOMPARE(model.data(frame, DbcTreeModel::ExtendedRole).toBool(), false);
    +
    157 QVERIFY(!model.data(frame, DbcTreeModel::ValueDescriptionsRole).isValid());
    +
    158 QVERIFY(model.data(model.index(1, 0, frame), DbcTreeModel::ValueDescriptionsRole).toList().isEmpty());
    +
    159
    +
    160 QCOMPARE(model.data(signal, Qt::ToolTipRole).toString(), QString("Signal comment"));
    +
    161 QCOMPARE(model.data(signal, DbcTreeModel::StartBitRole).toUInt(), 0U);
    +
    162 QCOMPARE(model.data(signal, DbcTreeModel::BitLengthRole).toUInt(), 8U);
    +
    163 QCOMPARE(model.data(signal, DbcTreeModel::LittleEndianRole).toBool(), true);
    +
    164 QCOMPARE(model.data(signal, DbcTreeModel::SignedRole).toBool(), false);
    +
    165 QVERIFY(!model.data(signal, DbcTreeModel::CanIdRole).isValid());
    +
    166 QVERIFY(!model.data(frame, DbcTreeModel::UnitRole).isValid());
    +
    167 QVERIFY(!model.data(frame, Qt::EditRole).isValid());
    +
    168 const QVariantList values = model.data(signal, DbcTreeModel::ValueDescriptionsRole).toList();
    +
    169 QCOMPARE(values.size(), 3);
    +
    170 QCOMPARE(values.at(0).toMap().value("value").toLongLong(), -1LL);
    +
    171 QCOMPARE(values.at(2).toMap().value("value").toULongLong(), std::numeric_limits<qulonglong>::max());
    +
    172 QCOMPARE(values.at(2).toMap().value("description").toString(), QString("Maximum"));
    +
    173 for (int column = 0; column < model.columnCount(); ++column) {
    +
    174 QVERIFY(model.headerData(column, Qt::Horizontal).isValid());
    +
    175 QCOMPARE(model.data(model.index(0, column, frame), DbcTreeModel::ValueDescriptionsRole), QVariant(values));
    +
    176 }
    +
    177 QVERIFY(!model.headerData(-1, Qt::Horizontal).isValid());
    +
    178 QVERIFY(!model.headerData(model.columnCount(), Qt::Horizontal).isValid());
    +
    179 QVERIFY(!model.headerData(0, Qt::Vertical).isValid());
    +
    180 }
    +
    181 void replacement() {
    +
    182 DbcTreeModel model;
    +
    183 QAbstractItemModelTester tester(&model, QAbstractItemModelTester::FailureReportingMode::QtTest);
    +
    184 QSignalSpy resets(&model, &QAbstractItemModel::modelReset);
    +
    185 model.SetTree(ParsedTree());
    +
    186 QPersistentModelIndex frame(model.index(0, 0));
    +
    187 QPersistentModelIndex signal(model.index(0, 4, frame));
    +
    188 model.SetTree(ParsedTree());
    +
    189 QVERIFY(!frame.isValid());
    +
    190 QVERIFY(!signal.isValid());
    +
    191 QCOMPARE(model.rowCount(), 2);
    +
    192 QPersistentModelIndex replacement(model.index(1, 0));
    +
    193 model.SetTree(nullptr);
    +
    194 QVERIFY(!replacement.isValid());
    +
    195 QCOMPARE(model.rowCount(), 0);
    +
    196 QVERIFY(!model.index(0, 0).isValid());
    +
    197 model.SetTree(nullptr);
    +
    198 QCOMPARE(resets.count(), 4);
    +
    199 try {
    +
    200 model.SetTree(std::unique_ptr<TreeNode>(new TreeNode(FrameInfo())));
    +
    201 QFAIL("A frame cannot be the invisible model root");
    +
    202 } catch (const std::invalid_argument &) {
    +
    203 }
    +
    204 QCOMPARE(resets.count(), 4);
    +
    205 }
    +
    206};
    +
    207int main(int argc, char **argv) {
    +
    208 // Model tests need QtGui's metatypes, but do not need a display server.
    +
    209 if (qEnvironmentVariableIsEmpty("QT_QPA_PLATFORM"))
    +
    210 qputenv("QT_QPA_PLATFORM", "offscreen");
    +
    211 QGuiApplication application(argc, argv);
    +
    212 ModelTest tests;
    +
    213 return QTest::qExec(&tests, argc, argv);
    +
    214}
    +
    215#include "dbc_tree_model_test.moc"
    +
    Minimal DBC parser.
    Definition dbc_parser.h:34
    +
    Builds a simple tree from parsed DBC database.
    +
    std::unique_ptr< TreeNode > Build(const DbcDatabase &database) const
    Build tree representation of parsed DBC data.
    + +
    Tree node for later use in model/view or other hierarchy consumers.
    Definition tree_node.h:35
    +
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    +
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    +
    Parsed DBC content stored in a simple internal form.
    +
    std::vector< FrameInfo > frames
    +
    Describes one CAN frame from a DBC file.
    Definition frame_info.h:24
    +
    bool isExtended
    Definition frame_info.h:27
    +
    std::uint8_t dlc
    Definition frame_info.h:30
    +
    std::string name
    Definition frame_info.h:25
    +
    std::string comment
    Definition frame_info.h:32
    +
    std::uint32_t canId
    Definition frame_info.h:26
    +
    Describes one signal inside a DBC frame.
    Definition signal_info.h:24
    +
    std::uint32_t length
    Definition signal_info.h:28
    +
    std::string unit
    Definition signal_info.h:35
    +
    std::string name
    Definition signal_info.h:26
    +
    bool isSigned
    Definition signal_info.h:30
    +
    std::string comment
    Definition signal_info.h:38
    +
    std::uint32_t startBit
    Definition signal_info.h:27
    +
    bool isLittleEndian
    Definition signal_info.h:29
    +
    +
    + + + + diff --git a/docs/html/decode__database_8h.html b/docs/html/decode__database_8h.html index 1452324..f002d94 100644 --- a/docs/html/decode__database_8h.html +++ b/docs/html/decode__database_8h.html @@ -99,7 +99,9 @@ $(document).ready(function(){initNavTree('decode__database_8h.html',''); initRes

    Created: 2026-03-13 Author: Deeaitch (Dim. Himro) More...

    -
    #include <cstdint>
    +
    #include "value_descriptions.h"
    +#include "multiplexing.h"
    +#include <cstdint>
    #include <string>
    #include <unordered_map>
    #include <vector>
    @@ -165,7 +167,7 @@ Enumerations

    Signal byte order used for runtime decoding.

    -

    Definition at line 23 of file decode_database.h.

    +

    Definition at line 25 of file decode_database.h.

    @@ -191,7 +193,7 @@ Enumerations

    Signal numeric type.

    -

    Definition at line 31 of file decode_database.h.

    +

    Definition at line 33 of file decode_database.h.

    diff --git a/docs/html/decode__database_8h_source.html b/docs/html/decode__database_8h_source.html index 78564d7..e241bc0 100644 --- a/docs/html/decode__database_8h_source.html +++ b/docs/html/decode__database_8h_source.html @@ -102,126 +102,126 @@ $(document).ready(function(){initNavTree('decode__database_8h_source.html','');
    12#ifndef DECODE_DATABASE_H
    13#define DECODE_DATABASE_H
    14
    -
    15#include <cstdint>
    -
    16#include <string>
    -
    17#include <unordered_map>
    -
    18#include <vector>
    -
    19
    -
    -
    23enum class ByteOrder {
    -
    24 Intel,
    -
    25 Motorola
    -
    26};
    +
    15#include "value_descriptions.h"
    +
    16#include "multiplexing.h"
    +
    17#include <cstdint>
    +
    18#include <string>
    +
    19#include <unordered_map>
    +
    20#include <vector>
    +
    21
    +
    +
    25enum class ByteOrder {
    +
    26 Intel,
    +
    27 Motorola
    +
    28};
    -
    27
    -
    -
    31enum class ValueType {
    -
    32 Unsigned,
    -
    33 Signed
    -
    34};
    +
    29
    +
    +
    33enum class ValueType {
    +
    34 Unsigned,
    +
    35 Signed
    +
    36};
    -
    35
    -
    - -
    40 std::string name;
    -
    41 std::uint32_t startBit;
    -
    42 std::uint32_t length;
    - - -
    45 double factor;
    -
    46 double offset;
    -
    47 double minimum;
    -
    48 double maximum;
    -
    49 std::string unit;
    -
    50 std::vector<std::string> receivers;
    -
    51 std::string comment;
    - -
    54 : name(), startBit(0U), length(0U), byteOrder(ByteOrder::Intel), valueType(ValueType::Unsigned), factor(1.0), offset(0.0), minimum(0.0), maximum(0.0), unit(), receivers(), comment() {
    -
    55 }
    -
    56};
    +
    37
    +
    + +
    42 Multiplexing multiplexing;
    +
    43 std::string name;
    +
    44 std::uint32_t startBit = 0U;
    +
    45 std::uint32_t length = 0U;
    +
    46 ByteOrder byteOrder = ByteOrder::Intel;
    +
    47 ValueType valueType = ValueType::Unsigned;
    +
    48 double factor = 1.0;
    +
    49 double offset = 0.0;
    +
    50 double minimum = 0.0;
    +
    51 double maximum = 0.0;
    +
    52 std::string unit;
    +
    53 std::vector<std::string> receivers;
    +
    54 ValueDescriptions valueDescriptions;
    +
    55 std::string comment;
    +
    57 DecodeSignal() = default;
    +
    58};
    -
    57
    -
    - -
    62 std::string name;
    -
    63 std::uint32_t canId;
    - -
    65 std::uint8_t dlc;
    -
    66 std::uint32_t pgn;
    -
    67 bool hasPgn;
    -
    68 std::string transmitter;
    -
    69 std::string comment;
    -
    70 std::vector<DecodeSignal> signals;
    - -
    73 : name(), canId(0U), isExtended(false), dlc(0U), pgn(0U), hasPgn(false), transmitter(), comment(), signals() {
    -
    74 }
    +
    59
    +
    + +
    64 std::string name;
    +
    65 std::uint32_t canId = 0U;
    +
    66 bool isExtended = false;
    +
    67 std::uint8_t dlc = 0U;
    +
    68 std::uint32_t pgn = 0U;
    +
    69 bool hasPgn = false;
    +
    70 std::string transmitter;
    +
    71 std::string comment;
    +
    72 std::vector<DecodeSignal> signals;
    +
    74 DecodeFrame() = default;
    75};
    76
    80struct FrameKey {
    -
    81 std::uint32_t canId;
    -
    82 bool isExtended;
    +
    81 std::uint32_t canId = 0U;
    +
    82 bool isExtended = false;
    83
    -
    84 FrameKey()
    -
    85 : canId(0U), isExtended(false) {
    -
    86 }
    -
    87
    -
    88 FrameKey(std::uint32_t id, bool extended)
    -
    89 : canId(id), isExtended(extended) {
    -
    90 }
    -
    91
    -
    92 bool operator==(const FrameKey &other) const {
    -
    93 return (canId == other.canId) && (isExtended == other.isExtended);
    -
    94 }
    -
    95};
    +
    84 FrameKey() = default;
    +
    85
    +
    86 FrameKey(std::uint32_t id, bool extended)
    +
    87 : canId(id), isExtended(extended) {
    +
    88 }
    +
    89
    +
    90 bool operator==(const FrameKey &other) const {
    +
    91 return (canId == other.canId) && (isExtended == other.isExtended);
    +
    92 }
    +
    93};
    -
    96
    -
    - -
    101 std::size_t operator()(const FrameKey &key) const {
    -
    102 const std::size_t a = static_cast<std::size_t>(key.canId);
    -
    103 const std::size_t b = key.isExtended ? 1U : 0U;
    -
    104 return (a * 1315423911U) ^ b;
    -
    105 }
    -
    106};
    +
    94
    +
    + +
    99 std::size_t operator()(const FrameKey &key) const {
    +
    100 const std::size_t a = static_cast<std::size_t>(key.canId);
    +
    101 const std::size_t b = key.isExtended ? 1U : 0U;
    +
    102 return (a * 1315423911U) ^ b;
    +
    103 }
    +
    104};
    -
    107
    -
    - -
    112 std::vector<DecodeFrame> frames;
    -
    113 std::unordered_map<FrameKey, std::size_t, FrameKeyHasher> frameIndexByKey;
    -
    114};
    +
    105
    +
    + +
    110 std::vector<DecodeFrame> frames;
    +
    111 std::unordered_map<FrameKey, std::size_t, FrameKeyHasher> frameIndexByKey;
    +
    112};
    -
    115
    -
    116#endif /* DECODE_DATABASE_H */
    -
    ByteOrder
    Signal byte order used for runtime decoding.
    -
    ValueType
    Signal numeric type.
    -
    Runtime decode database with fast lookup by CAN ID.
    -
    Runtime-ready frame definition.
    -
    std::uint32_t pgn
    - -
    std::string comment
    - -
    std::uint8_t dlc
    -
    std::uint32_t canId
    -
    std::string name
    -
    std::string transmitter
    -
    Runtime-ready signal definition.
    - -
    std::string unit
    - - -
    std::string name
    - -
    ValueType valueType
    -
    std::uint32_t startBit
    -
    std::vector< std::string > receivers
    -
    ByteOrder byteOrder
    -
    std::uint32_t length
    -
    std::string comment
    -
    Hasher for frame key.
    +
    113
    +
    114#endif /* DECODE_DATABASE_H */
    +
    ByteOrder
    Signal byte order used for runtime decoding.
    +
    ValueType
    Signal numeric type.
    +
    Runtime decode database with fast lookup by CAN ID.
    +
    Runtime-ready frame definition.
    +
    std::uint32_t pgn
    + +
    std::string comment
    + +
    std::uint8_t dlc
    +
    std::uint32_t canId
    +
    std::string name
    +
    std::string transmitter
    +
    Runtime-ready signal definition.
    + +
    std::string unit
    + + +
    std::string name
    +
    ValueDescriptions valueDescriptions
    + +
    ValueType valueType
    +
    std::uint32_t startBit
    +
    std::vector< std::string > receivers
    +
    ByteOrder byteOrder
    +
    std::uint32_t length
    +
    std::string comment
    +
    Hasher for frame key.
    Key for fast frame lookup.
    +
    diff --git a/docs/html/dir_0f63d6441a2c250919e1e8723011eb2f.html b/docs/html/dir_0f63d6441a2c250919e1e8723011eb2f.html new file mode 100644 index 0000000..7a9d70b --- /dev/null +++ b/docs/html/dir_0f63d6441a2c250919e1e8723011eb2f.html @@ -0,0 +1,114 @@ + + + + + + + +DBC Framework: qt Directory Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    DBC Framework +
    +
    DBC parsing and CAN signal decoding framework
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    qt Directory Reference
    +
    +
    + + + + + + +

    +Files

     dbc_tree_model.cpp
     
     dbc_tree_model.h
     
    +
    +
    + + + + diff --git a/docs/html/dir_0f63d6441a2c250919e1e8723011eb2f.js b/docs/html/dir_0f63d6441a2c250919e1e8723011eb2f.js new file mode 100644 index 0000000..3ae31e1 --- /dev/null +++ b/docs/html/dir_0f63d6441a2c250919e1e8723011eb2f.js @@ -0,0 +1,5 @@ +var dir_0f63d6441a2c250919e1e8723011eb2f = +[ + [ "dbc_tree_model.cpp", "dbc__tree__model_8cpp_source.html", null ], + [ "dbc_tree_model.h", "dbc__tree__model_8h_source.html", null ] +]; \ No newline at end of file diff --git a/docs/html/dir_4270bfced15e0e73154b13468c7c9ad9.html b/docs/html/dir_4270bfced15e0e73154b13468c7c9ad9.html index 945efa8..f1e7fbf 100644 --- a/docs/html/dir_4270bfced15e0e73154b13468c7c9ad9.html +++ b/docs/html/dir_4270bfced15e0e73154b13468c7c9ad9.html @@ -133,9 +133,13 @@ Files  frame_info.h  Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
      + multiplexing.h +   signal_info.h  Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
      + text_utils.h +   tree_node.cpp  Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
      @@ -144,6 +148,8 @@ Files    typefactory.h   + value_descriptions.h + 
    diff --git a/docs/html/dir_4270bfced15e0e73154b13468c7c9ad9.js b/docs/html/dir_4270bfced15e0e73154b13468c7c9ad9.js index d17885c..6438c68 100644 --- a/docs/html/dir_4270bfced15e0e73154b13468c7c9ad9.js +++ b/docs/html/dir_4270bfced15e0e73154b13468c7c9ad9.js @@ -13,8 +13,11 @@ var dir_4270bfced15e0e73154b13468c7c9ad9 = [ "dbc_tree_builder.h", "dbc__tree__builder_8h.html", "dbc__tree__builder_8h" ], [ "decode_database.h", "decode__database_8h.html", "decode__database_8h" ], [ "frame_info.h", "frame__info_8h.html", "frame__info_8h" ], + [ "multiplexing.h", "multiplexing_8h_source.html", null ], [ "signal_info.h", "signal__info_8h.html", "signal__info_8h" ], + [ "text_utils.h", "text__utils_8h_source.html", null ], [ "tree_node.cpp", "tree__node_8cpp.html", null ], [ "tree_node.h", "tree__node_8h.html", "tree__node_8h" ], - [ "typefactory.h", "typefactory_8h_source.html", null ] + [ "typefactory.h", "typefactory_8h_source.html", null ], + [ "value_descriptions.h", "value__descriptions_8h_source.html", null ] ]; \ No newline at end of file diff --git a/docs/html/dir_59425e443f801f1f2fd8bbe4959a3ccf.html b/docs/html/dir_59425e443f801f1f2fd8bbe4959a3ccf.html index e9af6da..3601aa5 100644 --- a/docs/html/dir_59425e443f801f1f2fd8bbe4959a3ccf.html +++ b/docs/html/dir_59425e443f801f1f2fd8bbe4959a3ccf.html @@ -96,12 +96,18 @@ $(document).ready(function(){initNavTree('dir_59425e443f801f1f2fd8bbe4959a3ccf.h + + + + + +

    Files

     dbc_coverage_test.cpp
     
     dbc_decoder_test.cpp
     
     dbc_parser_test.cpp
     
     dbc_tree_model_test.cpp
     
     main.cpp
     
     tree_node_test.cpp
     
    diff --git a/docs/html/dir_59425e443f801f1f2fd8bbe4959a3ccf.js b/docs/html/dir_59425e443f801f1f2fd8bbe4959a3ccf.js index 9b85d05..8743b94 100644 --- a/docs/html/dir_59425e443f801f1f2fd8bbe4959a3ccf.js +++ b/docs/html/dir_59425e443f801f1f2fd8bbe4959a3ccf.js @@ -1,6 +1,9 @@ var dir_59425e443f801f1f2fd8bbe4959a3ccf = [ + [ "dbc_coverage_test.cpp", "dbc__coverage__test_8cpp_source.html", null ], [ "dbc_decoder_test.cpp", "dbc__decoder__test_8cpp_source.html", null ], [ "dbc_parser_test.cpp", "dbc__parser__test_8cpp_source.html", null ], - [ "tests/main.cpp", "tests_2main_8cpp_source.html", null ] + [ "dbc_tree_model_test.cpp", "dbc__tree__model__test_8cpp_source.html", null ], + [ "tests/main.cpp", "tests_2main_8cpp_source.html", null ], + [ "tree_node_test.cpp", "tree__node__test_8cpp_source.html", null ] ]; \ No newline at end of file diff --git a/docs/html/examples_2main_8cpp.html b/docs/html/examples_2main_8cpp.html index 51b7d53..3228246 100644 --- a/docs/html/examples_2main_8cpp.html +++ b/docs/html/examples_2main_8cpp.html @@ -147,7 +147,7 @@ Functions
    -

    Definition at line 101 of file examples/main.cpp.

    +

    Definition at line 100 of file examples/main.cpp.

    diff --git a/docs/html/examples_2main_8cpp_source.html b/docs/html/examples_2main_8cpp_source.html index ba84d7d..83a67a3 100644 --- a/docs/html/examples_2main_8cpp_source.html +++ b/docs/html/examples_2main_8cpp_source.html @@ -170,96 +170,89 @@ $(document).ready(function(){initNavTree('examples_2main_8cpp_source.html','');
    80
    81 std::cout << "Decoded frame: " << decoded.definition->name << "\n";
    82
    -
    83 for (std::size_t index = 0U; index < decoded.signals.size(); ++index) {
    -
    84 const DecodedSignalValue &signal = decoded.signals[index];
    -
    85
    -
    86 if ((signal.definition == nullptr) || !signal.valid)
    -
    87 continue;
    -
    88
    -
    89 std::cout << " " << signal.definition->name
    -
    90 << " raw=";
    -
    91 if (const auto *signedValue = std::get_if<std::int64_t>(&signal.rawValue))
    -
    92 std::cout << *signedValue;
    -
    93 else
    -
    94 std::cout << std::get<std::uint64_t>(signal.rawValue);
    -
    95 std::cout << " physical=" << signal.physicalValue
    -
    96 << " " << signal.definition->unit
    -
    97 << "\n";
    -
    98 }
    -
    99}
    -
    100
    -
    101int main(int argc, char *argv[]) {
    -
    102 if (argc < 2) {
    -
    103 std::cerr << "Usage: dbc_demo <file.dbc>\n";
    -
    104 return 1;
    -
    105 }
    -
    106
    -
    107 try {
    -
    108 DbcParser parser;
    -
    109 DbcDatabase database = parser.ParseFile(argv[1]);
    -
    110
    -
    111 DbcTreeBuilder treeBuilder;
    -
    112 std::unique_ptr<TreeNode> root = treeBuilder.Build(database);
    -
    113
    -
    114 std::cout << "=== Parsed tree ===\n";
    -
    115 PrintTree(root.get(), 0);
    -
    116
    -
    117 DbcDecodeBuilder decodeBuilder;
    -
    118 DecodeDatabase decodeDatabase = decodeBuilder.Build(database);
    -
    119
    -
    120 /*
    -
    121 * Example raw frame.
    -
    122 * Replace with live CAN frame or trace record later.
    -
    123 */
    -
    124 RawCanFrame rawFrame;
    -
    125 rawFrame.canId = decodeDatabase.frames.empty() ? 0U : decodeDatabase.frames[0].canId;
    -
    126 rawFrame.isExtended = decodeDatabase.frames.empty() ? false : decodeDatabase.frames[0].isExtended;
    -
    127 rawFrame.data.resize(8U, 0U);
    -
    128
    -
    129 DbcDecoder decoder;
    -
    130 DecodedFrameValue decoded = decoder.Decode(decodeDatabase, rawFrame);
    -
    131
    -
    132 std::cout << "\n=== Decoded frame ===\n";
    -
    133 PrintDecodedFrame(decoded);
    -
    134 } catch (const std::exception &ex) {
    -
    135 std::cerr << "Error: " << ex.what() << "\n";
    -
    136 return 2;
    -
    137 }
    -
    138
    -
    139 return 0;
    -
    140}
    +
    83 for (const DecodedSignalValue &signal : decoded.signals) {
    +
    84
    +
    85 if ((signal.definition == nullptr) || !signal.valid)
    +
    86 continue;
    +
    87
    +
    88 std::cout << " " << signal.definition->name
    +
    89 << " raw=";
    +
    90 if (const std::int64_t *signedValue = std::get_if<std::int64_t>(&signal.rawValue))
    +
    91 std::cout << *signedValue;
    +
    92 else
    +
    93 std::cout << std::get<std::uint64_t>(signal.rawValue);
    +
    94 std::cout << " physical=" << signal.physicalValue
    +
    95 << " " << signal.definition->unit
    +
    96 << "\n";
    +
    97 }
    +
    98}
    +
    99
    +
    100int main(int argc, char *argv[]) {
    +
    101 if (argc < 2) {
    +
    102 std::cerr << "Usage: dbc_demo <file.dbc>\n";
    +
    103 return 1;
    +
    104 }
    +
    105
    +
    106 try {
    +
    107 DbcParser parser;
    +
    108 DbcDatabase database = parser.ParseFile(argv[1]);
    +
    109
    +
    110 DbcTreeBuilder treeBuilder;
    +
    111 std::unique_ptr<TreeNode> root = treeBuilder.Build(database);
    +
    112
    +
    113 std::cout << "=== Parsed tree ===\n";
    +
    114 PrintTree(root.get(), 0);
    +
    115
    +
    116 DbcDecodeBuilder decodeBuilder;
    +
    117 DecodeDatabase decodeDatabase = decodeBuilder.Build(database);
    +
    118
    +
    119 /*
    +
    120 * Example raw frame.
    +
    121 * Replace with live CAN frame or trace record later.
    +
    122 */
    +
    123 RawCanFrame rawFrame;
    +
    124 rawFrame.canId = decodeDatabase.frames.empty() ? 0U : decodeDatabase.frames[0].canId;
    +
    125 rawFrame.isExtended = decodeDatabase.frames.empty() ? false : decodeDatabase.frames[0].isExtended;
    +
    126 rawFrame.data.resize(8U, 0U);
    +
    127
    +
    128 DbcDecoder decoder;
    +
    129 DecodedFrameValue decoded = decoder.Decode(decodeDatabase, rawFrame);
    +
    130
    +
    131 std::cout << "\n=== Decoded frame ===\n";
    +
    132 PrintDecodedFrame(decoded);
    +
    133 } catch (const std::exception &ex) {
    +
    134 std::cerr << "Error: " << ex.what() << "\n";
    +
    135 return 2;
    +
    136 }
    +
    137
    +
    138 return 0;
    +
    139}
    Converts parsed DBC data into runtime decode database.
    DecodeDatabase Build(const DbcDatabase &source) const
    Build runtime decode database.
    -
    Runtime CAN decoder using prebuilt decode database.
    Definition dbc_decoder.h:64
    +
    Runtime CAN decoder using prebuilt decode database.
    Definition dbc_decoder.h:72
    DecodedFrameValue Decode(const DecodeDatabase &database, const RawCanFrame &frame) const
    Decode one raw CAN frame.
    -
    Minimal DBC parser.
    Definition dbc_parser.h:33
    -
    DbcDatabase ParseFile(const std::string &filePath) const
    Parse DBC file.
    +
    Minimal DBC parser.
    Definition dbc_parser.h:34
    +
    DbcDatabase ParseFile(const std::string &filePath) const
    Parse DBC file.
    Builds a simple tree from parsed DBC database.
    std::unique_ptr< TreeNode > Build(const DbcDatabase &database) const
    Build tree representation of parsed DBC data.
    Tree node for later use in model/view or other hierarchy consumers.
    Definition tree_node.h:35
    -
    const SignalInfo * GetSignal() const
    Get signal payload if node is signal.
    Definition tree_node.cpp:61
    -
    const TreeNode * GetChild(std::size_t index) const
    Get child by index.
    Definition tree_node.cpp:35
    -
    const std::string & GetName() const
    Get display name.
    Definition tree_node.cpp:53
    -
    std::size_t GetChildCount() const
    Get child count.
    Definition tree_node.cpp:31
    -
    NodeType GetType() const
    Get node type.
    Definition tree_node.cpp:49
    -
    const FrameInfo * GetFrame() const
    Get frame payload if node is frame.
    Definition tree_node.cpp:57
    +
    const SignalInfo * GetSignal() const
    Get signal payload if node is signal.
    Definition tree_node.cpp:64
    +
    const TreeNode * GetChild(std::size_t index) const
    Get child by index.
    Definition tree_node.cpp:38
    +
    const std::string & GetName() const
    Get display name.
    Definition tree_node.cpp:56
    +
    std::size_t GetChildCount() const
    Get child count.
    Definition tree_node.cpp:34
    +
    NodeType GetType() const
    Get node type.
    Definition tree_node.cpp:52
    +
    const FrameInfo * GetFrame() const
    Get frame payload if node is frame.
    Definition tree_node.cpp:60
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    Parsed DBC content stored in a simple internal form.
    -
    Runtime decode database with fast lookup by CAN ID.
    -
    std::string name
    -
    std::string unit
    -
    std::string name
    -
    Fully decoded frame.
    Definition dbc_decoder.h:51
    - -
    const DecodeFrame * definition
    Definition dbc_decoder.h:52
    -
    One decoded signal value.
    Definition dbc_decoder.h:37
    - -
    std::variant< std::int64_t, std::uint64_t > rawValue
    Definition dbc_decoder.h:39
    - -
    const DecodeSignal * definition
    Definition dbc_decoder.h:38
    +
    Runtime decode database with fast lookup by CAN ID.
    +
    std::string name
    +
    Fully decoded frame.
    Definition dbc_decoder.h:61
    + +
    const DecodeFrame * definition
    Definition dbc_decoder.h:62
    +
    One decoded signal value.
    Definition dbc_decoder.h:43
    Describes one CAN frame from a DBC file.
    Definition frame_info.h:24
    bool isExtended
    Definition frame_info.h:27
    bool hasPgn
    Definition frame_info.h:29
    @@ -270,10 +263,11 @@ $(document).ready(function(){initNavTree('examples_2main_8cpp_source.html','');
    std::vector< std::uint8_t > data
    Definition dbc_decoder.h:27
    std::uint32_t canId
    Definition dbc_decoder.h:25
    bool isExtended
    Definition dbc_decoder.h:26
    -
    Describes one signal inside a DBC frame.
    Definition signal_info.h:22
    -
    std::uint32_t length
    Definition signal_info.h:25
    -
    std::string unit
    Definition signal_info.h:32
    -
    std::uint32_t startBit
    Definition signal_info.h:24
    +
    Describes one signal inside a DBC frame.
    Definition signal_info.h:24
    +
    std::uint32_t length
    Definition signal_info.h:28
    +
    std::string unit
    Definition signal_info.h:35
    +
    std::string name
    Definition signal_info.h:26
    +
    std::uint32_t startBit
    Definition signal_info.h:27
    diff --git a/docs/html/files.html b/docs/html/files.html index 3036d8c..b221261 100644 --- a/docs/html/files.html +++ b/docs/html/files.html @@ -109,16 +109,25 @@ $(document).ready(function(){initNavTree('files.html',''); initResizable(); });  dbc_tree_builder.hCreated: 2026-03-13 Author: Deeaitch (Dim. Himro)  decode_database.hCreated: 2026-03-13 Author: Deeaitch (Dim. Himro)  frame_info.hCreated: 2026-03-13 Author: Deeaitch (Dim. Himro) - signal_info.hCreated: 2026-03-13 Author: Deeaitch (Dim. Himro) - tree_node.cppCreated: 2026-03-13 Author: Deeaitch (Dim. Himro) - tree_node.hCreated: 2026-03-13 Author: Deeaitch (Dim. Himro) - typefactory.h - ▼ examples - main.cppCreated: 2026-03-13 Author: Deeaitch (Dim. Himro) - ▼ tests - dbc_decoder_test.cpp - dbc_parser_test.cpp - main.cpp + multiplexing.h + signal_info.hCreated: 2026-03-13 Author: Deeaitch (Dim. Himro) + text_utils.h + tree_node.cppCreated: 2026-03-13 Author: Deeaitch (Dim. Himro) + tree_node.hCreated: 2026-03-13 Author: Deeaitch (Dim. Himro) + typefactory.h + value_descriptions.h + ▼ examples + main.cppCreated: 2026-03-13 Author: Deeaitch (Dim. Himro) + ▼ qt + dbc_tree_model.cpp + dbc_tree_model.h + ▼ tests + dbc_coverage_test.cpp + dbc_decoder_test.cpp + dbc_parser_test.cpp + dbc_tree_model_test.cpp + main.cpp + tree_node_test.cpp diff --git a/docs/html/files_dup.js b/docs/html/files_dup.js index 431bb88..04c5796 100644 --- a/docs/html/files_dup.js +++ b/docs/html/files_dup.js @@ -2,5 +2,6 @@ var files_dup = [ [ "core", "dir_4270bfced15e0e73154b13468c7c9ad9.html", "dir_4270bfced15e0e73154b13468c7c9ad9" ], [ "examples", "dir_d28a4824dc47e487b107a5db32ef43c4.html", "dir_d28a4824dc47e487b107a5db32ef43c4" ], + [ "qt", "dir_0f63d6441a2c250919e1e8723011eb2f.html", "dir_0f63d6441a2c250919e1e8723011eb2f" ], [ "tests", "dir_59425e443f801f1f2fd8bbe4959a3ccf.html", "dir_59425e443f801f1f2fd8bbe4959a3ccf" ] ]; \ No newline at end of file diff --git a/docs/html/frame__info_8h_source.html b/docs/html/frame__info_8h_source.html index db51f9d..e5b3f91 100644 --- a/docs/html/frame__info_8h_source.html +++ b/docs/html/frame__info_8h_source.html @@ -110,22 +110,20 @@ $(document).ready(function(){initNavTree('frame__info_8h_source.html',''); initR
    20
    24struct FrameInfo {
    -
    25 std::string name;
    -
    26 std::uint32_t canId;
    - -
    28 std::uint32_t pgn;
    -
    29 bool hasPgn;
    -
    30 std::uint8_t dlc;
    -
    31 std::string transmitter;
    -
    32 std::string comment;
    -
    33 std::vector<SignalInfo> signals;
    -
    35 FrameInfo()
    -
    36 : name(), canId(0U), isExtended(false), pgn(0U), hasPgn(false), dlc(0U), transmitter(), comment(), signals() {
    -
    37 }
    -
    38};
    +
    25 std::string name;
    +
    26 std::uint32_t canId = 0U;
    +
    27 bool isExtended = false;
    +
    28 std::uint32_t pgn = 0U;
    +
    29 bool hasPgn = false;
    +
    30 std::uint8_t dlc = 0U;
    +
    31 std::string transmitter;
    +
    32 std::string comment;
    +
    33 std::vector<SignalInfo> signals;
    +
    35 FrameInfo() = default;
    +
    36};
    -
    39
    -
    40#endif /* FRAME_INFO_H */
    +
    37
    +
    38#endif /* FRAME_INFO_H */
    Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
    Describes one CAN frame from a DBC file.
    Definition frame_info.h:24
    bool isExtended
    Definition frame_info.h:27
    diff --git a/docs/html/functions.html b/docs/html/functions.html index 94d8152..88236c5 100644 --- a/docs/html/functions.html +++ b/docs/html/functions.html @@ -133,8 +133,11 @@ $(document).ready(function(){initNavTree('functions.html',''); initResizable();
  • GetChildCount() : TreeNode
  • GetFrame() : TreeNode
  • GetName() : TreeNode
  • +
  • GetParent() : TreeNode
  • +
  • GetRow() : TreeNode
  • GetSignal() : TreeNode
  • GetType() : TreeNode
  • +
  • GetValueDescription() : DecodedSignalValue
  • @@ -180,7 +183,7 @@ $(document).ready(function(){initNavTree('functions.html',''); initResizable();

    - r -

    @@ -204,6 +207,7 @@ $(document).ready(function(){initNavTree('functions.html',''); initResizable();

    - v -

    diff --git a/docs/html/functions_func.html b/docs/html/functions_func.html index 4b43cc0..91794d1 100644 --- a/docs/html/functions_func.html +++ b/docs/html/functions_func.html @@ -103,8 +103,11 @@ $(document).ready(function(){initNavTree('functions_func.html',''); initResizabl
  • GetChildCount() : TreeNode
  • GetFrame() : TreeNode
  • GetName() : TreeNode
  • +
  • GetParent() : TreeNode
  • +
  • GetRow() : TreeNode
  • GetSignal() : TreeNode
  • GetType() : TreeNode
  • +
  • GetValueDescription() : DecodedSignalValue
  • ParseFile() : DbcParser
  • registerType() : TypeFactory< ClassId, BaseClass, Args >
  • TreeNode() : TreeNode
  • diff --git a/docs/html/functions_vars.html b/docs/html/functions_vars.html index 9b0dffc..36265bb 100644 --- a/docs/html/functions_vars.html +++ b/docs/html/functions_vars.html @@ -157,7 +157,7 @@ $(document).ready(function(){initNavTree('functions_vars.html',''); initResizabl

    - r -

    @@ -179,6 +179,7 @@ $(document).ready(function(){initNavTree('functions_vars.html',''); initResizabl

    - v -

    diff --git a/docs/html/hierarchy.html b/docs/html/hierarchy.html index fe782d1..6f9a9f6 100644 --- a/docs/html/hierarchy.html +++ b/docs/html/hierarchy.html @@ -107,6 +107,8 @@ This inheritance list is sorted roughly, but not completely, alphabetically: CDbcCommentHandler  CDbcFrameHandler  CDbcSignalHandler + CDbcUnsupportedMultiplexingHandler + CDbcValueDescriptionHandler  CDbcTreeBuilderBuilds a simple tree from parsed DBC database  CDecodeDatabaseRuntime decode database with fast lookup by CAN ID  CDecodedFrameValueFully decoded frame @@ -116,11 +118,15 @@ This inheritance list is sorted roughly, but not completely, alphabetically: CFrameInfoDescribes one CAN frame from a DBC file  CFrameKeyKey for fast frame lookup  CFrameKeyHasherHasher for frame key - CRawCanFrameRaw CAN frame used for runtime or trace decoding - CSignalInfoDescribes one signal inside a DBC frame - CTreeNodeTree node for later use in model/view or other hierarchy consumers - CTypeFactory< ClassId, BaseClass, Args >Registry-based factory for creating objects by runtime identifier - CTypeFactory< std::string, DbcStatementHandler > + CMultiplexing + CPendingValueDescriptions + ▼CQAbstractItemModel + CDbcTreeModel + CRawCanFrameRaw CAN frame used for runtime or trace decoding + CSignalInfoDescribes one signal inside a DBC frame + CTreeNodeTree node for later use in model/view or other hierarchy consumers + CTypeFactory< ClassId, BaseClass, Args >Registry-based factory for creating objects by runtime identifier + CTypeFactory< std::string, DbcStatementHandler > diff --git a/docs/html/hierarchy.js b/docs/html/hierarchy.js index bac4f4a..ba5fae1 100644 --- a/docs/html/hierarchy.js +++ b/docs/html/hierarchy.js @@ -9,7 +9,9 @@ var hierarchy = [ "DbcStatementHandler", "classDbcStatementHandler.html", [ [ "DbcCommentHandler", "classDbcCommentHandler.html", null ], [ "DbcFrameHandler", "classDbcFrameHandler.html", null ], - [ "DbcSignalHandler", "classDbcSignalHandler.html", null ] + [ "DbcSignalHandler", "classDbcSignalHandler.html", null ], + [ "DbcUnsupportedMultiplexingHandler", "classDbcUnsupportedMultiplexingHandler.html", null ], + [ "DbcValueDescriptionHandler", "classDbcValueDescriptionHandler.html", null ] ] ], [ "DbcTreeBuilder", "classDbcTreeBuilder.html", null ], [ "DecodeDatabase", "structDecodeDatabase.html", null ], @@ -20,6 +22,11 @@ var hierarchy = [ "FrameInfo", "structFrameInfo.html", null ], [ "FrameKey", "structFrameKey.html", null ], [ "FrameKeyHasher", "structFrameKeyHasher.html", null ], + [ "Multiplexing", "structMultiplexing.html", null ], + [ "PendingValueDescriptions", "structPendingValueDescriptions.html", null ], + [ "QAbstractItemModel", null, [ + [ "DbcTreeModel", "classDbcTreeModel.html", null ] + ] ], [ "RawCanFrame", "structRawCanFrame.html", null ], [ "SignalInfo", "structSignalInfo.html", null ], [ "TreeNode", "classTreeNode.html", null ], diff --git a/docs/html/index.qhp b/docs/html/index.qhp index 81d2a19..12d5ce0 100644 --- a/docs/html/index.qhp +++ b/docs/html/index.qhp @@ -12,84 +12,116 @@ doxygen
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    -
    -
    -
    -
    +
    +
    +
    +
    -
    -
    -
    -
    -
    -
    -
    -
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    +
    +
    +
    +
    +
    +
    -
    -
    -
    -
    -
    -
    +
    +
    -
    -
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    +
    +
    +
    -
    -
    -
    -
    -
    -
    -
    -
    -
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    -
    -
    -
    -
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    -
    -
    -
    +
    +
    +
    +
    @@ -122,6 +154,12 @@
    +
    +
    +
    +
    +
    +
    @@ -130,8 +168,9 @@
    +
    -
    +
    @@ -158,6 +197,7 @@
    +
    @@ -175,6 +215,10 @@
    +
    +
    +
    +
    @@ -192,6 +236,7 @@
    +
    @@ -199,6 +244,8 @@
    +
    +
    @@ -226,6 +273,8 @@
    +
    +
    @@ -236,6 +285,11 @@
    +
    +
    +
    +
    +
    @@ -270,8 +324,9 @@
    +
    -
    +
    @@ -312,6 +367,7 @@
    +
    @@ -353,6 +409,7 @@
    +
    @@ -366,9 +423,11 @@
    +
    +
    @@ -376,6 +435,8 @@
    +
    +
    @@ -391,15 +452,23 @@
    +
    +
    +
    +
    +
    +
    +
    +
    @@ -421,6 +490,9 @@ + + + @@ -429,11 +501,14 @@ + + + @@ -469,8 +544,11 @@ + + + @@ -497,7 +575,7 @@ - + @@ -513,6 +591,8 @@ + + @@ -551,6 +631,15 @@ classDbcStatementHandler__inherit__graph.svg classDbcTreeBuilder-members.html classDbcTreeBuilder.html +classDbcTreeModel-members.html +classDbcTreeModel.html +classDbcTreeModel__inherit__graph.svg +classDbcUnsupportedMultiplexingHandler-members.html +classDbcUnsupportedMultiplexingHandler.html +classDbcUnsupportedMultiplexingHandler__inherit__graph.svg +classDbcValueDescriptionHandler-members.html +classDbcValueDescriptionHandler.html +classDbcValueDescriptionHandler__inherit__graph.svg classTreeNode-members.html classTreeNode.html classTypeFactory-members.html @@ -558,6 +647,7 @@ classTypeFactory__inherit__graph.svg classes.html closed.png +dbc__coverage__test_8cpp_source.html dbc__database_8h.html dbc__database_8h_source.html dbc__decode__builder_8cpp.html @@ -580,8 +670,12 @@ dbc__tree__builder_8cpp_source.html dbc__tree__builder_8h.html dbc__tree__builder_8h_source.html +dbc__tree__model_8cpp_source.html +dbc__tree__model_8h_source.html +dbc__tree__model__test_8cpp_source.html decode__database_8h.html decode__database_8h_source.html +dir_0f63d6441a2c250919e1e8723011eb2f.html dir_4270bfced15e0e73154b13468c7c9ad9.html dir_59425e443f801f1f2fd8bbe4959a3ccf.html dir_d28a4824dc47e487b107a5db32ef43c4.html @@ -616,6 +710,9 @@ inherit_graph_19.svg inherit_graph_2.svg inherit_graph_20.svg +inherit_graph_21.svg +inherit_graph_22.svg +inherit_graph_23.svg inherit_graph_3.svg inherit_graph_4.svg inherit_graph_5.svg @@ -626,9 +723,11 @@ inherits.html jquery.js md_README.html +md_changelog.html md_tests_2README.html menu.js menudata.js +multiplexing_8h_source.html nav_f.png nav_fd.png nav_g.png @@ -647,6 +746,8 @@ search/all_16.js search/all_17.js search/all_18.js +search/all_19.js +search/all_1a.js search/all_2.js search/all_3.js search/all_4.js @@ -666,6 +767,8 @@ search/classes_2.js search/classes_3.js search/classes_4.js +search/classes_5.js +search/classes_6.js search/close.svg search/enums_0.js search/enums_1.js @@ -695,6 +798,7 @@ search/pages_4.js search/pages_5.js search/pages_6.js +search/pages_7.js search/search.css search/search.js search/searchdata.js @@ -738,6 +842,10 @@ structFrameKey.html structFrameKeyHasher-members.html structFrameKeyHasher.html +structMultiplexing-members.html +structMultiplexing.html +structPendingValueDescriptions-members.html +structPendingValueDescriptions.html structRawCanFrame-members.html structRawCanFrame.html structSignalInfo-members.html @@ -755,11 +863,14 @@ tab_sd.png tabs.css tests_2main_8cpp_source.html +text__utils_8h_source.html tree__node_8cpp.html tree__node_8cpp_source.html tree__node_8h.html tree__node_8h_source.html +tree__node__test_8cpp_source.html typefactory_8h_source.html +value__descriptions_8h_source.html diff --git a/docs/html/inherit_graph_16.map b/docs/html/inherit_graph_16.map index baccc4c..6d8239d 100644 --- a/docs/html/inherit_graph_16.map +++ b/docs/html/inherit_graph_16.map @@ -1,3 +1,3 @@ - + diff --git a/docs/html/inherit_graph_16.md5 b/docs/html/inherit_graph_16.md5 index 8e49fd2..4493996 100644 --- a/docs/html/inherit_graph_16.md5 +++ b/docs/html/inherit_graph_16.md5 @@ -1 +1 @@ -a0ca65c977c3eeaa49d3a753e2b425f7 \ No newline at end of file +9c7c19c49bb06cf85d4a0f4383b32c46 \ No newline at end of file diff --git a/docs/html/inherit_graph_16.svg b/docs/html/inherit_graph_16.svg index ac9b694..427ad14 100644 --- a/docs/html/inherit_graph_16.svg +++ b/docs/html/inherit_graph_16.svg @@ -4,16 +4,16 @@ - + Graphical Class Hierarchy Node0 - - -RawCanFrame + + +Multiplexing diff --git a/docs/html/inherit_graph_17.map b/docs/html/inherit_graph_17.map index 27221de..ad0caff 100644 --- a/docs/html/inherit_graph_17.map +++ b/docs/html/inherit_graph_17.map @@ -1,3 +1,3 @@ - + diff --git a/docs/html/inherit_graph_17.md5 b/docs/html/inherit_graph_17.md5 index c4410a4..d203585 100644 --- a/docs/html/inherit_graph_17.md5 +++ b/docs/html/inherit_graph_17.md5 @@ -1 +1 @@ -f2e229631b6e08e3f933a80cf3a704df \ No newline at end of file +1e7e1326294370b50e12696033f3e108 \ No newline at end of file diff --git a/docs/html/inherit_graph_17.svg b/docs/html/inherit_graph_17.svg index 7b67e3e..049d797 100644 --- a/docs/html/inherit_graph_17.svg +++ b/docs/html/inherit_graph_17.svg @@ -4,16 +4,16 @@ - + Graphical Class Hierarchy Node0 - - -SignalInfo + + +PendingValueDescriptions diff --git a/docs/html/inherit_graph_18.map b/docs/html/inherit_graph_18.map index d2067d8..9b4887e 100644 --- a/docs/html/inherit_graph_18.map +++ b/docs/html/inherit_graph_18.map @@ -1,3 +1,5 @@ - + + + diff --git a/docs/html/inherit_graph_18.md5 b/docs/html/inherit_graph_18.md5 index 53a15e0..f104abb 100644 --- a/docs/html/inherit_graph_18.md5 +++ b/docs/html/inherit_graph_18.md5 @@ -1 +1 @@ -0e692ac66fcc5782f37efa2f3d64c466 \ No newline at end of file +5ba14f6059c5b08d2880d5c03ee0eed4 \ No newline at end of file diff --git a/docs/html/inherit_graph_18.svg b/docs/html/inherit_graph_18.svg index a741e27..6f057cf 100644 --- a/docs/html/inherit_graph_18.svg +++ b/docs/html/inherit_graph_18.svg @@ -4,16 +4,34 @@ - + Graphical Class Hierarchy Node0 - - -TreeNode + + +QAbstractItemModel + + + + + +Node1 + + +DbcTreeModel + + + + + +Node0->Node1 + + + diff --git a/docs/html/inherit_graph_19.map b/docs/html/inherit_graph_19.map index cc8fd2d..baccc4c 100644 --- a/docs/html/inherit_graph_19.map +++ b/docs/html/inherit_graph_19.map @@ -1,3 +1,3 @@ - + diff --git a/docs/html/inherit_graph_19.md5 b/docs/html/inherit_graph_19.md5 index feef5c8..8e49fd2 100644 --- a/docs/html/inherit_graph_19.md5 +++ b/docs/html/inherit_graph_19.md5 @@ -1 +1 @@ -fd991ac56e8b35f6def7a3942058b044 \ No newline at end of file +a0ca65c977c3eeaa49d3a753e2b425f7 \ No newline at end of file diff --git a/docs/html/inherit_graph_19.svg b/docs/html/inherit_graph_19.svg index 1e19eb8..ac9b694 100644 --- a/docs/html/inherit_graph_19.svg +++ b/docs/html/inherit_graph_19.svg @@ -4,17 +4,16 @@ - - + + Graphical Class Hierarchy Node0 - - -TypeFactory< ClassId, - BaseClass, Args > + + +RawCanFrame diff --git a/docs/html/inherit_graph_20.map b/docs/html/inherit_graph_20.map index f89295a..27221de 100644 --- a/docs/html/inherit_graph_20.map +++ b/docs/html/inherit_graph_20.map @@ -1,3 +1,3 @@ - + diff --git a/docs/html/inherit_graph_20.md5 b/docs/html/inherit_graph_20.md5 index 0956862..c4410a4 100644 --- a/docs/html/inherit_graph_20.md5 +++ b/docs/html/inherit_graph_20.md5 @@ -1 +1 @@ -2e92ed9cb6b5a27ab688cfd97eafecca \ No newline at end of file +f2e229631b6e08e3f933a80cf3a704df \ No newline at end of file diff --git a/docs/html/inherit_graph_20.svg b/docs/html/inherit_graph_20.svg index cb57a17..7b67e3e 100644 --- a/docs/html/inherit_graph_20.svg +++ b/docs/html/inherit_graph_20.svg @@ -4,17 +4,16 @@ - - + + Graphical Class Hierarchy Node0 - - -TypeFactory< std::string, - DbcStatementHandler > + + +SignalInfo diff --git a/docs/html/inherit_graph_21.map b/docs/html/inherit_graph_21.map new file mode 100644 index 0000000..d2067d8 --- /dev/null +++ b/docs/html/inherit_graph_21.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/inherit_graph_21.md5 b/docs/html/inherit_graph_21.md5 new file mode 100644 index 0000000..53a15e0 --- /dev/null +++ b/docs/html/inherit_graph_21.md5 @@ -0,0 +1 @@ +0e692ac66fcc5782f37efa2f3d64c466 \ No newline at end of file diff --git a/docs/html/inherit_graph_21.svg b/docs/html/inherit_graph_21.svg new file mode 100644 index 0000000..a741e27 --- /dev/null +++ b/docs/html/inherit_graph_21.svg @@ -0,0 +1,21 @@ + + + + + + +Graphical Class Hierarchy + + +Node0 + + +TreeNode + + + + + diff --git a/docs/html/inherit_graph_22.map b/docs/html/inherit_graph_22.map new file mode 100644 index 0000000..cc8fd2d --- /dev/null +++ b/docs/html/inherit_graph_22.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/inherit_graph_22.md5 b/docs/html/inherit_graph_22.md5 new file mode 100644 index 0000000..feef5c8 --- /dev/null +++ b/docs/html/inherit_graph_22.md5 @@ -0,0 +1 @@ +fd991ac56e8b35f6def7a3942058b044 \ No newline at end of file diff --git a/docs/html/inherit_graph_22.svg b/docs/html/inherit_graph_22.svg new file mode 100644 index 0000000..1e19eb8 --- /dev/null +++ b/docs/html/inherit_graph_22.svg @@ -0,0 +1,22 @@ + + + + + + +Graphical Class Hierarchy + + +Node0 + + +TypeFactory< ClassId, + BaseClass, Args > + + + + + diff --git a/docs/html/inherit_graph_23.map b/docs/html/inherit_graph_23.map new file mode 100644 index 0000000..f89295a --- /dev/null +++ b/docs/html/inherit_graph_23.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/html/inherit_graph_23.md5 b/docs/html/inherit_graph_23.md5 new file mode 100644 index 0000000..0956862 --- /dev/null +++ b/docs/html/inherit_graph_23.md5 @@ -0,0 +1 @@ +2e92ed9cb6b5a27ab688cfd97eafecca \ No newline at end of file diff --git a/docs/html/inherit_graph_23.svg b/docs/html/inherit_graph_23.svg new file mode 100644 index 0000000..cb57a17 --- /dev/null +++ b/docs/html/inherit_graph_23.svg @@ -0,0 +1,22 @@ + + + + + + +Graphical Class Hierarchy + + +Node0 + + +TypeFactory< std::string, + DbcStatementHandler > + + + + + diff --git a/docs/html/inherit_graph_6.map b/docs/html/inherit_graph_6.map index cadb748..a378fba 100644 --- a/docs/html/inherit_graph_6.map +++ b/docs/html/inherit_graph_6.map @@ -1,9 +1,13 @@ - - - - - - - + + + + + + + + + + + diff --git a/docs/html/inherit_graph_6.md5 b/docs/html/inherit_graph_6.md5 index 070dc68..87f50ed 100644 --- a/docs/html/inherit_graph_6.md5 +++ b/docs/html/inherit_graph_6.md5 @@ -1 +1 @@ -e9e6d06a7f2003c539f18d3596a236e1 \ No newline at end of file +d6b2623682e815727c850a0a9a35ec54 \ No newline at end of file diff --git a/docs/html/inherit_graph_6.svg b/docs/html/inherit_graph_6.svg index 4f343a8..4d46883 100644 --- a/docs/html/inherit_graph_6.svg +++ b/docs/html/inherit_graph_6.svg @@ -4,16 +4,16 @@ - - + + Graphical Class Hierarchy Node0 - -DbcStatementHandler + +DbcStatementHandler @@ -21,8 +21,8 @@ Node1 - -DbcCommentHandler + +DbcCommentHandler @@ -30,8 +30,8 @@ Node0->Node1 - - + + @@ -39,8 +39,8 @@ Node2 - -DbcFrameHandler + +DbcFrameHandler @@ -48,8 +48,8 @@ Node0->Node2 - - + + @@ -57,8 +57,8 @@ Node3 - -DbcSignalHandler + +DbcSignalHandler @@ -66,8 +66,45 @@ Node0->Node3 - - + + + + + + + +Node4 + + +DbcUnsupportedMultiplexing +Handler + + + + + +Node0->Node4 + + + + + + + + +Node5 + + +DbcValueDescriptionHandler + + + + + +Node0->Node5 + + + diff --git a/docs/html/inherits.html b/docs/html/inherits.html index afe9bb3..dab4e30 100644 --- a/docs/html/inherits.html +++ b/docs/html/inherits.html @@ -102,7 +102,7 @@ $(document).ready(function(){initNavTree('hierarchy.html',''); initResizable();

    This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.

    - + @@ -112,11 +112,14 @@ $(document).ready(function(){initNavTree('hierarchy.html',''); initResizable(); - - - - - + + + + + + + + diff --git a/docs/html/md_README.html b/docs/html/md_README.html index c258ca2..7426f6b 100644 --- a/docs/html/md_README.html +++ b/docs/html/md_README.html @@ -58,7 +58,7 @@ $(function() { -
    @@ -93,8 +93,8 @@ $(document).ready(function(){initNavTree('md_README.html',''); initResizable();
    DBC Parser and Runtime Decode Module Documentation
    -

    -

    +

    +

    Overview

    This module provides a minimal but extensible DBC parser and runtime decode foundation for the FrameTap project.

    Its purpose is to:

    @@ -113,12 +113,13 @@ Overview

  • Qt is not required at the parser or decoder level
  • the same decode engine can be reused for live traffic and trace replay
  • -

    This is not a full production-grade DBC implementation yet, but it is a strong architectural base.

    +

    The core library uses C++17 and has no Qt dependency. Qt integration targets the installed Qt 6.8.2, which is the only supported Qt version. Qt Core and Qt Test are used by the regression tests; model tests also link QtGui for graphical metatypes. The optional adapter requires only Qt Core. Live CAN acquisition, trace-file readers, are left to the consuming application. An optional Qt Core model adapter is provided in qt/.

    +

    See changelog.md for the release and development history, tests/README.md for test instructions, and generated API documentation for the API reference.


    -

    +

    High-Level Architecture

    The module is divided into two main paths.

    -

    +

    1. Parse and UI path

    Used for:

      @@ -137,8 +138,8 @@ High-Level Architecture
      ↓
      TreeNode hierarchy
      ↓
      -
      future Qt UI
      -

    +
    DbcTreeModel → Qt views
    +

    2. Runtime decode path

    Used for:

      @@ -163,7 +164,7 @@ High-Level Architecture

      This separation is intentional.

      The tree is useful for UI, but it is not the main data structure for runtime decoding.


      -

      +

      Why the Runtime Decode Layer Exists

      A tree structure is convenient for browsing, but a runtime decoder needs something different:

        @@ -180,66 +181,37 @@ Why the Runtime Decode Layer Exists

      This avoids forcing UI-oriented structures into a decode role they were not meant for.


      -

      +

      Module Layout

      -

      -Parsed DBC structures

      -

      Files:

      - -

      These store a readable representation of the parsed DBC file.

      -

      -UI tree structures

      -

      Files:

      - -

      These convert parsed DBC content into a tree hierarchy suitable for UI and model/view usage later.

      -

      -Runtime decode structures

      -

      Files:

      - -

      These convert parsed DBC content into a structure optimized for decoding.

      -

      -Runtime decoder

      -

      Files:

      - -

      These perform actual decoding of raw CAN frames using DecodeDatabase.

      -

      -Parser

      -

      Files:

      - -

      The parser reads files and reports errors; registered statement handlers parse DBC constructs.

      -

      -Demo

      -

      File:

      -
        -
      • main.cpp
      • -
      -

      Used as a small integration example.

      +
      core/ C++17 parser, statement handlers, metadata, tree, and decoder
      +
      examples/ Command-line demo (built separately)
      +
      qt/ Optional read-only Qt Core model adapter
      +
      tests/ Parser, decoder, tree, and optional model tests
      +
      docs/ Generated Doxygen documentation
      +
      dbc.pro Root qmake project: core + tests
      +
      Doxyfile API documentation configuration
      +
      + + + + + + + + + + + + + + + + +
      Component Source files
      Parsed metadata core/dbc_database.h, core/frame_info.h, core/signal_info.h
      Parser and dispatch core/dbc_parser.*, core/dbc_statement_handler.*, core/typefactory.h
      UI tree core/tree_node.*, core/dbc_tree_builder.*
      Runtime database core/decode_database.h, core/dbc_decode_builder.*
      Decoder core/dbc_decoder.*
      Demo examples/main.cpp, examples/demo.pro
      Build integration core/core.pro, core/core_files.pri, core/core.pri

      -

      +

      Parsed Data Structures

      -

      +

      <tt>SignalInfo</tt>

      Represents one signal as parsed from the DBC file.

      Fields:

      @@ -266,7 +238,7 @@ Parsed Data Structures

      Physical value rule:

      physical = raw * factor + offset

      -

      +

      <tt>FrameInfo</tt>

      Represents one frame as parsed from the DBC file.

      Fields:

      @@ -288,7 +260,7 @@ Parsed Data Structures
    • pgn is derived using simplified J1939 logic when applicable

    -

    +

    <tt>DbcDatabase</tt>

    Top-level parsed DBC container.

    Conceptually:

    @@ -296,9 +268,9 @@ Parsed Data Structures
    └── vector<FrameInfo>

    This is the central structure produced by DbcParser.


    -

    +

    UI Tree Layer

    -

    +

    <tt>TreeNode</tt>

    The UI tree contains three node types:

      @@ -315,22 +287,22 @@ UI Tree Layer
      └── VehicleData
      ├── VehicleSpeed
      └── Odometer
      -

      Each node stores either:

      +

      Frame and signal nodes store copies of the corresponding metadata; the root has no metadata payload. The payload types are:

      -

      The tree is intended for browsing and later Qt model integration.

      +

      The tree supports browsing through the optional DbcTreeModel adapter.

      It is not the primary runtime decode structure.


      -

      +

      Runtime Decode Layer

      -

      +

      Purpose

      The decode layer exists so that decoding can be fast and independent from UI concerns.

      Instead of searching a tree, the decoder uses a prepared database with direct lookup.


      -

      +

      <tt>ByteOrder</tt>

      Runtime byte order enum:

        @@ -339,7 +311,7 @@ Purpose

      This is better for decode code than passing around raw DBC characters.


      -

      +

      <tt>ValueType</tt>

      Numeric type enum:

        @@ -348,7 +320,7 @@ Purpose

      This is clearer than combining multiple boolean flags during runtime logic.


      -

      +

      <tt>DecodeSignal</tt>

      Represents one runtime-ready signal definition.

      Fields:

      @@ -368,7 +340,7 @@ Purpose

    This structure contains all information required for extracting and converting a signal value from raw frame data.


    -

    +

    <tt>DecodeFrame</tt>

    Represents one runtime-ready frame definition.

    Fields:

    @@ -385,7 +357,7 @@ Purpose

    This structure is used directly by the decoder.


    -

    +

    <tt>FrameKey</tt>

    Fast lookup key for runtime frame matching.

    Fields:

    @@ -395,7 +367,7 @@ Purpose

    This matters because the same numeric identifier must not be confused between standard and extended frames.


    -

    +

    <tt>DecodeDatabase</tt>

    Top-level runtime decode container.

    Fields:

    @@ -409,9 +381,9 @@ Purpose
    └── unordered_map<FrameKey, index>

    This gives the decoder fast access to a frame definition using CAN ID and frame type.


    -

    +

    Decoder Layer

    -

    +

    <tt>RawCanFrame</tt>

    Represents a raw CAN frame to decode.

    Fields:

    @@ -427,7 +399,7 @@ Decoder Layer
  • unit tests

  • -

    +

    <tt>DecodedSignalValue</tt>

    Represents one decoded signal result.

    Fields:

    @@ -436,13 +408,14 @@ Decoder Layer
  • rawValue
  • physicalValue
  • valid
  • +
  • status

  • -

    +

    Raw value representation and precision

    -

    DecodedSignalValue::rawValue is a C++17 std::variant<std::int64_t, std::uint64_t>. For a valid signal, signed definitions produce the int64_t alternative and unsigned definitions produce the uint64_t alternative. Raw values remain exact across their full 64-bit ranges. Check valid before using the value; an invalid result's default value is not decoded data.

    +

    DecodedSignalValue::rawValue is a C++17 std::variant<std::int64_t, std::uint64_t>. For a valid signal, signed definitions produce the int64_t alternative and unsigned definitions produce the uint64_t alternative. Raw values remain exact across their full 64-bit ranges. Check valid before using the value; an invalid result's default value is not decoded data.

    Use std::get when the numeric type is known, or std::get_if to handle both:

    -
    if (const auto *value = std::get_if<std::int64_t>(&decodedSignal.rawValue)) {
    +
    if (const std::int64_t *value = std::get_if<std::int64_t>(&decodedSignal.rawValue)) {
    std::cout << *value;
    } else {
    std::cout << std::get<std::uint64_t>(decodedSignal.rawValue);
    @@ -450,7 +423,7 @@ Raw value representation and precision

    This replaces the previous int64_t field: consumers that read or print rawValue directly must handle the variant.

    Physical conversion uses the active numeric type: physicalValue = static_cast<double>(raw) * factor + offset. physicalValue remains a double and is approximate for large integers. On usual IEEE 754 binary64 implementations, integers are exactly representable through 2^53; above that, some integers round to the same floating-point value. For example, unsigned UINT64_MAX remains exact in rawValue, but converts to approximately 18446744073709551616 in binary64 before scaling. Use rawValue whenever exact integer values are required.


    -

    +

    <tt>DecodedFrameValue</tt>

    Represents one decoded frame result.

    Fields:

    @@ -459,15 +432,16 @@ Raw value representation and precision
  • signals
  • valid
  • -

    This is the decoder output for one raw frame.

    +

    valid means a matching frame definition was found. Check each signal's valid separately: insufficient payload data can leave individual signals invalid even when the frame is valid. An unknown frame returns valid == false.

    +

    The frame and signal definition pointers refer into DecodeDatabase. Keep that database alive and avoid changes that invalidate its frame or signal storage while using decoded results. The decoder applies factor and offset; it does not clamp physical values to the declared minimum and maximum.


    -

    +

    <tt>DbcDecoder</tt>

    Main runtime decoder class.

    Responsibilities:

    • find a frame definition by CAN ID
    • -
    • decode all signals in a frame
    • +
    • decode unconditional signals and the active multiplexed branch
    • extract raw values
    • sign-extend signed values
    • convert raw values into physical values
    • @@ -478,7 +452,7 @@ Raw value representation and precision
    • Decode(...)

    -

    +

    Parser Support

    The current parser supports the following DBC elements:

      @@ -486,11 +460,13 @@ Parser Support
    • SG_
    • CM_ BO_
    • CM_ SG_
    • +
    • VAL_ signal value descriptions
    • +
    • basic M / mN multiplexing

    -

    +

    Supported DBC Syntax

    -

    +

    Frame definition

    Example:

    BO_ 256 EngineData: 8 EEC1
    @@ -502,16 +478,16 @@ Frame definition
  • transmitter ECU

  • -

    +

    Frame validation and parse errors

    BO_ definitions require a decimal CAN ID, a nonempty single-token frame name, a colon, a decimal payload length, and a transmitter token. Spaces or tabs may separate fields, and whitespace before the colon is accepted. Additional trailing fields are rejected.

    Numeric fields must contain decimal digits only; signs, hexadecimal notation, fractional values, suffixes, and overflow are rejected. CAN IDs may contain the 29-bit identifier plus the optional DBC extended flag (bit 31). Bits 29 and 30 are rejected rather than silently discarded. For compatibility, unflagged IDs above 0x7FF are still treated as extended.

    The payload length must fit uint8_t (0..255). This is a storage-range check, not CAN or CAN FD protocol validation; no new 8-byte or 64-byte limit is imposed.

    Parsing stops at the first detected error. Exceptions raised while parsing a line are reported as std::runtime_error with the supplied file path and the one-based physical line number, including blank lines:

    example.dbc:3: Invalid CAN ID: invalid
    -

    This change validates frame definitions. Signal definitions are also validated as described below; comprehensive DBC grammar coverage is still planned. File-open errors contain the path but have no line number.

    +

    Frame and signal definitions are validated as described here; comprehensive DBC grammar coverage is still planned. File-open errors contain the path but have no line number.


    -

    +

    Signal definition

    Example:

    SG_ EngineSpeed : 0|16@1+ (0.125,0) [0|8000] "rpm" ECU1,ECU2
    @@ -530,15 +506,42 @@ Signal definition
  • receivers

  • -

    +

    Signal validation and parse errors

    SG_ statements are matched completely. Signal names must be nonempty and contain no whitespace. Spaces and tabs are accepted between syntax elements; byte order and signedness remain adjacent (@0+, @0-, @1+, or @1-). A quoted unit (which may be empty) and a nonempty comma-separated receiver list are required. Unexpected trailing fields are rejected.

    Start bits must be unsigned decimal integers fitting uint32_t; lengths must be within 1..64 bits. Signs, fractional values, numeric suffixes, and overflow are rejected for these fields. Every signal bit must fit within the frame's declared payload length, using Intel increasing bit positions or Motorola sawtooth traversal. This uses the stored payload length without introducing an additional CAN or CAN FD payload limit.

    Factor, offset, minimum, and maximum accept signed decimal numbers, fractions, and scientific notation. The entire numeric token must be valid; hexadecimal numbers, NaN, infinity, conversion overflow, and conversion underflow are rejected. Minimum must not exceed maximum. Zero and negative factors are allowed.

    -

    Multiplexing markers (M, mN, and combinations) are currently rejected rather than interpreted as part of a signal name. Multiplexing support and duplicate frame/signal detection remain separate work.

    +

    Basic multiplexing markers M and mN are supported as described below. Overlapping signals are rejected unless their branch values differ. Duplicate frame/signal name detection remains separate work.

    Invalid signal definitions stop parsing with path:line: description, including when the signal exceeds the declared payload length.


    -

    +

    +Basic multiplexing

    +
    BO_ 256 Status: 3 ECU
    +
    SG_ Mode M : 0|8@1+ (1,0) [0|255] "" ECU
    +
    SG_ Temperature m1 : 8|8@1- (1,0) [-128|127] "C" ECU
    +
    SG_ Pressure m2 : 8|8@1+ (2,0) [0|510] "kPa" ECU
    +
    SG_ Counter : 16|8@1+ (1,0) [0|255] "" ECU
    +

    SignalInfo and DecodeSignal contain multiplexing: a MultiplexRole (Unconditional, Selector, or Branch) and an exact uint64_t branch value. Each frame may have one unsigned selector (M); a branch (mN) references that selector implicitly. The selector may appear after its branches. N must contain only decimal digits, fit uint64_t, and fit the selector's bit width. Leading zeros are accepted. A selector without branches is allowed. Signed selectors, missing selectors, multiple selectors, nested/combined markers, and extended SG_MUL_VAL_ statements are rejected with the originating path:line. The dispatcher registers the unsupported statement handler through TypeFactory.

    +

    Signal bits may overlap only between branches with different selector values. This validation uses Intel or Motorola bit traversal, including mixed byte orders. It also rejects overlapping unconditional signals. Metadata survives the runtime and tree builders; the optional Qt adapter does not add multiplexing roles yet.

    +

    The shared decoder extracts the selector before processing branches, compares its raw unsigned value, and leaves result order equal to definition order. Factor, offset, and VAL_ descriptions do not influence branch selection. Unconditional signals continue to decode. An unmapped selector value leaves all branches inactive.

    +

    Each result has SignalDecodeStatus status:

    + + + + + + + + + + + + + +
    Status Meaning
    Valid Raw and physical values are available; valid == true
    Inactive Selector is available and chooses another branch
    SelectorUnavailable Branch activation is unknown because selector bytes are missing
    InsufficientPayload Selected or unconditional signal bytes are missing
    InvalidDefinition Invalid bit length or missing/invalid selector in manually built runtime metadata
    +

    All statuses except Valid have valid == false; their numeric fields contain no decoded data and GetValueDescription() returns nullptr. Check status to distinguish inactive branches from errors. Consumers constructing runtime metadata manually must obey the same non-overlap rules as the parser. Extended and nested multiplexing are outside this stage and are explicitly rejected, rather than silently decoded as unconditional signals.

    +
    +

    Comments

    Frame comment example:

    CM_ BO_ 256 "Engine data frame";
    @@ -550,7 +553,7 @@ Comments
  • SignalInfo::comment

  • -

    +

    CAN ID Normalization

    The parser normalizes frame identifiers.

    Common DBC behavior:

    @@ -565,7 +568,7 @@ CAN ID Normalization

    This is important both for correct lookup and for future interoperability with live CAN APIs.


    -

    +

    PGN Extraction

    PGN is derived only when the frame is treated as extended.

    The current logic is simplified J1939 extraction:

    @@ -576,21 +579,22 @@ PGN Extraction

    This is enough for a practical start but should not be treated as full J1939 validation.


    -

    +

    Decode Flow

    Typical runtime decode flow:

    RawCanFrame
    ↓
    Find frame in DecodeDatabase
    ↓
    -
    For each signal:
    +
    Extract multiplexor selector first (when present)
    +
    For each unconditional or active signal:
    extract raw bits
    apply sign extension if needed
    convert to physical value
    ↓
    DecodedFrameValue

    -

    +

    Intel and Motorola Extraction

    The decoder currently has separate extraction paths:

    +Build UI tree

    DbcTreeBuilder treeBuilder;
    std::unique_ptr<TreeNode> root = treeBuilder.Build(database);
    Builds a simple tree from parsed DBC database.
    std::unique_ptr< TreeNode > Build(const DbcDatabase &database) const
    Build tree representation of parsed DBC data.
    -

    -Build runtime decode database

    +

    +Build runtime decode database

    DbcDecodeBuilder decodeBuilder;
    DecodeDatabase decodeDatabase = decodeBuilder.Build(database);
    Converts parsed DBC data into runtime decode database.
    DecodeDatabase Build(const DbcDatabase &source) const
    Build runtime decode database.
    -
    Runtime decode database with fast lookup by CAN ID.
    -

    -Decode a raw frame

    +
    Runtime decode database with fast lookup by CAN ID.
    +

    +Decode a raw frame

    RawCanFrame rawFrame;
    -
    rawFrame.canId = 0x123;
    +
    rawFrame.canId = 256; // EngineData from the DBC example above
    rawFrame.isExtended = false;
    -
    rawFrame.data = {0x01, 0x02, 0x03, 0x04};
    +
    rawFrame.data = {0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
    DbcDecoder decoder;
    DecodedFrameValue decoded = decoder.Decode(decodeDatabase, rawFrame);
    -
    Runtime CAN decoder using prebuilt decode database.
    Definition dbc_decoder.h:64
    +
    Runtime CAN decoder using prebuilt decode database.
    Definition dbc_decoder.h:72
    DecodedFrameValue Decode(const DecodeDatabase &database, const RawCanFrame &frame) const
    Decode one raw CAN frame.
    -
    Fully decoded frame.
    Definition dbc_decoder.h:51
    +
    Fully decoded frame.
    Definition dbc_decoder.h:61
    Raw CAN frame used for runtime or trace decoding.
    Definition dbc_decoder.h:24
    std::vector< std::uint8_t > data
    Definition dbc_decoder.h:27
    std::uint32_t canId
    Definition dbc_decoder.h:25
    bool isExtended
    Definition dbc_decoder.h:26

    -

    +

    Unified Decode Strategy

    A key design goal is that the same decoder should work for both:

      @@ -648,7 +661,7 @@ Unified Decode Strategy
    • trace replay frames

    That means this architecture supports:

    -

    +

    live path

    live CAN input
    ↓
    @@ -657,7 +670,7 @@ live path
    DbcDecoder
    ↓
    decoded signal values
    -

    +

    trace path

    trace reader
    ↓
    @@ -668,7 +681,7 @@ trace path
    decoded signal values

    This avoids duplicating decode logic in two separate parts of the application.


    -

    +

    Intended Use in FrameTap

    This module is meant to support at least the following FrameTap workflows:

      @@ -694,7 +707,7 @@ Intended Use in FrameTap
      - live frames
      - trace replay

      -

      +

      Why the Tree Is Not Enough

      The tree exists for browsing.

      However, runtime decode should not rely on tree traversal because that would introduce unnecessary coupling and inefficiency.

      @@ -706,7 +719,7 @@ Why the Tree Is Not Enough

    That is why DecodeDatabase is a separate layer.


    -

    +

    Statement Handler Factory

    DbcParser owns file reading, trimming, line numbers, and error reporting. Each ParseFile() call creates a fresh DbcParseContext and a DbcStatementDispatcher. The context contains the parsed database and current frame; handlers receive it by reference and retain no parsing state.

    The dispatcher uses TypeFactory<std::string, DbcStatementHandler> to create registered handlers once per parsing session, then reuses them for all matching lines:

    @@ -714,127 +727,421 @@ Statement Handler Factory
  • BO_ → DbcFrameHandler
  • SG_ → DbcSignalHandler
  • CM_ → DbcCommentHandler
  • +
  • VAL_ → DbcValueDescriptionHandler
  • +
  • SG_MUL_VAL_ → DbcUnsupportedMultiplexingHandler
  • -

    Grammar implementations live in dbc_statement_handler.cpp; their interface, context, and dispatcher live in dbc_statement_handler.h. typefactory.h provides the generic registry and object creation.

    +

    Grammar implementations live in core/dbc_statement_handler.cpp; their interface, context, and dispatcher live in core/dbc_statement_handler.h. core/typefactory.h provides the generic registry and object creation.

    To add a construct, implement a default-constructible handler deriving from DbcStatementHandler with:

    void Handle(const std::string &line, DbcParseContext &context) const override;
    - +

    Register it in the dispatcher constructor:

    -
    RegisterType<DbcValueHandler>("VAL_"); // after implementing DbcValueHandler
    -

    Registration creates one handler; replacing a registration replaces that instance. Register during initialization before dispatching. A line is routed using its full first whitespace-delimited keyword, so BO_TX_BU_ cannot match BO_. Unregistered keywords remain ignored. SG_ accepts spaces and tabs after its keyword; CM_ retains its existing policy requiring a literal space.

    +
    RegisterType<MyCustomHandler>("CUSTOM_"); // after implementing MyCustomHandler
    +

    Registration creates one handler; replacing a registration replaces that instance. Register during initialization before dispatching. A line is routed using its full first whitespace-delimited keyword, so BO_TX_BU_ cannot match BO_. Unregistered keywords remain ignored. SG_ and CM_ accept spaces and tabs after their keywords.

    This factory handles statements inside DBC files. A separate format-level factory can be introduced when another file format is implemented. The decoder and database builders remain independent of statement dispatch.


    -

    -Current Limitations

    -

    This is still a minimal implementation.

    -

    Not supported yet:

    -
      -
    • multiplexed signals
    • -
    • VAL_ tables
    • -
    • BA_ attributes
    • -
    • BA_DEF_ definitions
    • -
    • advanced comment handling
    • -
    • full DBC grammar coverage
    • -
    • full J1939 validation
    • -
    • extensive edge-case handling for unusual DBC formatting
    • -
    -

    Motorola extraction is implemented, but it should still be verified carefully against real-world DBC files and expected values.

    -
    -

    -Recommended Next Steps

    -

    A practical development order would be:

    -

    -Stage 1 - already implemented

    -
      -
    • BO_
    • -
    • SG_
    • -
    • CM_
    • -
    • normalized CAN ID
    • -
    • isExtended
    • -
    • transmitter
    • -
    • receivers
    • -
    • comments
    • -
    • tree representation
    • -
    • runtime decode database
    • -
    • runtime decoder
    • -
    -

    -Stage 2

    -

    Recommended additions:

    -
      -
    • parent pointer in TreeNode
    • -
    • Qt model adapter
    • -
    • VAL_ support for enum-style signals
    • -
    • better display strings for UI
    • -
    • selective decoding of only chosen signals
    • -
    -

    -Stage 3

    -

    Recommended additions:

    -
      -
    • multiplexing support
    • -
    • attribute parsing
    • -
    • richer J1939 support
    • -
    • CSV export of decoded traces
    • -
    • optimized filtering and signal selection
    • -
    -

    -Stage 4

    -

    Advanced functionality:

    -
      -
    • live plot integration
    • -
    • signal subscriptions
    • -
    • per-signal trace decode pipelines
    • -
    • decoder-assisted export formats
    • -
    -
    -

    -Build Integration

    -

    The module does not depend on any specific build system.

    -

    It can be integrated with:

    -
      -
    • CMake
    • -
    • qmake
    • -
    • Makefile
    • -
    -

    Open dbc.pro in Qt Creator to see two subprojects: core and tests. core/core.pro builds the C++17 static library dbc_core without a Qt dependency. tests/tests.pro builds the QtTest executable dbc_tests and links that library. The root project declares tests.depends = core for parallel builds.

    -

    Build out of source (Qt 6; use qmake for Qt 5):

    -
    mkdir build
    -
    cd build
    -
    qmake6 ../dbc.pro
    +

    +Signal value descriptions (<tt>VAL_</tt>)

    +

    Signal descriptions attach text to exact raw integer values:

    +
    BO_ 256 Status: 8 ECU
    +
    SG_ State : 0|8@1+ (1,0) [0|255] "" ECU
    +
    VAL_ 256 State 0 "Off" 1 "On" 2 "Error";
    +

    Each statement must occupy one physical line, contain at least one integer/text pair, and end with a semicolon. Spaces and tabs are accepted between fields; descriptions may contain whitespace, semicolons, and empty text. Inside quoted text, \"</tt> and <tt>\\\\</tt> represent a quote and a backslash; other escapes are rejected. +Keys are decimal integers in <tt>INT64_MIN..UINT64_MAX</tt>, with an optional minus +sign; plus signs, fractions, hexadecimal numbers, exponents, and overflow are +rejected. Keys never pass through <tt>double</tt>. + +<tt>VAL_</tt> may appear before or after its frame and signal declarations. References +are resolved after reading the file using the same CAN ID normalization as +<tt>BO_</tt>, including bit 31 for extended identifiers. Standard and extended frames +with the same normalized ID remain distinct. Missing or ambiguous references, +malformed statements, and duplicate integer keys produce <tt>path:line: description</tt> +errors at the originating <tt>VAL_</tt> line. Distinct keys from multiple statements +are merged; <tt>0</tt>, <tt>00</tt>, and <tt>-0</tt> are the same key. Keys need not fit the referenced +signal's bit width or signedness; unreachable keys simply cannot match a decode. + +Mappings are available as <tt>SignalInfo::valueDescriptions</tt> and +<tt>DecodeSignal::valueDescriptions</tt>, and survive both database builders, including +<tt>TreeNode::GetSignal()</tt>. Consumers can look up a decoded result directly: + +@icode{cpp} +const DecodedSignalValue &value = decodedFrame.signals.at(0); +if (const std::string *description = value.GetValueDescription()) { + std::cout << *description; +} +@endicode + +<tt>GetValueDescription()</tt> uses the exact raw integer before factor/offset scaling. +It returns <tt>nullptr</tt> for an invalid decode or an unknown value; numeric decoding +and <tt>physicalValue</tt> are unchanged. A mapped empty string returns a non-null +pointer. The pointer belongs to the signal definition and stays valid while that +definition and mapping remain alive and unchanged. + +For metadata or standalone raw values, use +<tt>FindValueDescription(signal.valueDescriptions, rawValue)</tt>, where <tt>rawValue</tt> is +<tt>RawSignalValue</tt> (<tt>std::variant\<std::int64_t, std::uint64_t\></tt>). The helper matches +nonnegative signed and unsigned values identically and keeps negative values +distinct from large unsigned values. Stored keys use negative <tt>int64_t</tt> and +nonnegative <tt>uint64_t</tt>; when constructing mappings manually, normalize keys +with <tt>NormalizeValueKey()</tt> before insertion. + +Named <tt>VAL_TABLE_</tt> tables, environment-variable mappings, multiline statements, +are outside this implementation; the optional Qt adapter exposes signal mappings. + +<hr> + +@section autotoc_md108 Current Limitations + +This is still a minimal implementation. + +Not supported yet: + +- extended and nested multiplexing (<tt>SG_MUL_VAL_</tt>, <tt>mNM</tt>) +- named <tt>VAL_TABLE_</tt> tables and environment-variable value descriptions +- <tt>BA_</tt> attributes +- <tt>BA_DEF_</tt> definitions +- advanced comment handling +- full DBC grammar coverage +- full J1939 validation +- extensive edge-case handling for unusual DBC formatting + +Additional behavior to account for: + +- unregistered DBC keywords are ignored +- an <tt>SG_</tt> statement before the first frame is rejected +- duplicate frame keys (normalized CAN ID and frame type) and repeated signal + names within a frame are rejected at their definition lines; manually created + databases are also checked for ambiguous <tt>VAL_</tt> references during resolution +- payload lengths are checked against storage bounds (<tt>0..255</tt>), rather than + CAN or CAN FD protocol limits +- comment handling is limited to the supported forms and already parsed targets + +Motorola extraction uses DBC sawtooth numbering: a start bit of 7 traverses +<tt>7..0, 15..8, 23..16</tt>. Regression tests cover aligned and unaligned signals, +byte boundaries, and 64-bit values. + +<hr> + +@section autotoc_md110 Recommended Next Steps + +A practical development order would be: + +@subsection autotoc_md111 Stage 1 - already implemented + +- <tt>BO_</tt> +- <tt>SG_</tt> +- <tt>CM_</tt> +- <tt>VAL_</tt> signal value descriptions +- normalized CAN ID +- <tt>isExtended</tt> +- transmitter +- receivers +- comments +- tree representation +- runtime decode database +- runtime decoder + +@subsection autotoc_md112 Stage 2 + +Recommended additions: + +- selective decoding of only chosen signals + +@subsection autotoc_md113 Stage 3 + +Recommended additions: + +- basic multiplexing (implemented) +- attribute parsing +- richer J1939 support +- CSV export of decoded traces +- optimized filtering and signal selection + +@subsection autotoc_md114 Stage 4 + +Advanced functionality: + +- live plot integration +- signal subscriptions +- per-signal trace decode pipelines +- decoder-assisted export formats + +<hr> + +@section autotoc_md116 Build Integration + +The repository supplies qmake projects. A C++17 compiler is required; the root +build also requires Qt Core and Qt Test development packages. Other build +systems can compile the sources listed in <tt>core/core_files.pri</tt>; no CMake +configuration is currently provided. + +Qt-dependent qmake targets share <tt>qt/qt_version.pri</tt>, which rejects Qt versions +other than 6.8.2. The core library remains independent of Qt libraries. + +Open <tt>dbc.pro</tt> in Qt Creator to see two subprojects: <tt>core</tt> and <tt>tests</tt>. +<tt>core/core.pro</tt> builds the C++17 static library <tt>dbc_core</tt> without a Qt dependency. +<tt>tests/tests.pro</tt> builds the QtTest executable <tt>dbc_tests</tt> and links that library. +The root project declares <tt>tests.depends = core</tt> for parallel builds. + +Build out of source with Qt 6.8.2: + +@icode{sh} +mkdir build +cd build +qmake6 ../dbc.pro +make -j +make check +@endicode + +<tt>core/core_files.pri</tt> lists the library sources and headers. +Consumers include <tt>core/core.pri</tt> for include paths and library linkage; the test +source lists live in <tt>tests/parser_tests.pri</tt> and <tt>tests/decoder_tests.pri</tt>. +When building a consumer separately, pass +<tt>DBC_CORE_BUILD_DIR=/absolute/path/to/build/core</tt> to qmake. + +@subsection autotoc_md117 Build core without Qt libraries + +From the repository root: + +@icode{sh} +mkdir -p build/core +cd build/core +qmake6 ../../core/core.pro +make -j +@endicode + +qmake is still the build tool; this target does not link Qt libraries. + +@subsection autotoc_md118 Optional Qt model adapter + +The adapter and its <tt>QAbstractItemModelTester</tt> suite use Qt 6.8.2. +The adapter itself links only Qt Core. + +The model test executable additionally links QtGui and uses QGuiApplication so +QAbstractItemModelTester can resolve graphical metatypes such as QPixmap. It +defaults to the <tt>offscreen</tt> platform when <tt>QT_QPA_PLATFORM</tt> is unset or empty; +no display server is required. An explicit platform setting is preserved. + +Enable its library and focused QtTest suite: + +@icode{sh} +mkdir -p build-qt +cd build-qt +qmake6 ../dbc.pro CONFIG+=dbc_qt +make -j +make check +@endicode + +Consumers include <tt>qt/qt.pri</tt> instead of <tt>core/core.pri</tt>, and set +<tt>DBC_CORE_BUILD_DIR</tt> and <tt>DBC_QT_BUILD_DIR</tt> to the corresponding library build +directories when building separately. A widget application also needs <tt>QT += widgets</tt>. The adapter integration enables +<tt>no_keywords</tt>, because core metadata has a <tt>signals</tt> member; use <tt>Q_SIGNALS</tt>, +<tt>Q_SLOTS</tt>, and <tt>Q_EMIT</tt> in consuming Qt classes. + +@icode{cpp} +#include "dbc_parser.h" +#include "dbc_tree_builder.h" +#include "dbc_tree_model.h" +#include <QTreeView> + +// Run after constructing QApplication; view owns the model through QObject. +QTreeView view; +DbcTreeModel *model = new DbcTreeModel(&view); +model->SetTree(DbcTreeBuilder().Build(DbcParser().ParseFile("example.dbc"))); +view.setModel(model); +view.expandAll(); +view.show(); +// On reload, pass a newly built tree to SetTree(); to clear: +// model->SetTree(nullptr); +@endicode + +The root is invisible: frames are top-level rows, signals are their children. +Only column zero has children. <tt>parent()</tt> always returns column zero. +The model takes exclusive ownership of the tree; do not retain mutable aliases. +Metadata is copied by the tree builder, so the parsed database may be destroyed. +<tt>TreeNode::GetParent()</tt> is non-owning and <tt>GetRow()</tt> gives the zero-based sibling +position (zero for a detached node/root). Nodes cannot be copied or moved; +transferring their <tt>unique_ptr</tt> ownership preserves addresses and navigation. + +Call <tt>SetTree()</tt> on the model's thread. It accepts a detached Root or nullptr, +uses <tt>beginResetModel()</tt>/<tt>endResetModel()</tt>, and destroys the previous tree during +reset. All ordinary QModelIndex values expire on reset and must not be reused; +QPersistentModelIndex values are invalidated by Qt. Destroying the model also +invalidates indexes. Invalid and foreign indexes return no data/flags/children. +Valid items are enabled and selectable, with no editing support. + +<table class="markdownTable"> + <tr class="markdownTableHead"> <th class="markdownTableHeadNone"> Column (zero-based enum)

    +

    Frame display

    +

    Signal display

    +

    +

    0 Name

    +

    Name

    +

    Name

    +

    +

    1 CanId

    +

    Normalized hexadecimal ID

    +

    Empty

    +

    +

    2 PayloadLength

    +

    Bytes

    +

    Empty

    +

    +

    3 StartBit

    +

    Empty

    +

    DBC start bit

    +

    +

    4 BitLength

    +

    Empty

    +

    Bit count

    +

    +

    5 ByteOrder

    +

    Empty

    +

    Intel / Motorola

    +

    +

    6 Signed

    +

    Empty

    +

    Signed / Unsigned

    +

    +

    7 Unit

    +

    Empty

    +

    Unit

    +

    +

    8 Comment

    +

    Comment

    +

    Comment

    +

    +

    Horizontal DisplayRole headers describe these columns; other header requests return invalid QVariant. ToolTipRole returns the comment on every column. Custom roles also apply on every column; inapplicable roles return invalid QVariant:

    +

    + + + + + + + + + + + + + + + + +
    Role Node types QVariant content
    NodeTypeRole Frame, signal int corresponding to NodeType
    CanIdRole, PayloadLengthRole, ExtendedRole Frame uint, int, bool
    StartBitRole, BitLengthRole Signal uint
    LittleEndianRole, SignedRole Signal bool
    UnitRole Signal QString
    CommentRole Frame, signal QString
    ValueDescriptionsRole Signal QVariantList of QVariantMap entries
    +

    +

    Each value-description entry contains value (qlonglong for negative keys, qulonglong for nonnegative keys) and description (QString). This preserves the full signed/unsigned 64-bit range without converting through double. An unmapped signal returns an empty list. Data comes from SignalInfo::valueDescriptions. Unsupported roles return invalid QVariant.

    +

    +

    +Standalone tree tests without Qt

    +

    +

    From the repository root, use only a C++17 compiler:

    +

    c++ -std=c++17 -Icore tests/tree_node_test.cpp core/tree_node.cpp \
    +
    core/dbc_tree_builder.cpp -o /tmp/dbc_tree_node_test
    +
    /tmp/dbc_tree_node_test
    +

    +

    +

    +Build and run the demo

    +

    +

    After building core, run these commands from the repository root:

    +

    mkdir -p build/examples
    +
    cd build/examples
    +
    qmake6 ../../examples/demo.pro DBC_CORE_BUILD_DIR=../core
    make -j
    -
    make check
    -

    core/core_files.pri lists the library sources and headers. Consumers include core/core.pri for include paths and library linkage; the test source lists live in tests/parser_tests.pri and tests/decoder_tests.pri. When building a consumer separately, pass DBC_CORE_BUILD_DIR=/absolute/path/to/build/core to qmake.

    -

    The former demonstration program is preserved in examples/main.cpp with examples/demo.pro. Build it separately after building core, using that same DBC_CORE_BUILD_DIR option; run dbc_demo <file.dbc>.

    -
    -

    -Summary

    -

    This module is now split into two intentionally separate layers:

    -

    -Parsed representation

    -

    Used for:

    -
      -
    • storing parsed DBC content
    • -
    • browsing
    • -
    • UI tree generation
    • -
    -

    -Runtime decode representation

    -

    Used for:

    -
      -
    • fast frame lookup
    • -
    • live CAN decode
    • -
    • trace decode
    • -
    • physical value conversion
    • -
    -

    That separation is the main architectural improvement.

    -

    In short, the system now looks like this:

    -
    DBC parser → DbcDatabase → DecodeDatabase → DbcDecoder
    -
    ↘ TreeNode → future UI
    -

    This gives FrameTap a much better foundation for real use, because both browsing and decoding are supported without forcing one representation to do the other's job.

    -

    +
    ./dbc_demo /absolute/path/to/example.dbc
    +

    +

    The demo prints the parsed tree and decodes eight zero bytes using the first frame definition. Replace that sample payload in examples/main.cpp to feed live CAN data or trace records.

    +

    +

    +Generate API documentation

    +

    +

    With Doxygen installed, run from the repository root:

    +

    doxygen Doxyfile
    +

    +

    Open docs/html/index.html to view the generated reference.

    +


    +

    +

    +

    Regression tests

    -

    See tests/README.md for QtTest build and execution commands. Tests cover frame validation and error locations, Intel and Motorola extraction, signed and unsigned 64-bit boundaries, physical conversion, numeric output, and invalid signal payloads.

    +

    +

    See tests/README.md for QtTest build and execution commands. Tests cover frame validation and error locations, Intel and Motorola extraction, signal syntax and payload bounds, VAL_ syntax and reference validation, raw description lookup and preservation through both builders, statement dispatch, signed and unsigned 64-bit boundaries, physical conversion, numeric output, and invalid signal payloads.

    +

    +

    +Measuring code coverage

    +

    +

    Coverage instrumentation is separate from the QtTest suite named CoverageTest: that suite runs extra regression checks, but coverage counters require a specially instrumented build. Use a separate build directory for each coverage tool.

    +

    +

    +GCC, gcov, and LCOV on Debian/Ubuntu

    +

    +

    Install the build and report tools:

    +

    sudo apt install build-essential qt6-base-dev qt6-base-dev-tools qmake6 lcov
    +
    # Optional IDE:
    +
    sudo apt install qtcreator
    +

    +

    GCC supplies gcov; the lcov package supplies lcov and genhtml. Use the gcov version matching the GCC used by the selected Qt Creator kit. These instructions use GCC and Qt 6.8.2.

    +

    From the repository root, create a fresh coverage build. --coverage must be passed to both compilation and linking; Debug avoids optimization that can make source-level results harder to interpret. -fprofile-abs-path makes source paths in the coverage data independent of the compilation working directory.

    +

    DBC_SOURCE_DIR="$(pwd)"
    +
    mkdir -p build-coverage
    +
    cd build-coverage
    +
    +
    qmake6 "$DBC_SOURCE_DIR/dbc.pro" \
    +
    CONFIG+=dbc_qt CONFIG+=debug CONFIG-=release \
    +
    'QMAKE_CXXFLAGS+=--coverage -fprofile-abs-path' \
    +
    'QMAKE_LFLAGS+=--coverage'
    +
    make -j4
    +
    +
    # The standalone tree test is not a qmake target; instrument it separately.
    +
    mkdir -p standalone
    +
    c++ -std=c++17 -O0 -g --coverage -fprofile-abs-path \
    +
    -I"$DBC_SOURCE_DIR/core" \
    +
    "$DBC_SOURCE_DIR/tests/tree_node_test.cpp" \
    +
    "$DBC_SOURCE_DIR/core/tree_node.cpp" \
    +
    "$DBC_SOURCE_DIR/core/dbc_tree_builder.cpp" \
    +
    -o standalone/tree_node_tests
    +
    +
    # Capture a zero-count baseline so unexecuted compiled code remains in the report.
    +
    lcov --capture --initial --directory . --branch-coverage \
    +
    --include "$DBC_SOURCE_DIR/core/*" --include "$DBC_SOURCE_DIR/qt/*" \
    +
    --output-file baseline.info
    +
    +
    # Reset counts before each new measurement; otherwise executions accumulate.
    +
    lcov --zerocounters --directory .
    +
    make check
    +
    ./standalone/tree_node_tests
    +
    +
    lcov --capture --directory . --branch-coverage \
    +
    --include "$DBC_SOURCE_DIR/core/*" --include "$DBC_SOURCE_DIR/qt/*" \
    +
    --output-file executed.info
    +
    lcov --add-tracefile baseline.info --add-tracefile executed.info \
    +
    --branch-coverage --output-file coverage.info
    +
    +
    genhtml coverage.info --branch-coverage --demangle-cpp --output-directory html
    +
    lcov --summary coverage.info --branch-coverage
    +

    +

    Open build-coverage/html/index.html in a browser. The report includes the library's core/ and qt/ sources and instantiated header code; test sources, generated moc files, and Qt/STL headers are excluded. Click a filename to inspect execution counts, uncovered lines, and branch outcomes. Branch coverage is a separate metric: executing a line does not necessarily exercise every outcome. C++ branch data can also include compiler-generated exception paths.

    +

    For another run with unchanged sources, repeat the reset, test execution, capture, merge, and HTML generation steps. After changing sources or compiler flags, rebuild and regenerate baseline.info before measuring again. A fresh build directory avoids mixing old profiling data with a different build.

    +

    An initial measurement with GCC 14.2 and Qt 6.8.2 on 2026-10-07, including both QtTest executables and the standalone tree test, yielded 97.8% line coverage (724/740) and 70.7% branch coverage (833/1178). These are a snapshot, not fixed expected values for later changes or other toolchains.

    +

    After adding direct comment-handler and ambiguous VAL_ reference tests, the same configuration measured 98.4% line coverage (728/740) and 71.4% branch coverage (841/1178).

    +

    See GCC instrumentation options and the LCOV project documentation.

    +

    +

    +Configure the GCC coverage build in Qt Creator

    +

    +

      +
    1. Open dbc.pro and select a GCC kit with Qt 6.8.2.
    2. +
    3. In Projects > Build Settings, clone Debug as Coverage.
    4. +
    5. Choose a separate build directory, such as build-coverage.
    6. +
    7. Expand the qmake build step and add these Additional arguments:

      +
      CONFIG+=dbc_qt CONFIG+=debug CONFIG-=release "QMAKE_CXXFLAGS+=--coverage -fprofile-abs-path" "QMAKE_LFLAGS+=--coverage"
      +
    8. +
    9. Run qmake and build the project. Both dbc_tests and dbc_model_tests must run to include coverage from the core and optional model adapter.
    10. +
    11. In a terminal in the coverage build directory, compile the standalone test and run the LCOV/report commands above. Set DBC_SOURCE_DIR to the absolute repository path if using a new terminal. make check runs both QtTest executables; the standalone tree executable must be run separately.
    12. +
    13. View html/index.html in a browser. This workflow produces HTML reports; it does not require a licensed coverage toolchain.
    14. +
    +

    diff --git a/docs/html/md_changelog.html b/docs/html/md_changelog.html new file mode 100644 index 0000000..6e4dd0d --- /dev/null +++ b/docs/html/md_changelog.html @@ -0,0 +1,209 @@ + + + + + + + +DBC Framework: Changelog + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    DBC Framework +
    +
    DBC parsing and CAN signal decoding framework
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Changelog
    +
    +
    +

    This changelog summarizes release and development history. Entries are listed newest first. Historical dates follow the commit author dates. v1.0 is the existing Git tag; subsequent changes are listed as unreleased.

    +

    +Unreleased

    +

    +2026-10-07

    +

    +Added

    +
      +
    • Added regression coverage for signed bit-length boundaries, deterministic Intel/Motorola extraction, lookup failures, runtime validation, PGN, comments, file formatting, metadata copying/lifetime, and TypeFactory behavior.
    • +
    • Added direct-handler and resolver tests for unsupported comments and ambiguous VAL_ references in manually constructed databases.
    • +
    • Documented GCC/gcov/LCOV instrumentation, Qt Creator setup, and HTML reports. Coverage after the added tests: 98.4% of lines and 71.4% of branches with GCC 14.2 and Qt 6.8.2, including the standalone tree test.
    • +
    • Basic M / mN multiplexing metadata in parsed, tree, and runtime definitions.
    • +
    • Deferred selector and overlap validation with source locations: one unsigned selector, representable branch values, and overlaps only between exclusive branches.
    • +
    • Selector-first decoding using exact raw values, preserving definition order and unconditional signals. Explicit statuses distinguish inactive branches, missing selector data, insufficient payloads, and malformed runtime metadata.
    • +
    • Registered SG_MUL_VAL_ rejection through TypeFactory; extended and nested multiplexing remain unsupported. Added parser/decoder regression coverage and documented supported syntax and consumer behavior.
    • +
    +

    +Changed

    +
      +
    • Qt-dependent targets now require the installed Qt 6.8.2 through a shared qmake version check; removed Qt 5 compatibility instructions. Core remains Qt-free.
    • +
    • Used explicit local types in the additional coverage and model tests. Functions retain explicit return types, and runtime handler selection uses TypeFactory without lambdas or extra factory layers for concrete objects.
    • +
    • Coverage documentation now describes the selected open GCC/LCOV toolchain.
    • +
    • Overlapping unconditional signals are now rejected during parsing.
    • +
    +

    +Fixed

    +
      +
    • Linked QtGui only in the optional model tests and used QGuiApplication with an offscreen default, resolving the QAbstractItemModelTester invalid QPixmap metatype warning without adding QtGui to the adapter library.
    • +
    • Accepted tabs after CM_ by using the comment parser's keyword extraction instead of requiring a literal-space prefix.
    • +
    • Removed test compiler warnings by using QVERIFY_THROWS_EXCEPTION and explicitly discarding nodiscard return values in exception checks.
    • +
    • Reject duplicate frames by normalized CAN ID and frame type, including equivalent extended ID encodings, and duplicate signal names within a frame. Errors report the file path and line of the repeated definition. Standard and extended frames may share a numeric ID; separate frames may reuse signal names. Added regression coverage and updated parser documentation.
    • +
    +

    +2026-10-06

    +

    +Added

    +
      +
    • Added non-owning TreeNode parent navigation and stable sibling positions; disabled node moves to preserve links while retaining unique_ptr ownership.
    • +
    • Added optional read-only Qt Core DbcTreeModel with documented columns and metadata roles, exact VAL_ entries, exclusive tree ownership, and reset-based reload/clear support. Core remains independent of Qt.
    • +
    • Added QAbstractItemModelTester coverage, navigation/metadata/reset tests, a standalone Qt-free tree test, and adapter build and usage documentation.
    • +
    • Added VAL_ signal value descriptions through the statement dispatcher and factory, with complete syntax validation, exact signed/unsigned 64-bit keys, deferred reference resolution, duplicate detection, and source error locations. Distinct keys from multiple statements merge; standard and extended frames remain distinct under existing CAN ID normalization.
    • +
    • Preserved descriptions in parsed metadata, runtime decode definitions, and UI tree metadata. Added DecodedSignalValue::GetValueDescription() and FindValueDescription() for raw integer lookup before physical scaling. Unknown values retain normal numeric decoding.
    • +
    • Added regression coverage for syntax, quoting, whitespace, integer boundaries, declaration order, invalid references, duplicates, scaling, and both builders; documented syntax, lookup behavior, and limitations in README.
    • +
    +

    +2026-10-05

    +

    +Changed

    +
      +
    • Split the qmake project into a reusable static library in core/, a demo in examples/, and a combined regression test executable in tests/. Added shared .pri files and updated build instructions. (f17ddb6, #11)
    • +
    • Added .clang-format and applied consistent formatting to the source code and tests. (b91cf4a, #7)
    • +
    • Replaced lambdas with explicit functions and simpler code in statement handlers, the decoder, the demo, and regression tests. (03dc8f2)
    • +
    +

    +Fixed

    +
      +
    • Added complete validation of SG_ signal statements, including syntax, receivers, numeric fields, lengths of 1–64 bits, physical ranges, and signal bounds within the declared frame payload for Intel and Motorola bit order. Invalid definitions report the file path and line number. Multiplexing markers are explicitly rejected. Added regression tests and documentation. (8d82b13, #6)
    • +
    +

    +Documentation and maintenance

    +
      +
    • Regenerated Doxygen documentation after code changes and the project restructuring. (6cd9976, 0067cb4, f17ddb6)
    • +
    • Removed the temporary signal-validation issue document. (1163277)
    • +
    +

    +2026-10-01

    +

    +Changed

    +
      +
    • Moved DBC statement parsing into TypeFactory-registered handlers for BO_, SG_, and CM_, with a shared parse context and keyword dispatcher. Added tests for dispatch and handler replacement, and documented how to register additional handlers. (88b5883, #4)
    • +
    • API change: DecodedSignalValue::rawValue now uses std::variant<std::int64_t, std::uint64_t> instead of int64_t. Consumers must handle the appropriate variant alternative. Physical values remain double and may lose precision for large integers. (69074e3, #2)
    • +
    +

    +Fixed

    +
      +
    • Corrected Motorola signal extraction within bytes and across byte boundaries using DBC sawtooth bit numbering. Added decoder regression tests and build instructions; introduced the TypeFactory utility. (2c057b6)
    • +
    • Preserved the full unsigned 64-bit raw-value range, including values above INT64_MAX, and updated physical conversion and demo output. Added tests for signed and unsigned boundaries and numeric output. (69074e3, #2)
    • +
    • Validated BO_ frame syntax, CAN identifiers, payload lengths, numeric overflow, and unexpected trailing fields. Parsing errors now include the file path and physical line number. Added parser regression tests. (3bd9339, #3)
    • +
    +

    +v1.0 — 2026-06-14

    +

    Tag v1.0 points to 38ce043 and includes the initial implementation below.

    +

    +Documentation

    +
      +
    • Added source-file headers with author information and MIT license references. (e2ffa97)
    • +
    • Added and subsequently simplified the Doxygen configuration. (e2c07dd, 4c8af9f)
    • +
    • Generated API documentation and refreshed the generated documentation. (dfec39d, 38ce043)
    • +
    +

    +Initial implementation — 2026-03-13

    +

    +Added

    +
      +
    • Initialized the repository with a README and MIT license. (4270459)
    • +
    • Added the DBC parser, frame and signal metadata, a tree representation and builder, a demonstration program, and a qmake project. (2a90b2d)
    • +
    • Added runtime decoding through DbcDecodeBuilder, DecodeDatabase, and DbcDecoder, including CAN-frame lookup, Intel and Motorola extraction, signed and unsigned signals, and factor/offset conversion. Updated parser metadata and the demo to support decoding. (a53a5df)
    • +
    +

    +Documentation and maintenance

    +
      +
    • Added .gitignore and expanded the README with architecture, data structures, parsing behavior, decoding examples, and usage documentation. (efc57d6, f2aa10c, cb20f5f, f0e7065)
    • +
    +
    +
    +
    + + + + diff --git a/docs/html/md_tests_2README.html b/docs/html/md_tests_2README.html index b685c0b..4b7932e 100644 --- a/docs/html/md_tests_2README.html +++ b/docs/html/md_tests_2README.html @@ -93,14 +93,15 @@ $(document).ready(function(){initNavTree('md_tests_2README.html',''); initResiza
    QtTest regression tests
    -

    Open the repository's root dbc.pro in Qt Creator. It contains core (a static C++17 library) and tests (the dbc_tests QtTest executable). Core is built first; tests link its archive rather than compiling its implementation again. Qt Core and Qt Test development packages are required for tests only.

    -

    Build from the repository root with Qt 6 (use qmake for Qt 5):

    +

    For instrumented builds, LCOV HTML reports, and Qt Creator coverage configuration, see Measuring code coverage.

    +

    Open the repository's root dbc.pro in Qt Creator. It contains core (a static C++17 library) and tests (the dbc_tests QtTest executable). Core is built first; tests link its archive rather than compiling its implementation again. Qt Core and Qt Test development packages are required for tests only. The optional model tests also link QtGui, which is provided by Qt base development packages. The adapter library itself still links only QtCore.

    +

    Build from the repository root with the installed Qt 6.8.2:

    mkdir build
    cd build
    qmake6 ../dbc.pro
    make -j
    make check
    -

    Or run ./tests/dbc_tests directly. Both parser and decoder suites run, and the executable returns nonzero when either suite fails. Decoder cases appear as individual QtTest data rows; parser checks are grouped into named test slots. Checks also run in release builds.

    +

    Or run ./tests/dbc_tests directly. Parser, decoder, and additional coverage suites run, and the executable returns nonzero when any suite fails. Decoder cases appear as individual QtTest data rows; parser checks are grouped into named test slots. Checks also run in release builds.

    To build tests separately against an existing core build:

    mkdir /tmp/dbc-tests-build
    cd /tmp/dbc-tests-build
    @@ -108,14 +109,23 @@ $(document).ready(function(){initNavTree('md_tests_2README.html',''); initResiza
    DBC_CORE_BUILD_DIR=/absolute/path/to/build/core
    make
    make check
    -

    parser_tests.pri and decoder_tests.pri include the test sources. ../core/core.pri supplies the library include path and linkage.

    -

    +

    parser_tests.pri and decoder_tests.pri include the original test sources; tests.pro also includes dbc_coverage_test.cpp. ../core/core.pri supplies the library include path and linkage.

    +

    Decoder coverage

    Coverage includes Motorola bit numbering within and across bytes, unaligned signals, signed values, scaling, 64-bit extraction, signed/unsigned boundary values (including INT64_MIN, INT64_MAX, and UINT64_MAX), numeric output, invalid lengths, insufficient payloads, and Intel regression cases. Frame validity means the definition was found; insufficient payloads are checked through signal validity.

    -

    +

    Parser coverage

    -

    Parser tests cover standard and extended CAN IDs, whitespace, payload storage boundaries, missing fields, malformed and overflowing numbers, reserved ID bits, error paths and line numbers, and integration with signals and comments. Signal tests cover complete syntax and numeric validation, scientific notation, finite physical parameters and ordered ranges, spaces and tabs, receiver lists, unsupported multiplexing, and Intel/Motorola declared-payload boundaries. Temporary DBC fixtures are created in the system temporary directory and removed automatically.

    -

    Dispatch tests also verify exact keyword matching, handler construction and reuse, unknown statements, and independent parsing sessions, including recovery after errors.

    +

    Parser tests cover standard and extended CAN IDs, whitespace, payload storage boundaries, missing fields, malformed and overflowing numbers, reserved ID bits, error paths and line numbers, and integration with signals and comments. Duplicate definitions are rejected at their source lines, including equivalent extended ID encodings and repeated signal names within a frame. Standard and extended frames may share a numeric ID, and separate frames may reuse signal names. Signal tests cover complete syntax and numeric validation, scientific notation, finite physical parameters and ordered ranges, spaces and tabs, receiver lists, unsupported multiplexing, and Intel/Motorola declared-payload boundaries. Value-description tests cover full VAL_ syntax, whitespace, escaped quotes, empty text, exact integer boundaries, duplicate keys within and across statements, deferred and normalized frame references, missing targets, error locations, raw lookup with scaling, unknown/invalid values, and both database builders. Temporary DBC fixtures are created in the system temporary directory and removed automatically.

    +

    Dispatch tests also verify exact keyword matching, handler construction and reuse, unknown statements, and independent parsing sessions, including recovery after errors.

    +

    +Tree and optional model tests

    +

    tree_node_test.cpp is a standalone C++17 executable without Qt; see the root README for its compiler command. It checks parents, sibling positions, null children, bounds, and unique_ptr transfer.

    +

    Enable CONFIG+=dbc_qt in the root qmake invocation to build dbc_qt and dbc_model_tests alongside existing tests. Qt 6.8.2 is required. make check runs all suites. Model tests parse a temporary DBC fixture and use QAbstractItemModelTester, verify navigation across columns, invalid/foreign indexes, metadata and exact VAL_ integers, and persistent-index invalidation when reloading or clearing the tree. Their QGuiApplication registers graphical metatypes used by QAbstractItemModelTester, avoiding the invalid QPixmap type warning in Qt 6.8.2. The test executable defaults to QT_QPA_PLATFORM=offscreen when the variable is unset or empty, so no display server is needed. An explicit platform setting is preserved.

    +

    Basic multiplexing coverage includes selector declarations after branches, Intel/Motorola branch overlap, signed active values and VAL_ lookup, unconditional signals, inactive branches, missing selector/branch payloads, exact UINT64_MAX selector matching, malformed runtime selectors, source locations, and rejection of invalid markers, selector references/ranges, overlaps, and SG_MUL_VAL_.

    +

    +Additional regression coverage

    +

    dbc_coverage_test.cpp runs as part of dbc_tests. It covers signed boundaries below 64 bits, deterministic extraction comparisons for both byte orders across lengths 1–64, frame lookup failures, exact decode statuses, malformed runtime multiplexing, PGN boundaries, comment handling, file formatting, metadata copying and source lifetime, physical conversion, and TypeFactory registration/creation. Direct resolver tests construct ambiguous databases through the public metadata API, verify source locations, and check that ambiguous targets receive no values.

    +

    All QtTest targets use Qt 6.8.2 and QVERIFY_THROWS_EXCEPTION. Exception tests explicitly discard nodiscard results when only the exception is being checked. The standalone tree test requires only a C++17 compiler.

    diff --git a/docs/html/multiplexing_8h_source.html b/docs/html/multiplexing_8h_source.html new file mode 100644 index 0000000..33c87dc --- /dev/null +++ b/docs/html/multiplexing_8h_source.html @@ -0,0 +1,132 @@ + + + + + + + +DBC Framework: multiplexing.h Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    DBC Framework +
    +
    DBC parsing and CAN signal decoding framework
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    multiplexing.h
    +
    +
    +
    1// SPDX-License-Identifier: MIT
    +
    2#ifndef MULTIPLEXING_H
    +
    3#define MULTIPLEXING_H
    +
    4
    +
    5#include <cstdint>
    +
    6
    +
    7enum class MultiplexRole {
    +
    8 Unconditional,
    +
    9 Selector,
    +
    10 Branch
    +
    11};
    +
    12
    +
    + +
    15 MultiplexRole role = MultiplexRole::Unconditional;
    +
    16 std::uint64_t value = 0U;
    +
    17};
    +
    +
    18
    +
    19#endif
    + +
    +
    + + + + diff --git a/docs/html/navtreedata.js b/docs/html/navtreedata.js index 6eee946..07a2900 100644 --- a/docs/html/navtreedata.js +++ b/docs/html/navtreedata.js @@ -25,84 +25,116 @@ var NAVTREE = [ [ "DBC Framework", "index.html", [ + [ "Changelog", "md_changelog.html", [ + [ "Unreleased", "md_changelog.html#autotoc_md1", [ + [ "2026-10-07", "md_changelog.html#autotoc_md2", [ + [ "Added", "md_changelog.html#autotoc_md3", null ], + [ "Changed", "md_changelog.html#autotoc_md4", null ], + [ "Fixed", "md_changelog.html#autotoc_md5", null ] + ] ], + [ "2026-10-06", "md_changelog.html#autotoc_md6", [ + [ "Added", "md_changelog.html#autotoc_md7", null ] + ] ], + [ "2026-10-05", "md_changelog.html#autotoc_md8", [ + [ "Changed", "md_changelog.html#autotoc_md9", null ], + [ "Fixed", "md_changelog.html#autotoc_md10", null ], + [ "Documentation and maintenance", "md_changelog.html#autotoc_md11", null ] + ] ], + [ "2026-10-01", "md_changelog.html#autotoc_md12", [ + [ "Changed", "md_changelog.html#autotoc_md13", null ], + [ "Fixed", "md_changelog.html#autotoc_md14", null ] + ] ] + ] ], + [ "v1.0 — 2026-06-14", "md_changelog.html#autotoc_md15", [ + [ "Documentation", "md_changelog.html#autotoc_md16", null ], + [ "Initial implementation — 2026-03-13", "md_changelog.html#autotoc_md17", [ + [ "Added", "md_changelog.html#autotoc_md18", null ], + [ "Documentation and maintenance", "md_changelog.html#autotoc_md19", null ] + ] ] + ] ] + ] ], [ "DBC Parser and Runtime Decode Module Documentation", "md_README.html", [ - [ "Overview", "md_README.html#autotoc_md1", null ], - [ "High-Level Architecture", "md_README.html#autotoc_md3", [ - [ "1. Parse and UI path", "md_README.html#autotoc_md4", null ], - [ "2. Runtime decode path", "md_README.html#autotoc_md5", null ] + [ "Overview", "md_README.html#autotoc_md21", null ], + [ "High-Level Architecture", "md_README.html#autotoc_md23", [ + [ "1. Parse and UI path", "md_README.html#autotoc_md24", null ], + [ "2. Runtime decode path", "md_README.html#autotoc_md25", null ] ] ], - [ "Why the Runtime Decode Layer Exists", "md_README.html#autotoc_md7", null ], - [ "Module Layout", "md_README.html#autotoc_md9", [ - [ "Parsed DBC structures", "md_README.html#autotoc_md10", null ], - [ "UI tree structures", "md_README.html#autotoc_md11", null ], - [ "Runtime decode structures", "md_README.html#autotoc_md12", null ], - [ "Runtime decoder", "md_README.html#autotoc_md13", null ], - [ "Parser", "md_README.html#autotoc_md14", null ], - [ "Demo", "md_README.html#autotoc_md15", null ] + [ "Why the Runtime Decode Layer Exists", "md_README.html#autotoc_md27", null ], + [ "Module Layout", "md_README.html#autotoc_md29", null ], + [ "Parsed Data Structures", "md_README.html#autotoc_md31", null ], + [ "SignalInfo", "md_README.html#autotoc_md32", null ], + [ "FrameInfo", "md_README.html#autotoc_md34", null ], + [ "DbcDatabase", "md_README.html#autotoc_md36", null ], + [ "UI Tree Layer", "md_README.html#autotoc_md38", null ], + [ "TreeNode", "md_README.html#autotoc_md39", null ], + [ "Runtime Decode Layer", "md_README.html#autotoc_md41", null ], + [ "Purpose", "md_README.html#autotoc_md42", null ], + [ "ByteOrder", "md_README.html#autotoc_md44", null ], + [ "ValueType", "md_README.html#autotoc_md46", null ], + [ "DecodeSignal", "md_README.html#autotoc_md48", null ], + [ "DecodeFrame", "md_README.html#autotoc_md50", null ], + [ "FrameKey", "md_README.html#autotoc_md52", null ], + [ "DecodeDatabase", "md_README.html#autotoc_md54", null ], + [ "Decoder Layer", "md_README.html#autotoc_md56", null ], + [ "RawCanFrame", "md_README.html#autotoc_md57", null ], + [ "DecodedSignalValue", "md_README.html#autotoc_md59", [ + [ "Raw value representation and precision", "md_README.html#autotoc_md61", null ] ] ], - [ "Parsed Data Structures", "md_README.html#autotoc_md17", null ], - [ "SignalInfo", "md_README.html#autotoc_md18", null ], - [ "FrameInfo", "md_README.html#autotoc_md20", null ], - [ "DbcDatabase", "md_README.html#autotoc_md22", null ], - [ "UI Tree Layer", "md_README.html#autotoc_md24", null ], - [ "TreeNode", "md_README.html#autotoc_md25", null ], - [ "Runtime Decode Layer", "md_README.html#autotoc_md27", null ], - [ "Purpose", "md_README.html#autotoc_md28", null ], - [ "ByteOrder", "md_README.html#autotoc_md30", null ], - [ "ValueType", "md_README.html#autotoc_md32", null ], - [ "DecodeSignal", "md_README.html#autotoc_md34", null ], - [ "DecodeFrame", "md_README.html#autotoc_md36", null ], - [ "FrameKey", "md_README.html#autotoc_md38", null ], - [ "DecodeDatabase", "md_README.html#autotoc_md40", null ], - [ "Decoder Layer", "md_README.html#autotoc_md42", null ], - [ "RawCanFrame", "md_README.html#autotoc_md43", null ], - [ "DecodedSignalValue", "md_README.html#autotoc_md45", [ - [ "Raw value representation and precision", "md_README.html#autotoc_md47", null ] + [ "DecodedFrameValue", "md_README.html#autotoc_md63", null ], + [ "DbcDecoder", "md_README.html#autotoc_md65", null ], + [ "Parser Support", "md_README.html#autotoc_md67", null ], + [ "Supported DBC Syntax", "md_README.html#autotoc_md69", null ], + [ "Frame definition", "md_README.html#autotoc_md70", [ + [ "Frame validation and parse errors", "md_README.html#autotoc_md72", null ] ] ], - [ "DecodedFrameValue", "md_README.html#autotoc_md49", null ], - [ "DbcDecoder", "md_README.html#autotoc_md51", null ], - [ "Parser Support", "md_README.html#autotoc_md53", null ], - [ "Supported DBC Syntax", "md_README.html#autotoc_md55", null ], - [ "Frame definition", "md_README.html#autotoc_md56", [ - [ "Frame validation and parse errors", "md_README.html#autotoc_md58", null ] + [ "Signal definition", "md_README.html#autotoc_md74", [ + [ "Signal validation and parse errors", "md_README.html#autotoc_md76", null ] ] ], - [ "Signal definition", "md_README.html#autotoc_md60", [ - [ "Signal validation and parse errors", "md_README.html#autotoc_md62", null ] + [ "Basic multiplexing", "md_README.html#autotoc_md78", null ], + [ "Comments", "md_README.html#autotoc_md80", null ], + [ "CAN ID Normalization", "md_README.html#autotoc_md82", null ], + [ "PGN Extraction", "md_README.html#autotoc_md84", null ], + [ "Decode Flow", "md_README.html#autotoc_md86", null ], + [ "Intel and Motorola Extraction", "md_README.html#autotoc_md88", null ], + [ "Example Usage", "md_README.html#autotoc_md90", [ + [ "Parse DBC", "md_README.html#autotoc_md91", null ], + [ "Build UI tree", "md_README.html#autotoc_md92", null ], + [ "Build runtime decode database", "md_README.html#autotoc_md93", null ], + [ "Decode a raw frame", "md_README.html#autotoc_md94", null ] ] ], - [ "Comments", "md_README.html#autotoc_md64", null ], - [ "CAN ID Normalization", "md_README.html#autotoc_md66", null ], - [ "PGN Extraction", "md_README.html#autotoc_md68", null ], - [ "Decode Flow", "md_README.html#autotoc_md70", null ], - [ "Intel and Motorola Extraction", "md_README.html#autotoc_md72", null ], - [ "Example Usage", "md_README.html#autotoc_md74", null ], - [ "Parse DBC", "md_README.html#autotoc_md75", null ], - [ "Build UI tree", "md_README.html#autotoc_md76", null ], - [ "Build runtime decode database", "md_README.html#autotoc_md77", null ], - [ "Decode a raw frame", "md_README.html#autotoc_md78", null ], - [ "Unified Decode Strategy", "md_README.html#autotoc_md80", [ - [ "live path", "md_README.html#autotoc_md81", null ], - [ "trace path", "md_README.html#autotoc_md82", null ] + [ "Unified Decode Strategy", "md_README.html#autotoc_md96", [ + [ "live path", "md_README.html#autotoc_md97", null ], + [ "trace path", "md_README.html#autotoc_md98", null ] ] ], - [ "Intended Use in FrameTap", "md_README.html#autotoc_md84", null ], - [ "Why the Tree Is Not Enough", "md_README.html#autotoc_md86", null ], - [ "Statement Handler Factory", "md_README.html#autotoc_md88", null ], - [ "Current Limitations", "md_README.html#autotoc_md90", null ], - [ "Recommended Next Steps", "md_README.html#autotoc_md92", [ - [ "Stage 1 - already implemented", "md_README.html#autotoc_md93", null ], - [ "Stage 2", "md_README.html#autotoc_md94", null ], - [ "Stage 3", "md_README.html#autotoc_md95", null ], - [ "Stage 4", "md_README.html#autotoc_md96", null ] + [ "Intended Use in FrameTap", "md_README.html#autotoc_md100", null ], + [ "Why the Tree Is Not Enough", "md_README.html#autotoc_md102", null ], + [ "Statement Handler Factory", "md_README.html#autotoc_md104", null ], + [ "Signal value descriptions (VAL_)", "md_README.html#autotoc_md106", null ], + [ "Current Limitations", "md_README.html#autotoc_md108", null ], + [ "Recommended Next Steps", "md_README.html#autotoc_md110", [ + [ "Stage 1 - already implemented", "md_README.html#autotoc_md111", null ], + [ "Stage 2", "md_README.html#autotoc_md112", null ], + [ "Stage 3", "md_README.html#autotoc_md113", null ], + [ "Stage 4", "md_README.html#autotoc_md114", null ] ] ], - [ "Build Integration", "md_README.html#autotoc_md98", null ], - [ "Summary", "md_README.html#autotoc_md100", [ - [ "Parsed representation", "md_README.html#autotoc_md101", null ], - [ "Runtime decode representation", "md_README.html#autotoc_md102", null ] + [ "Build Integration", "md_README.html#autotoc_md116", [ + [ "Build core without Qt libraries", "md_README.html#autotoc_md117", null ], + [ "Optional Qt model adapter", "md_README.html#autotoc_md118", null ], + [ "Standalone tree tests without Qt", "md_README.html#autotoc_md119", null ], + [ "Build and run the demo", "md_README.html#autotoc_md120", null ], + [ "Generate API documentation", "md_README.html#autotoc_md121", null ] ] ], - [ "Regression tests", "md_README.html#autotoc_md103", null ] + [ "Regression tests", "md_README.html#autotoc_md123", null ], + [ "Measuring code coverage", "md_README.html#autotoc_md124", [ + [ "GCC, gcov, and LCOV on Debian/Ubuntu", "md_README.html#autotoc_md125", null ], + [ "Configure the GCC coverage build in Qt Creator", "md_README.html#autotoc_md126", null ] + ] ] ] ], [ "QtTest regression tests", "md_tests_2README.html", [ - [ "Decoder coverage", "md_tests_2README.html#autotoc_md105", null ], - [ "Parser coverage", "md_tests_2README.html#autotoc_md106", null ] + [ "Decoder coverage", "md_tests_2README.html#autotoc_md128", null ], + [ "Parser coverage", "md_tests_2README.html#autotoc_md129", null ], + [ "Tree and optional model tests", "md_tests_2README.html#autotoc_md130", null ], + [ "Additional regression coverage", "md_tests_2README.html#autotoc_md131", null ] ] ], [ "Classes", "annotated.html", [ [ "Class List", "annotated.html", "annotated_dup" ], @@ -126,7 +158,8 @@ var NAVTREE = var NAVTREEINDEX = [ -"annotated.html" +"annotated.html", +"structSignalInfo.html#ace290724f9801521609aedaa946d61f1" ]; var SYNCONMSG = 'click to disable panel synchronisation'; diff --git a/docs/html/navtreeindex0.js b/docs/html/navtreeindex0.js index 7ffdbef..c93704a 100644 --- a/docs/html/navtreeindex0.js +++ b/docs/html/navtreeindex0.js @@ -1,229 +1,253 @@ var NAVTREEINDEX0 = { -"annotated.html":[2,0], -"classDbcCommentHandler.html":[2,0,0], -"classDbcDecodeBuilder.html":[2,0,2], -"classDbcDecodeBuilder.html#a2bc6386dfb5e58976c42e22c19ec471b":[2,0,2,0], -"classDbcDecoder.html":[2,0,3], -"classDbcDecoder.html#a345951ffe5d943a70d3a1ea1f39e74f7":[2,0,3,1], -"classDbcDecoder.html#ab2cfb2fb711c95d3a29365546b89f3da":[2,0,3,0], -"classDbcFrameHandler.html":[2,0,4], -"classDbcParser.html":[2,0,6], -"classDbcParser.html#aef72826942c9095d653fafa435855e56":[2,0,6,0], -"classDbcSignalHandler.html":[2,0,7], -"classDbcStatementDispatcher.html":[2,0,8], -"classDbcStatementDispatcher.html#a495c2d5c7ebb8103b1987cdd87c142ed":[2,0,8,0], -"classDbcStatementHandler.html":[2,0,9], -"classDbcTreeBuilder.html":[2,0,10], -"classDbcTreeBuilder.html#a7e57d067d831b14b383947fd125edd4b":[2,0,10,0], -"classTreeNode.html":[2,0,21], -"classTreeNode.html#a226518612d0d00b5988a2c44fc21d3f1":[2,0,21,10], -"classTreeNode.html#a4727ff801a2d1b9323c5ae50a35457a6":[2,0,21,5], -"classTreeNode.html#a6161f2ebb92184eab4215d121870e788":[2,0,21,3], -"classTreeNode.html#a81047bd7d2a4cc96b9ef5e20d0d63b5f":[2,0,21,6], -"classTreeNode.html#a8e38dd591d8801d7ee3a7dbad90c67fc":[2,0,21,1], -"classTreeNode.html#a984a98d5ccf7ef1f5a18094c6821f35d":[2,0,21,0], -"classTreeNode.html#aaac5b8d9dc9e5ae1f367d1adbcf20e18":[2,0,21,8], -"classTreeNode.html#ab9f00f5253d56461bb2d420fd639c5ae":[2,0,21,2], -"classTreeNode.html#abdd82460187dca8d3e5d66f5d5c529ea":[2,0,21,4], -"classTreeNode.html#afa2f4b0aafa12d3d41ed00df8e0250c9":[2,0,21,7], -"classTreeNode.html#afc503b40004764163605d6dbdb4ef811":[2,0,21,9], -"classTypeFactory.html":[2,0,22], -"classTypeFactory.html#a1a119ad2956abe146213c6ca124d8dd4":[2,0,22,3], -"classTypeFactory.html#a3f43b03d6e3a0fd503fdec01ecf62e9f":[2,0,22,2], -"classTypeFactory.html#ad6d85795285ee21193ac03e1b24762d3":[2,0,22,0], -"classTypeFactory.html#ad82f537569ece3d3a4a376523fa94473":[2,0,22,1], -"classes.html":[2,1], -"dbc__database_8h.html":[3,0,0,0], -"dbc__database_8h_source.html":[3,0,0,0], -"dbc__decode__builder_8cpp.html":[3,0,0,1], -"dbc__decode__builder_8cpp_source.html":[3,0,0,1], -"dbc__decode__builder_8h.html":[3,0,0,2], -"dbc__decode__builder_8h_source.html":[3,0,0,2], -"dbc__decoder_8cpp.html":[3,0,0,3], -"dbc__decoder_8cpp_source.html":[3,0,0,3], -"dbc__decoder_8h.html":[3,0,0,4], -"dbc__decoder_8h_source.html":[3,0,0,4], -"dbc__decoder__test_8cpp_source.html":[3,0,2,0], -"dbc__parser_8cpp.html":[3,0,0,5], -"dbc__parser_8cpp_source.html":[3,0,0,5], -"dbc__parser_8h.html":[3,0,0,6], -"dbc__parser_8h_source.html":[3,0,0,6], -"dbc__parser__test_8cpp_source.html":[3,0,2,1], -"dbc__statement__handler_8cpp_source.html":[3,0,0,7], -"dbc__statement__handler_8h_source.html":[3,0,0,8], -"dbc__tree__builder_8cpp.html":[3,0,0,9], -"dbc__tree__builder_8cpp_source.html":[3,0,0,9], -"dbc__tree__builder_8h.html":[3,0,0,10], -"dbc__tree__builder_8h_source.html":[3,0,0,10], -"decode__database_8h.html":[3,0,0,11], -"decode__database_8h.html#aaeb92d42f5a6e27b8ba19f18d69d142b":[3,0,0,11,5], -"decode__database_8h.html#aaeb92d42f5a6e27b8ba19f18d69d142ba2ed1afe3c9215523e4272f46e6186b31":[3,0,0,11,5,1], -"decode__database_8h.html#aaeb92d42f5a6e27b8ba19f18d69d142baff97a9fdede09eaf6e1c8ec9f6a61dd5":[3,0,0,11,5,0], -"decode__database_8h.html#ad9971b6ef33e02ba2c75d19c1d2518a1":[3,0,0,11,6], -"decode__database_8h.html#ad9971b6ef33e02ba2c75d19c1d2518a1a71fed0c3428bf1a2e19af257c4bac379":[3,0,0,11,6,1], -"decode__database_8h.html#ad9971b6ef33e02ba2c75d19c1d2518a1aa1a914735b205424ba6c40b85528d78a":[3,0,0,11,6,0], -"decode__database_8h_source.html":[3,0,0,11], -"dir_4270bfced15e0e73154b13468c7c9ad9.html":[3,0,0], -"dir_59425e443f801f1f2fd8bbe4959a3ccf.html":[3,0,2], -"dir_d28a4824dc47e487b107a5db32ef43c4.html":[3,0,1], -"examples_2main_8cpp.html":[3,0,1,0], -"examples_2main_8cpp_source.html":[3,0,1,0], -"files.html":[3,0], -"frame__info_8h.html":[3,0,0,12], -"frame__info_8h_source.html":[3,0,0,12], -"functions.html":[2,3,0], -"functions_func.html":[2,3,1], -"functions_vars.html":[2,3,2], -"globals.html":[3,1,0], -"globals_enum.html":[3,1,1], -"hierarchy.html":[2,2], +"annotated.html":[3,0], +"classDbcCommentHandler.html":[3,0,0], +"classDbcDecodeBuilder.html":[3,0,2], +"classDbcDecodeBuilder.html#a2bc6386dfb5e58976c42e22c19ec471b":[3,0,2,0], +"classDbcDecoder.html":[3,0,3], +"classDbcDecoder.html#a345951ffe5d943a70d3a1ea1f39e74f7":[3,0,3,1], +"classDbcDecoder.html#ab2cfb2fb711c95d3a29365546b89f3da":[3,0,3,0], +"classDbcFrameHandler.html":[3,0,4], +"classDbcParser.html":[3,0,6], +"classDbcParser.html#aef72826942c9095d653fafa435855e56":[3,0,6,0], +"classDbcSignalHandler.html":[3,0,7], +"classDbcStatementDispatcher.html":[3,0,8], +"classDbcStatementDispatcher.html#a495c2d5c7ebb8103b1987cdd87c142ed":[3,0,8,0], +"classDbcStatementHandler.html":[3,0,9], +"classDbcTreeBuilder.html":[3,0,10], +"classDbcTreeBuilder.html#a7e57d067d831b14b383947fd125edd4b":[3,0,10,0], +"classDbcTreeModel.html":[3,0,11], +"classDbcUnsupportedMultiplexingHandler.html":[3,0,12], +"classDbcValueDescriptionHandler.html":[3,0,13], +"classTreeNode.html":[3,0,26], +"classTreeNode.html#a226518612d0d00b5988a2c44fc21d3f1":[3,0,26,12], +"classTreeNode.html#a4727ff801a2d1b9323c5ae50a35457a6":[3,0,26,7], +"classTreeNode.html#a6161f2ebb92184eab4215d121870e788":[3,0,26,3], +"classTreeNode.html#a81047bd7d2a4cc96b9ef5e20d0d63b5f":[3,0,26,8], +"classTreeNode.html#a8e38dd591d8801d7ee3a7dbad90c67fc":[3,0,26,1], +"classTreeNode.html#a984a98d5ccf7ef1f5a18094c6821f35d":[3,0,26,0], +"classTreeNode.html#aa48fbc17903eb8cfa40353e29f853c6f":[3,0,26,4], +"classTreeNode.html#aaac5b8d9dc9e5ae1f367d1adbcf20e18":[3,0,26,10], +"classTreeNode.html#ab9f00f5253d56461bb2d420fd639c5ae":[3,0,26,2], +"classTreeNode.html#abdd82460187dca8d3e5d66f5d5c529ea":[3,0,26,6], +"classTreeNode.html#ad501f97eeec7f7d3353bfae838fbb6a8":[3,0,26,5], +"classTreeNode.html#afa2f4b0aafa12d3d41ed00df8e0250c9":[3,0,26,9], +"classTreeNode.html#afc503b40004764163605d6dbdb4ef811":[3,0,26,11], +"classTypeFactory.html":[3,0,27], +"classTypeFactory.html#a1a119ad2956abe146213c6ca124d8dd4":[3,0,27,3], +"classTypeFactory.html#a3f43b03d6e3a0fd503fdec01ecf62e9f":[3,0,27,2], +"classTypeFactory.html#ad6d85795285ee21193ac03e1b24762d3":[3,0,27,0], +"classTypeFactory.html#ad82f537569ece3d3a4a376523fa94473":[3,0,27,1], +"classes.html":[3,1], +"dbc__coverage__test_8cpp_source.html":[4,0,3,0], +"dbc__database_8h.html":[4,0,0,0], +"dbc__database_8h_source.html":[4,0,0,0], +"dbc__decode__builder_8cpp.html":[4,0,0,1], +"dbc__decode__builder_8cpp_source.html":[4,0,0,1], +"dbc__decode__builder_8h.html":[4,0,0,2], +"dbc__decode__builder_8h_source.html":[4,0,0,2], +"dbc__decoder_8cpp.html":[4,0,0,3], +"dbc__decoder_8cpp_source.html":[4,0,0,3], +"dbc__decoder_8h.html":[4,0,0,4], +"dbc__decoder_8h_source.html":[4,0,0,4], +"dbc__decoder__test_8cpp_source.html":[4,0,3,1], +"dbc__parser_8cpp.html":[4,0,0,5], +"dbc__parser_8cpp_source.html":[4,0,0,5], +"dbc__parser_8h.html":[4,0,0,6], +"dbc__parser_8h_source.html":[4,0,0,6], +"dbc__parser__test_8cpp_source.html":[4,0,3,2], +"dbc__statement__handler_8cpp_source.html":[4,0,0,7], +"dbc__statement__handler_8h_source.html":[4,0,0,8], +"dbc__tree__builder_8cpp.html":[4,0,0,9], +"dbc__tree__builder_8cpp_source.html":[4,0,0,9], +"dbc__tree__builder_8h.html":[4,0,0,10], +"dbc__tree__builder_8h_source.html":[4,0,0,10], +"dbc__tree__model_8cpp_source.html":[4,0,2,0], +"dbc__tree__model_8h_source.html":[4,0,2,1], +"dbc__tree__model__test_8cpp_source.html":[4,0,3,3], +"decode__database_8h.html":[4,0,0,11], +"decode__database_8h.html#aaeb92d42f5a6e27b8ba19f18d69d142b":[4,0,0,11,5], +"decode__database_8h.html#aaeb92d42f5a6e27b8ba19f18d69d142ba2ed1afe3c9215523e4272f46e6186b31":[4,0,0,11,5,1], +"decode__database_8h.html#aaeb92d42f5a6e27b8ba19f18d69d142baff97a9fdede09eaf6e1c8ec9f6a61dd5":[4,0,0,11,5,0], +"decode__database_8h.html#ad9971b6ef33e02ba2c75d19c1d2518a1":[4,0,0,11,6], +"decode__database_8h.html#ad9971b6ef33e02ba2c75d19c1d2518a1a71fed0c3428bf1a2e19af257c4bac379":[4,0,0,11,6,1], +"decode__database_8h.html#ad9971b6ef33e02ba2c75d19c1d2518a1aa1a914735b205424ba6c40b85528d78a":[4,0,0,11,6,0], +"decode__database_8h_source.html":[4,0,0,11], +"dir_0f63d6441a2c250919e1e8723011eb2f.html":[4,0,2], +"dir_4270bfced15e0e73154b13468c7c9ad9.html":[4,0,0], +"dir_59425e443f801f1f2fd8bbe4959a3ccf.html":[4,0,3], +"dir_d28a4824dc47e487b107a5db32ef43c4.html":[4,0,1], +"examples_2main_8cpp.html":[4,0,1,0], +"examples_2main_8cpp_source.html":[4,0,1,0], +"files.html":[4,0], +"frame__info_8h.html":[4,0,0,12], +"frame__info_8h_source.html":[4,0,0,12], +"functions.html":[3,3,0], +"functions_func.html":[3,3,1], +"functions_vars.html":[3,3,2], +"globals.html":[4,1,0], +"globals_enum.html":[4,1,1], +"hierarchy.html":[3,2], "index.html":[], -"md_README.html":[0], -"md_README.html#autotoc_md1":[0,0], -"md_README.html#autotoc_md10":[0,3,0], -"md_README.html#autotoc_md100":[0,44], -"md_README.html#autotoc_md101":[0,44,0], -"md_README.html#autotoc_md102":[0,44,1], -"md_README.html#autotoc_md103":[0,45], -"md_README.html#autotoc_md11":[0,3,1], -"md_README.html#autotoc_md12":[0,3,2], -"md_README.html#autotoc_md13":[0,3,3], -"md_README.html#autotoc_md14":[0,3,4], -"md_README.html#autotoc_md15":[0,3,5], -"md_README.html#autotoc_md17":[0,4], -"md_README.html#autotoc_md18":[0,5], -"md_README.html#autotoc_md20":[0,6], -"md_README.html#autotoc_md22":[0,7], -"md_README.html#autotoc_md24":[0,8], -"md_README.html#autotoc_md25":[0,9], -"md_README.html#autotoc_md27":[0,10], -"md_README.html#autotoc_md28":[0,11], -"md_README.html#autotoc_md3":[0,1], -"md_README.html#autotoc_md30":[0,12], -"md_README.html#autotoc_md32":[0,13], -"md_README.html#autotoc_md34":[0,14], -"md_README.html#autotoc_md36":[0,15], -"md_README.html#autotoc_md38":[0,16], -"md_README.html#autotoc_md4":[0,1,0], -"md_README.html#autotoc_md40":[0,17], -"md_README.html#autotoc_md42":[0,18], -"md_README.html#autotoc_md43":[0,19], -"md_README.html#autotoc_md45":[0,20], -"md_README.html#autotoc_md47":[0,20,0], -"md_README.html#autotoc_md49":[0,21], -"md_README.html#autotoc_md5":[0,1,1], -"md_README.html#autotoc_md51":[0,22], -"md_README.html#autotoc_md53":[0,23], -"md_README.html#autotoc_md55":[0,24], -"md_README.html#autotoc_md56":[0,25], -"md_README.html#autotoc_md58":[0,25,0], -"md_README.html#autotoc_md60":[0,26], -"md_README.html#autotoc_md62":[0,26,0], -"md_README.html#autotoc_md64":[0,27], -"md_README.html#autotoc_md66":[0,28], -"md_README.html#autotoc_md68":[0,29], -"md_README.html#autotoc_md7":[0,2], -"md_README.html#autotoc_md70":[0,30], -"md_README.html#autotoc_md72":[0,31], -"md_README.html#autotoc_md74":[0,32], -"md_README.html#autotoc_md75":[0,33], -"md_README.html#autotoc_md76":[0,34], -"md_README.html#autotoc_md77":[0,35], -"md_README.html#autotoc_md78":[0,36], -"md_README.html#autotoc_md80":[0,37], -"md_README.html#autotoc_md81":[0,37,0], -"md_README.html#autotoc_md82":[0,37,1], -"md_README.html#autotoc_md84":[0,38], -"md_README.html#autotoc_md86":[0,39], -"md_README.html#autotoc_md88":[0,40], -"md_README.html#autotoc_md9":[0,3], -"md_README.html#autotoc_md90":[0,41], -"md_README.html#autotoc_md92":[0,42], -"md_README.html#autotoc_md93":[0,42,0], -"md_README.html#autotoc_md94":[0,42,1], -"md_README.html#autotoc_md95":[0,42,2], -"md_README.html#autotoc_md96":[0,42,3], -"md_README.html#autotoc_md98":[0,43], -"md_tests_2README.html":[1], -"md_tests_2README.html#autotoc_md105":[1,0], -"md_tests_2README.html#autotoc_md106":[1,1], +"md_README.html":[1], +"md_README.html#autotoc_md100":[1,35], +"md_README.html#autotoc_md102":[1,36], +"md_README.html#autotoc_md104":[1,37], +"md_README.html#autotoc_md106":[1,38], +"md_README.html#autotoc_md108":[1,39], +"md_README.html#autotoc_md110":[1,40], +"md_README.html#autotoc_md111":[1,40,0], +"md_README.html#autotoc_md112":[1,40,1], +"md_README.html#autotoc_md113":[1,40,2], +"md_README.html#autotoc_md114":[1,40,3], +"md_README.html#autotoc_md116":[1,41], +"md_README.html#autotoc_md117":[1,41,0], +"md_README.html#autotoc_md118":[1,41,1], +"md_README.html#autotoc_md119":[1,41,2], +"md_README.html#autotoc_md120":[1,41,3], +"md_README.html#autotoc_md121":[1,41,4], +"md_README.html#autotoc_md123":[1,42], +"md_README.html#autotoc_md124":[1,43], +"md_README.html#autotoc_md125":[1,43,0], +"md_README.html#autotoc_md126":[1,43,1], +"md_README.html#autotoc_md21":[1,0], +"md_README.html#autotoc_md23":[1,1], +"md_README.html#autotoc_md24":[1,1,0], +"md_README.html#autotoc_md25":[1,1,1], +"md_README.html#autotoc_md27":[1,2], +"md_README.html#autotoc_md29":[1,3], +"md_README.html#autotoc_md31":[1,4], +"md_README.html#autotoc_md32":[1,5], +"md_README.html#autotoc_md34":[1,6], +"md_README.html#autotoc_md36":[1,7], +"md_README.html#autotoc_md38":[1,8], +"md_README.html#autotoc_md39":[1,9], +"md_README.html#autotoc_md41":[1,10], +"md_README.html#autotoc_md42":[1,11], +"md_README.html#autotoc_md44":[1,12], +"md_README.html#autotoc_md46":[1,13], +"md_README.html#autotoc_md48":[1,14], +"md_README.html#autotoc_md50":[1,15], +"md_README.html#autotoc_md52":[1,16], +"md_README.html#autotoc_md54":[1,17], +"md_README.html#autotoc_md56":[1,18], +"md_README.html#autotoc_md57":[1,19], +"md_README.html#autotoc_md59":[1,20], +"md_README.html#autotoc_md61":[1,20,0], +"md_README.html#autotoc_md63":[1,21], +"md_README.html#autotoc_md65":[1,22], +"md_README.html#autotoc_md67":[1,23], +"md_README.html#autotoc_md69":[1,24], +"md_README.html#autotoc_md70":[1,25], +"md_README.html#autotoc_md72":[1,25,0], +"md_README.html#autotoc_md74":[1,26], +"md_README.html#autotoc_md76":[1,26,0], +"md_README.html#autotoc_md78":[1,27], +"md_README.html#autotoc_md80":[1,28], +"md_README.html#autotoc_md82":[1,29], +"md_README.html#autotoc_md84":[1,30], +"md_README.html#autotoc_md86":[1,31], +"md_README.html#autotoc_md88":[1,32], +"md_README.html#autotoc_md90":[1,33], +"md_README.html#autotoc_md91":[1,33,0], +"md_README.html#autotoc_md92":[1,33,1], +"md_README.html#autotoc_md93":[1,33,2], +"md_README.html#autotoc_md94":[1,33,3], +"md_README.html#autotoc_md96":[1,34], +"md_README.html#autotoc_md97":[1,34,0], +"md_README.html#autotoc_md98":[1,34,1], +"md_changelog.html":[0], +"md_changelog.html#autotoc_md1":[0,0], +"md_changelog.html#autotoc_md10":[0,0,2,1], +"md_changelog.html#autotoc_md11":[0,0,2,2], +"md_changelog.html#autotoc_md12":[0,0,3], +"md_changelog.html#autotoc_md13":[0,0,3,0], +"md_changelog.html#autotoc_md14":[0,0,3,1], +"md_changelog.html#autotoc_md15":[0,1], +"md_changelog.html#autotoc_md16":[0,1,0], +"md_changelog.html#autotoc_md17":[0,1,1], +"md_changelog.html#autotoc_md18":[0,1,1,0], +"md_changelog.html#autotoc_md19":[0,1,1,1], +"md_changelog.html#autotoc_md2":[0,0,0], +"md_changelog.html#autotoc_md3":[0,0,0,0], +"md_changelog.html#autotoc_md4":[0,0,0,1], +"md_changelog.html#autotoc_md5":[0,0,0,2], +"md_changelog.html#autotoc_md6":[0,0,1], +"md_changelog.html#autotoc_md7":[0,0,1,0], +"md_changelog.html#autotoc_md8":[0,0,2], +"md_changelog.html#autotoc_md9":[0,0,2,0], +"md_tests_2README.html":[2], +"md_tests_2README.html#autotoc_md128":[2,0], +"md_tests_2README.html#autotoc_md129":[2,1], +"md_tests_2README.html#autotoc_md130":[2,2], +"md_tests_2README.html#autotoc_md131":[2,3], +"multiplexing_8h_source.html":[4,0,0,13], "pages.html":[], -"signal__info_8h.html":[3,0,0,13], -"signal__info_8h_source.html":[3,0,0,13], -"structDbcDatabase.html":[2,0,1], -"structDbcDatabase.html#a2cade5d0234ee816132127542f8c612b":[2,0,1,0], -"structDbcParseContext.html":[2,0,5], -"structDecodeDatabase.html":[2,0,11], -"structDecodeFrame.html":[2,0,14], -"structDecodeFrame.html#a1d3c54055c0cbceb73adf551f7067f23":[2,0,14,4], -"structDecodeFrame.html#a2551102670c4a540fced4c71da0b369d":[2,0,14,5], -"structDecodeFrame.html#a25819ef907a32391af5c9f7cae9cdb22":[2,0,14,7], -"structDecodeFrame.html#a3ee2348d781f8f15aaf87e8dcf57ec41":[2,0,14,2], -"structDecodeFrame.html#a51111ac13988be372d5673d12cf3e060":[2,0,14,3], -"structDecodeFrame.html#a52e10215388db7df8b541b9d9909edcf":[2,0,14,1], -"structDecodeFrame.html#a7f4e71bbdec3f424b625e724e3dfbf14":[2,0,14,8], -"structDecodeFrame.html#aa0a7f8fd5bfde2148dfd0d838328f579":[2,0,14,0], -"structDecodeFrame.html#ad78241dc40c793aabb8495b6989b81a9":[2,0,14,6], -"structDecodeSignal.html":[2,0,15], -"structDecodeSignal.html#a0fb84e19a0ab3bd50b6f65c1075ebc25":[2,0,15,7], -"structDecodeSignal.html#a38eed9ca7581423fd8bfbedcffc12092":[2,0,15,9], -"structDecodeSignal.html#a428c39913a366a8476dd291061354391":[2,0,15,5], -"structDecodeSignal.html#a4a6ba87142a9badbf0ca830e9e709cb7":[2,0,15,8], -"structDecodeSignal.html#a58cf5844f2272a23dcb9687d912e4780":[2,0,15,0], -"structDecodeSignal.html#a92db637af4e224a0ae70173050dc3f74":[2,0,15,6], -"structDecodeSignal.html#a9d37638129263b8902ba5be59baf39a8":[2,0,15,4], -"structDecodeSignal.html#aaf5d7527ddf65b6355c2b4f3626df22d":[2,0,15,1], -"structDecodeSignal.html#abdbae62a64d2df716bf60c6b67b30eaa":[2,0,15,10], -"structDecodeSignal.html#abdc4c4bb4a67a6d61d6ca81e8a52833d":[2,0,15,3], -"structDecodeSignal.html#acd4ef5ee30421d117b5756854302debb":[2,0,15,2], -"structDecodeSignal.html#ae28c905d4a2bc86419c2a8361bfea473":[2,0,15,11], -"structDecodedFrameValue.html":[2,0,12], -"structDecodedFrameValue.html#a4f51c31110dba1f73a763c596372beb0":[2,0,12,2], -"structDecodedFrameValue.html#a60dda1cc352d2c8087f0bdbc81dd266c":[2,0,12,0], -"structDecodedFrameValue.html#adae123ac7fbb4a5c314b64b01109f4a8":[2,0,12,1], -"structDecodedSignalValue.html":[2,0,13], -"structDecodedSignalValue.html#a6847d05b3cb00d5e0f6c611968f57978":[2,0,13,2], -"structDecodedSignalValue.html#a95db4f7f93b5f311e8f272833e45055e":[2,0,13,1], -"structDecodedSignalValue.html#aac0ed361af545cde48d0e6f41a859686":[2,0,13,3], -"structDecodedSignalValue.html#acadc3b3bb21dd6b0412d342c7e6b20d7":[2,0,13,0], -"structFrameInfo.html":[2,0,16], -"structFrameInfo.html#a34b726afaad2ac5c697fdb2ac070cdaf":[2,0,16,2], -"structFrameInfo.html#a3f7e25d67ddae22f2ed50823a5a26084":[2,0,16,8], -"structFrameInfo.html#a4737a5420213ad4304724e39f3a4e55d":[2,0,16,4], -"structFrameInfo.html#a92749ec3798d4211a505860fb389a9e8":[2,0,16,6], -"structFrameInfo.html#aa2b198ea0f55e560c123d35e7b3ecab9":[2,0,16,5], -"structFrameInfo.html#abb53a7f93ed7abc0ea1ae4a8ccafcdcb":[2,0,16,0], -"structFrameInfo.html#ace75121294f9d89b762080ab5643293c":[2,0,16,7], -"structFrameInfo.html#aee518b33f1000bf0b7f6e4a87474c943":[2,0,16,3], -"structFrameInfo.html#af470b0742c05bfbffc31c51a68f5c05e":[2,0,16,1], -"structFrameKey.html":[2,0,17], -"structFrameKeyHasher.html":[2,0,18], -"structRawCanFrame.html":[2,0,19], -"structRawCanFrame.html#a0acb487612104c99c9907344c035df83":[2,0,19,2], -"structRawCanFrame.html#a2d0e7fa0e3d5c20bbed55ed8f7888ff4":[2,0,19,0], -"structRawCanFrame.html#a462193d275adc1dba8bd18ffa0e36bb7":[2,0,19,1], -"structSignalInfo.html":[2,0,20], -"structSignalInfo.html#a1008b5201f71848177217bd52fb84baa":[2,0,20,2], -"structSignalInfo.html#a1f214f03e94ef5794de2d3367bfcbd01":[2,0,20,9], -"structSignalInfo.html#a2c95562fd0b29327a7fd7b1e6feee7f3":[2,0,20,10], -"structSignalInfo.html#a379e422a00cad56f896cacf60455b088":[2,0,20,0], -"structSignalInfo.html#a52a52b320eef92fbcb4626307f9a498f":[2,0,20,4], -"structSignalInfo.html#ab7d0769f47aa540656b22e4e49db517e":[2,0,20,6], -"structSignalInfo.html#ac99ba7563a5dad01e39c4257216953f5":[2,0,20,11], -"structSignalInfo.html#ace290724f9801521609aedaa946d61f1":[2,0,20,1], -"structSignalInfo.html#ada7bf94fbeaa26bd08c73982b5af255b":[2,0,20,7], -"structSignalInfo.html#adf1c4331b9eabced0d7fdda40ff0eb52":[2,0,20,8], -"structSignalInfo.html#ae4f78d99a2750aa564d7eba860171499":[2,0,20,5], -"structSignalInfo.html#af363b1563fb4c7cc8973f9a80c06846c":[2,0,20,3], -"tests_2main_8cpp_source.html":[3,0,2,2], -"tree__node_8cpp.html":[3,0,0,14], -"tree__node_8cpp_source.html":[3,0,0,14], -"tree__node_8h.html":[3,0,0,15], -"tree__node_8h.html#acac9cbaeea226ed297804c012dc12b16":[3,0,0,15,1], -"tree__node_8h.html#acac9cbaeea226ed297804c012dc12b16a085fea7abdc5d904fe69a3081efd7398":[3,0,0,15,1,2], -"tree__node_8h.html#acac9cbaeea226ed297804c012dc12b16a3bb3e8c8a24891ba0f7608bcc96f8b0a":[3,0,0,15,1,1], -"tree__node_8h.html#acac9cbaeea226ed297804c012dc12b16afa03eb688ad8aa1db593d33dabd89bad":[3,0,0,15,1,0], -"tree__node_8h_source.html":[3,0,0,15], -"typefactory_8h_source.html":[3,0,0,16] +"signal__info_8h.html":[4,0,0,14], +"signal__info_8h_source.html":[4,0,0,14], +"structDbcDatabase.html":[3,0,1], +"structDbcDatabase.html#a2cade5d0234ee816132127542f8c612b":[3,0,1,0], +"structDbcParseContext.html":[3,0,5], +"structDecodeDatabase.html":[3,0,14], +"structDecodeFrame.html":[3,0,17], +"structDecodeFrame.html#a1d3c54055c0cbceb73adf551f7067f23":[3,0,17,4], +"structDecodeFrame.html#a2551102670c4a540fced4c71da0b369d":[3,0,17,5], +"structDecodeFrame.html#a25819ef907a32391af5c9f7cae9cdb22":[3,0,17,7], +"structDecodeFrame.html#a3ee2348d781f8f15aaf87e8dcf57ec41":[3,0,17,2], +"structDecodeFrame.html#a51111ac13988be372d5673d12cf3e060":[3,0,17,3], +"structDecodeFrame.html#a52e10215388db7df8b541b9d9909edcf":[3,0,17,1], +"structDecodeFrame.html#a7f4e71bbdec3f424b625e724e3dfbf14":[3,0,17,8], +"structDecodeFrame.html#aa0a7f8fd5bfde2148dfd0d838328f579":[3,0,17,0], +"structDecodeFrame.html#ad78241dc40c793aabb8495b6989b81a9":[3,0,17,6], +"structDecodeSignal.html":[3,0,18], +"structDecodeSignal.html#a0fb84e19a0ab3bd50b6f65c1075ebc25":[3,0,18,7], +"structDecodeSignal.html#a38eed9ca7581423fd8bfbedcffc12092":[3,0,18,9], +"structDecodeSignal.html#a428c39913a366a8476dd291061354391":[3,0,18,5], +"structDecodeSignal.html#a4a6ba87142a9badbf0ca830e9e709cb7":[3,0,18,8], +"structDecodeSignal.html#a58cf5844f2272a23dcb9687d912e4780":[3,0,18,0], +"structDecodeSignal.html#a822155d9bf4ed5f3300c9e9befe606ff":[3,0,18,11], +"structDecodeSignal.html#a92db637af4e224a0ae70173050dc3f74":[3,0,18,6], +"structDecodeSignal.html#a9d37638129263b8902ba5be59baf39a8":[3,0,18,4], +"structDecodeSignal.html#aaf5d7527ddf65b6355c2b4f3626df22d":[3,0,18,1], +"structDecodeSignal.html#abdbae62a64d2df716bf60c6b67b30eaa":[3,0,18,10], +"structDecodeSignal.html#abdc4c4bb4a67a6d61d6ca81e8a52833d":[3,0,18,3], +"structDecodeSignal.html#acd4ef5ee30421d117b5756854302debb":[3,0,18,2], +"structDecodeSignal.html#ae28c905d4a2bc86419c2a8361bfea473":[3,0,18,12], +"structDecodedFrameValue.html":[3,0,15], +"structDecodedFrameValue.html#a4f51c31110dba1f73a763c596372beb0":[3,0,15,2], +"structDecodedFrameValue.html#a60dda1cc352d2c8087f0bdbc81dd266c":[3,0,15,0], +"structDecodedFrameValue.html#adae123ac7fbb4a5c314b64b01109f4a8":[3,0,15,1], +"structDecodedSignalValue.html":[3,0,16], +"structDecodedSignalValue.html#a503c90b4b1a610b8252c45e466367c28":[3,0,16,2], +"structDecodedSignalValue.html#a6847d05b3cb00d5e0f6c611968f57978":[3,0,16,3], +"structDecodedSignalValue.html#aac0ed361af545cde48d0e6f41a859686":[3,0,16,4], +"structDecodedSignalValue.html#acadc3b3bb21dd6b0412d342c7e6b20d7":[3,0,16,1], +"structDecodedSignalValue.html#affc38af1bf31bcb6f2c33044bce92bd2":[3,0,16,0], +"structFrameInfo.html":[3,0,19], +"structFrameInfo.html#a34b726afaad2ac5c697fdb2ac070cdaf":[3,0,19,2], +"structFrameInfo.html#a3f7e25d67ddae22f2ed50823a5a26084":[3,0,19,8], +"structFrameInfo.html#a4737a5420213ad4304724e39f3a4e55d":[3,0,19,4], +"structFrameInfo.html#a92749ec3798d4211a505860fb389a9e8":[3,0,19,6], +"structFrameInfo.html#aa2b198ea0f55e560c123d35e7b3ecab9":[3,0,19,5], +"structFrameInfo.html#abb53a7f93ed7abc0ea1ae4a8ccafcdcb":[3,0,19,0], +"structFrameInfo.html#ace75121294f9d89b762080ab5643293c":[3,0,19,7], +"structFrameInfo.html#aee518b33f1000bf0b7f6e4a87474c943":[3,0,19,3], +"structFrameInfo.html#af470b0742c05bfbffc31c51a68f5c05e":[3,0,19,1], +"structFrameKey.html":[3,0,20], +"structFrameKeyHasher.html":[3,0,21], +"structMultiplexing.html":[3,0,22], +"structPendingValueDescriptions.html":[3,0,23], +"structRawCanFrame.html":[3,0,24], +"structRawCanFrame.html#a0acb487612104c99c9907344c035df83":[3,0,24,2], +"structRawCanFrame.html#a2d0e7fa0e3d5c20bbed55ed8f7888ff4":[3,0,24,0], +"structRawCanFrame.html#a462193d275adc1dba8bd18ffa0e36bb7":[3,0,24,1], +"structSignalInfo.html":[3,0,25], +"structSignalInfo.html#a1008b5201f71848177217bd52fb84baa":[3,0,25,2], +"structSignalInfo.html#a1f214f03e94ef5794de2d3367bfcbd01":[3,0,25,9], +"structSignalInfo.html#a2c95562fd0b29327a7fd7b1e6feee7f3":[3,0,25,10], +"structSignalInfo.html#a379e422a00cad56f896cacf60455b088":[3,0,25,0], +"structSignalInfo.html#a43f47d0433d0cc39076bd7278b46af9c":[3,0,25,11], +"structSignalInfo.html#a52a52b320eef92fbcb4626307f9a498f":[3,0,25,4], +"structSignalInfo.html#ab7d0769f47aa540656b22e4e49db517e":[3,0,25,6], +"structSignalInfo.html#ac99ba7563a5dad01e39c4257216953f5":[3,0,25,12] }; diff --git a/docs/html/navtreeindex1.js b/docs/html/navtreeindex1.js new file mode 100644 index 0000000..4d43e87 --- /dev/null +++ b/docs/html/navtreeindex1.js @@ -0,0 +1,21 @@ +var NAVTREEINDEX1 = +{ +"structSignalInfo.html#ace290724f9801521609aedaa946d61f1":[3,0,25,1], +"structSignalInfo.html#ada7bf94fbeaa26bd08c73982b5af255b":[3,0,25,7], +"structSignalInfo.html#adf1c4331b9eabced0d7fdda40ff0eb52":[3,0,25,8], +"structSignalInfo.html#ae4f78d99a2750aa564d7eba860171499":[3,0,25,5], +"structSignalInfo.html#af363b1563fb4c7cc8973f9a80c06846c":[3,0,25,3], +"tests_2main_8cpp_source.html":[4,0,3,4], +"text__utils_8h_source.html":[4,0,0,15], +"tree__node_8cpp.html":[4,0,0,16], +"tree__node_8cpp_source.html":[4,0,0,16], +"tree__node_8h.html":[4,0,0,17], +"tree__node_8h.html#acac9cbaeea226ed297804c012dc12b16":[4,0,0,17,1], +"tree__node_8h.html#acac9cbaeea226ed297804c012dc12b16a085fea7abdc5d904fe69a3081efd7398":[4,0,0,17,1,2], +"tree__node_8h.html#acac9cbaeea226ed297804c012dc12b16a3bb3e8c8a24891ba0f7608bcc96f8b0a":[4,0,0,17,1,1], +"tree__node_8h.html#acac9cbaeea226ed297804c012dc12b16afa03eb688ad8aa1db593d33dabd89bad":[4,0,0,17,1,0], +"tree__node_8h_source.html":[4,0,0,17], +"tree__node__test_8cpp_source.html":[4,0,3,5], +"typefactory_8h_source.html":[4,0,0,18], +"value__descriptions_8h_source.html":[4,0,0,19] +}; diff --git a/docs/html/pages.html b/docs/html/pages.html index 4d8961b..dc49921 100644 --- a/docs/html/pages.html +++ b/docs/html/pages.html @@ -95,8 +95,9 @@ $(document).ready(function(){initNavTree('pages.html',''); initResizable(); }); diff --git a/docs/html/search/all_0.js b/docs/html/search/all_0.js index 3cf9a17..e9fa341 100644 --- a/docs/html/search/all_0.js +++ b/docs/html/search/all_0.js @@ -1,5 +1,10 @@ var searchData= [ - ['1_20already_20implemented_0',['Stage 1 - already implemented',['../md_README.html#autotoc_md93',1,'']]], - ['1_20parse_20and_20ui_20path_1',['1. Parse and UI path',['../md_README.html#autotoc_md4',1,'']]] + ['0_20—_202026_2006_2014_0',['v1.0 — 2026-06-14',['../md_changelog.html#autotoc_md15',1,'']]], + ['01_1',['2026-10-01',['../md_changelog.html#autotoc_md12',1,'']]], + ['03_2013_2',['Initial implementation — 2026-03-13',['../md_changelog.html#autotoc_md17',1,'']]], + ['05_3',['2026-10-05',['../md_changelog.html#autotoc_md8',1,'']]], + ['06_4',['2026-10-06',['../md_changelog.html#autotoc_md6',1,'']]], + ['06_2014_5',['v1.0 — 2026-06-14',['../md_changelog.html#autotoc_md15',1,'']]], + ['07_6',['2026-10-07',['../md_changelog.html#autotoc_md2',1,'']]] ]; diff --git a/docs/html/search/all_1.js b/docs/html/search/all_1.js index 9e702cf..6d35b2f 100644 --- a/docs/html/search/all_1.js +++ b/docs/html/search/all_1.js @@ -1,5 +1,11 @@ var searchData= [ - ['2_0',['Stage 2',['../md_README.html#autotoc_md94',1,'']]], - ['2_20runtime_20decode_20path_1',['2. Runtime decode path',['../md_README.html#autotoc_md5',1,'']]] + ['1_20already_20implemented_0',['Stage 1 - already implemented',['../md_README.html#autotoc_md111',1,'']]], + ['1_20parse_20and_20ui_20path_1',['1. Parse and UI path',['../md_README.html#autotoc_md24',1,'']]], + ['10_2001_2',['2026-10-01',['../md_changelog.html#autotoc_md12',1,'']]], + ['10_2005_3',['2026-10-05',['../md_changelog.html#autotoc_md8',1,'']]], + ['10_2006_4',['2026-10-06',['../md_changelog.html#autotoc_md6',1,'']]], + ['10_2007_5',['2026-10-07',['../md_changelog.html#autotoc_md2',1,'']]], + ['13_6',['Initial implementation — 2026-03-13',['../md_changelog.html#autotoc_md17',1,'']]], + ['14_7',['v1.0 — 2026-06-14',['../md_changelog.html#autotoc_md15',1,'']]] ]; diff --git a/docs/html/search/all_10.js b/docs/html/search/all_10.js index 1a81bd7..8e48a81 100644 --- a/docs/html/search/all_10.js +++ b/docs/html/search/all_10.js @@ -1,5 +1,8 @@ var searchData= [ - ['offset_0',['offset',['../structDecodeSignal.html#a92db637af4e224a0ae70173050dc3f74',1,'DecodeSignal::offset'],['../structSignalInfo.html#ab7d0769f47aa540656b22e4e49db517e',1,'SignalInfo::offset']]], - ['overview_1',['Overview',['../md_README.html#autotoc_md1',1,'']]] + ['name_0',['name',['../structDecodeSignal.html#a58cf5844f2272a23dcb9687d912e4780',1,'DecodeSignal::name'],['../structDecodeFrame.html#aa0a7f8fd5bfde2148dfd0d838328f579',1,'DecodeFrame::name'],['../structFrameInfo.html#abb53a7f93ed7abc0ea1ae4a8ccafcdcb',1,'FrameInfo::name'],['../structSignalInfo.html#a379e422a00cad56f896cacf60455b088',1,'SignalInfo::name']]], + ['next_20steps_1',['Recommended Next Steps',['../md_README.html#autotoc_md110',1,'']]], + ['nodetype_2',['NodeType',['../tree__node_8h.html#acac9cbaeea226ed297804c012dc12b16',1,'tree_node.h']]], + ['normalization_3',['CAN ID Normalization',['../md_README.html#autotoc_md82',1,'']]], + ['not_20enough_4',['Why the Tree Is Not Enough',['../md_README.html#autotoc_md102',1,'']]] ]; diff --git a/docs/html/search/all_11.js b/docs/html/search/all_11.js index e2bb34c..81699e8 100644 --- a/docs/html/search/all_11.js +++ b/docs/html/search/all_11.js @@ -1,21 +1,8 @@ var searchData= [ - ['parse_20and_20ui_20path_0',['1. Parse and UI path',['../md_README.html#autotoc_md4',1,'']]], - ['parse_20dbc_1',['Parse DBC',['../md_README.html#autotoc_md75',1,'']]], - ['parse_20errors_2',['parse errors',['../md_README.html#autotoc_md58',1,'Frame validation and parse errors'],['../md_README.html#autotoc_md62',1,'Signal validation and parse errors']]], - ['parsed_20data_20structures_3',['Parsed Data Structures',['../md_README.html#autotoc_md17',1,'']]], - ['parsed_20dbc_20structures_4',['Parsed DBC structures',['../md_README.html#autotoc_md10',1,'']]], - ['parsed_20representation_5',['Parsed representation',['../md_README.html#autotoc_md101',1,'']]], - ['parsefile_6',['ParseFile',['../classDbcParser.html#aef72826942c9095d653fafa435855e56',1,'DbcParser']]], - ['parser_7',['Parser',['../md_README.html#autotoc_md14',1,'']]], - ['parser_20and_20runtime_20decode_20module_20documentation_8',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]], - ['parser_20coverage_9',['Parser coverage',['../md_tests_2README.html#autotoc_md106',1,'']]], - ['parser_20support_10',['Parser Support',['../md_README.html#autotoc_md53',1,'']]], - ['path_11',['path',['../md_README.html#autotoc_md4',1,'1. Parse and UI path'],['../md_README.html#autotoc_md5',1,'2. Runtime decode path'],['../md_README.html#autotoc_md81',1,'live path'],['../md_README.html#autotoc_md82',1,'trace path']]], - ['pgn_12',['pgn',['../structFrameInfo.html#aee518b33f1000bf0b7f6e4a87474c943',1,'FrameInfo::pgn'],['../structDecodeFrame.html#a1d3c54055c0cbceb73adf551f7067f23',1,'DecodeFrame::pgn']]], - ['pgn_20extraction_13',['PGN Extraction',['../md_README.html#autotoc_md68',1,'']]], - ['physicalvalue_14',['physicalValue',['../structDecodedSignalValue.html#a6847d05b3cb00d5e0f6c611968f57978',1,'DecodedSignalValue']]], - ['precision_15',['Raw value representation and precision',['../md_README.html#autotoc_md47',1,'']]], - ['public_16',['public',['../structFrameInfo.html#a3f7e25d67ddae22f2ed50823a5a26084',1,'FrameInfo::public'],['../structDecodeFrame.html#a7f4e71bbdec3f424b625e724e3dfbf14',1,'DecodeFrame::public'],['../structDecodedFrameValue.html#adae123ac7fbb4a5c314b64b01109f4a8',1,'DecodedFrameValue::public']]], - ['purpose_17',['Purpose',['../md_README.html#autotoc_md28',1,'']]] + ['offset_0',['offset',['../structDecodeSignal.html#a92db637af4e224a0ae70173050dc3f74',1,'DecodeSignal::offset'],['../structSignalInfo.html#ab7d0769f47aa540656b22e4e49db517e',1,'SignalInfo::offset']]], + ['on_20debian_20ubuntu_1',['GCC, gcov, and LCOV on Debian/Ubuntu',['../md_README.html#autotoc_md125',1,'']]], + ['optional_20model_20tests_2',['Tree and optional model tests',['../md_tests_2README.html#autotoc_md130',1,'']]], + ['optional_20qt_20model_20adapter_3',['Optional Qt model adapter',['../md_README.html#autotoc_md118',1,'']]], + ['overview_4',['Overview',['../md_README.html#autotoc_md21',1,'']]] ]; diff --git a/docs/html/search/all_12.js b/docs/html/search/all_12.js index 8b9b038..aed6e46 100644 --- a/docs/html/search/all_12.js +++ b/docs/html/search/all_12.js @@ -1,4 +1,19 @@ var searchData= [ - ['qttest_20regression_20tests_0',['QtTest regression tests',['../md_tests_2README.html',1,'']]] + ['parse_20and_20ui_20path_0',['1. Parse and UI path',['../md_README.html#autotoc_md24',1,'']]], + ['parse_20dbc_1',['Parse DBC',['../md_README.html#autotoc_md91',1,'']]], + ['parse_20errors_2',['parse errors',['../md_README.html#autotoc_md72',1,'Frame validation and parse errors'],['../md_README.html#autotoc_md76',1,'Signal validation and parse errors']]], + ['parsed_20data_20structures_3',['Parsed Data Structures',['../md_README.html#autotoc_md31',1,'']]], + ['parsefile_4',['ParseFile',['../classDbcParser.html#aef72826942c9095d653fafa435855e56',1,'DbcParser']]], + ['parser_20and_20runtime_20decode_20module_20documentation_5',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]], + ['parser_20coverage_6',['Parser coverage',['../md_tests_2README.html#autotoc_md129',1,'']]], + ['parser_20support_7',['Parser Support',['../md_README.html#autotoc_md67',1,'']]], + ['path_8',['path',['../md_README.html#autotoc_md24',1,'1. Parse and UI path'],['../md_README.html#autotoc_md25',1,'2. Runtime decode path'],['../md_README.html#autotoc_md97',1,'live path'],['../md_README.html#autotoc_md98',1,'trace path']]], + ['pendingvaluedescriptions_9',['PendingValueDescriptions',['../structPendingValueDescriptions.html',1,'']]], + ['pgn_10',['pgn',['../structFrameInfo.html#aee518b33f1000bf0b7f6e4a87474c943',1,'FrameInfo::pgn'],['../structDecodeFrame.html#a1d3c54055c0cbceb73adf551f7067f23',1,'DecodeFrame::pgn']]], + ['pgn_20extraction_11',['PGN Extraction',['../md_README.html#autotoc_md84',1,'']]], + ['physicalvalue_12',['physicalValue',['../structDecodedSignalValue.html#a6847d05b3cb00d5e0f6c611968f57978',1,'DecodedSignalValue']]], + ['precision_13',['Raw value representation and precision',['../md_README.html#autotoc_md61',1,'']]], + ['public_14',['public',['../structFrameInfo.html#a3f7e25d67ddae22f2ed50823a5a26084',1,'FrameInfo::public'],['../structDecodeFrame.html#a7f4e71bbdec3f424b625e724e3dfbf14',1,'DecodeFrame::public'],['../structDecodedFrameValue.html#adae123ac7fbb4a5c314b64b01109f4a8',1,'DecodedFrameValue::public']]], + ['purpose_15',['Purpose',['../md_README.html#autotoc_md42',1,'']]] ]; diff --git a/docs/html/search/all_13.js b/docs/html/search/all_13.js index 9cf117e..4b441b3 100644 --- a/docs/html/search/all_13.js +++ b/docs/html/search/all_13.js @@ -1,22 +1,8 @@ var searchData= [ - ['raw_20frame_0',['Decode a raw frame',['../md_README.html#autotoc_md78',1,'']]], - ['raw_20value_20representation_20and_20precision_1',['Raw value representation and precision',['../md_README.html#autotoc_md47',1,'']]], - ['rawcanframe_2',['RawCanFrame',['../structRawCanFrame.html',1,'']]], - ['rawcanframe_20tt_3',['<tt>RawCanFrame</tt>',['../md_README.html#autotoc_md43',1,'']]], - ['rawvalue_4',['rawValue',['../structDecodedSignalValue.html#a95db4f7f93b5f311e8f272833e45055e',1,'DecodedSignalValue']]], - ['receivers_5',['receivers',['../structDecodeSignal.html#abdbae62a64d2df716bf60c6b67b30eaa',1,'DecodeSignal::receivers'],['../structSignalInfo.html#a2c95562fd0b29327a7fd7b1e6feee7f3',1,'SignalInfo::receivers']]], - ['recommended_20next_20steps_6',['Recommended Next Steps',['../md_README.html#autotoc_md92',1,'']]], - ['registertype_7',['registerType',['../classTypeFactory.html#ad6d85795285ee21193ac03e1b24762d3',1,'TypeFactory']]], - ['regression_20tests_8',['regression tests',['../md_tests_2README.html',1,'QtTest regression tests'],['../md_README.html#autotoc_md103',1,'Regression tests']]], - ['representation_9',['representation',['../md_README.html#autotoc_md101',1,'Parsed representation'],['../md_README.html#autotoc_md102',1,'Runtime decode representation']]], - ['representation_20and_20precision_10',['Raw value representation and precision',['../md_README.html#autotoc_md47',1,'']]], - ['runtime_20decode_20database_11',['Build runtime decode database',['../md_README.html#autotoc_md77',1,'']]], - ['runtime_20decode_20layer_12',['Runtime Decode Layer',['../md_README.html#autotoc_md27',1,'']]], - ['runtime_20decode_20layer_20exists_13',['Why the Runtime Decode Layer Exists',['../md_README.html#autotoc_md7',1,'']]], - ['runtime_20decode_20module_20documentation_14',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]], - ['runtime_20decode_20path_15',['2. Runtime decode path',['../md_README.html#autotoc_md5',1,'']]], - ['runtime_20decode_20representation_16',['Runtime decode representation',['../md_README.html#autotoc_md102',1,'']]], - ['runtime_20decode_20structures_17',['Runtime decode structures',['../md_README.html#autotoc_md12',1,'']]], - ['runtime_20decoder_18',['Runtime decoder',['../md_README.html#autotoc_md13',1,'']]] + ['qt_0',['Standalone tree tests without Qt',['../md_README.html#autotoc_md119',1,'']]], + ['qt_20creator_1',['Configure the GCC coverage build in Qt Creator',['../md_README.html#autotoc_md126',1,'']]], + ['qt_20libraries_2',['Build core without Qt libraries',['../md_README.html#autotoc_md117',1,'']]], + ['qt_20model_20adapter_3',['Optional Qt model adapter',['../md_README.html#autotoc_md118',1,'']]], + ['qttest_20regression_20tests_4',['QtTest regression tests',['../md_tests_2README.html',1,'']]] ]; diff --git a/docs/html/search/all_14.js b/docs/html/search/all_14.js index 586734f..a977bd9 100644 --- a/docs/html/search/all_14.js +++ b/docs/html/search/all_14.js @@ -1,21 +1,20 @@ var searchData= [ - ['signal_20definition_0',['Signal definition',['../md_README.html#autotoc_md60',1,'']]], - ['signal_20validation_20and_20parse_20errors_1',['Signal validation and parse errors',['../md_README.html#autotoc_md62',1,'']]], - ['signal_5finfo_2eh_2',['signal_info.h',['../signal__info_8h.html',1,'']]], - ['signalinfo_3',['SignalInfo',['../structSignalInfo.html',1,'']]], - ['signalinfo_20tt_4',['<tt>SignalInfo</tt>',['../md_README.html#autotoc_md18',1,'']]], - ['stage_201_20already_20implemented_5',['Stage 1 - already implemented',['../md_README.html#autotoc_md93',1,'']]], - ['stage_202_6',['Stage 2',['../md_README.html#autotoc_md94',1,'']]], - ['stage_203_7',['Stage 3',['../md_README.html#autotoc_md95',1,'']]], - ['stage_204_8',['Stage 4',['../md_README.html#autotoc_md96',1,'']]], - ['startbit_9',['startbit',['../structSignalInfo.html#ace290724f9801521609aedaa946d61f1',1,'SignalInfo::startBit'],['../structDecodeSignal.html#aaf5d7527ddf65b6355c2b4f3626df22d',1,'DecodeSignal::startBit']]], - ['statement_20handler_20factory_10',['Statement Handler Factory',['../md_README.html#autotoc_md88',1,'']]], - ['steps_11',['Recommended Next Steps',['../md_README.html#autotoc_md92',1,'']]], - ['strategy_12',['Unified Decode Strategy',['../md_README.html#autotoc_md80',1,'']]], - ['structures_13',['structures',['../md_README.html#autotoc_md17',1,'Parsed Data Structures'],['../md_README.html#autotoc_md10',1,'Parsed DBC structures'],['../md_README.html#autotoc_md12',1,'Runtime decode structures'],['../md_README.html#autotoc_md11',1,'UI tree structures']]], - ['summary_14',['Summary',['../md_README.html#autotoc_md100',1,'']]], - ['support_15',['Parser Support',['../md_README.html#autotoc_md53',1,'']]], - ['supported_20dbc_20syntax_16',['Supported DBC Syntax',['../md_README.html#autotoc_md55',1,'']]], - ['syntax_17',['Supported DBC Syntax',['../md_README.html#autotoc_md55',1,'']]] + ['raw_20frame_0',['Decode a raw frame',['../md_README.html#autotoc_md94',1,'']]], + ['raw_20value_20representation_20and_20precision_1',['Raw value representation and precision',['../md_README.html#autotoc_md61',1,'']]], + ['rawcanframe_2',['RawCanFrame',['../structRawCanFrame.html',1,'']]], + ['rawcanframe_20tt_3',['<tt>RawCanFrame</tt>',['../md_README.html#autotoc_md57',1,'']]], + ['rawvalue_4',['rawValue',['../structDecodedSignalValue.html#a503c90b4b1a610b8252c45e466367c28',1,'DecodedSignalValue']]], + ['receivers_5',['receivers',['../structDecodeSignal.html#abdbae62a64d2df716bf60c6b67b30eaa',1,'DecodeSignal::receivers'],['../structSignalInfo.html#a2c95562fd0b29327a7fd7b1e6feee7f3',1,'SignalInfo::receivers']]], + ['recommended_20next_20steps_6',['Recommended Next Steps',['../md_README.html#autotoc_md110',1,'']]], + ['registertype_7',['registerType',['../classTypeFactory.html#ad6d85795285ee21193ac03e1b24762d3',1,'TypeFactory']]], + ['regression_20coverage_8',['Additional regression coverage',['../md_tests_2README.html#autotoc_md131',1,'']]], + ['regression_20tests_9',['regression tests',['../md_tests_2README.html',1,'QtTest regression tests'],['../md_README.html#autotoc_md123',1,'Regression tests']]], + ['representation_20and_20precision_10',['Raw value representation and precision',['../md_README.html#autotoc_md61',1,'']]], + ['run_20the_20demo_11',['Build and run the demo',['../md_README.html#autotoc_md120',1,'']]], + ['runtime_20decode_20database_12',['Build runtime decode database',['../md_README.html#autotoc_md93',1,'']]], + ['runtime_20decode_20layer_13',['Runtime Decode Layer',['../md_README.html#autotoc_md41',1,'']]], + ['runtime_20decode_20layer_20exists_14',['Why the Runtime Decode Layer Exists',['../md_README.html#autotoc_md27',1,'']]], + ['runtime_20decode_20module_20documentation_15',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]], + ['runtime_20decode_20path_16',['2. Runtime decode path',['../md_README.html#autotoc_md25',1,'']]] ]; diff --git a/docs/html/search/all_15.js b/docs/html/search/all_15.js index 722a0b2..8142f02 100644 --- a/docs/html/search/all_15.js +++ b/docs/html/search/all_15.js @@ -1,32 +1,22 @@ var searchData= [ - ['tests_0',['tests',['../md_tests_2README.html',1,'QtTest regression tests'],['../md_README.html#autotoc_md103',1,'Regression tests']]], - ['the_20runtime_20decode_20layer_20exists_1',['Why the Runtime Decode Layer Exists',['../md_README.html#autotoc_md7',1,'']]], - ['the_20tree_20is_20not_20enough_2',['Why the Tree Is Not Enough',['../md_README.html#autotoc_md86',1,'']]], - ['trace_20path_3',['trace path',['../md_README.html#autotoc_md82',1,'']]], - ['transmitter_4',['transmitter',['../structFrameInfo.html#a92749ec3798d4211a505860fb389a9e8',1,'FrameInfo::transmitter'],['../structDecodeFrame.html#ad78241dc40c793aabb8495b6989b81a9',1,'DecodeFrame::transmitter']]], - ['tree_5',['Build UI tree',['../md_README.html#autotoc_md76',1,'']]], - ['tree_20is_20not_20enough_6',['Why the Tree Is Not Enough',['../md_README.html#autotoc_md86',1,'']]], - ['tree_20layer_7',['UI Tree Layer',['../md_README.html#autotoc_md24',1,'']]], - ['tree_20structures_8',['UI tree structures',['../md_README.html#autotoc_md11',1,'']]], - ['tree_5fnode_2ecpp_9',['tree_node.cpp',['../tree__node_8cpp.html',1,'']]], - ['tree_5fnode_2eh_10',['tree_node.h',['../tree__node_8h.html',1,'']]], - ['treenode_11',['treenode',['../classTreeNode.html#a984a98d5ccf7ef1f5a18094c6821f35d',1,'TreeNode::TreeNode()'],['../classTreeNode.html#a8e38dd591d8801d7ee3a7dbad90c67fc',1,'TreeNode::TreeNode(const FrameInfo &frame)'],['../classTreeNode.html#ab9f00f5253d56461bb2d420fd639c5ae',1,'TreeNode::TreeNode(const SignalInfo &signal)'],['../classTreeNode.html',1,'TreeNode']]], - ['treenode_20tt_12',['<tt>TreeNode</tt>',['../md_README.html#autotoc_md25',1,'']]], - ['tt_20byteorder_20tt_13',['<tt>ByteOrder</tt>',['../md_README.html#autotoc_md30',1,'']]], - ['tt_20dbcdatabase_20tt_14',['<tt>DbcDatabase</tt>',['../md_README.html#autotoc_md22',1,'']]], - ['tt_20dbcdecoder_20tt_15',['<tt>DbcDecoder</tt>',['../md_README.html#autotoc_md51',1,'']]], - ['tt_20decodedatabase_20tt_16',['<tt>DecodeDatabase</tt>',['../md_README.html#autotoc_md40',1,'']]], - ['tt_20decodedframevalue_20tt_17',['<tt>DecodedFrameValue</tt>',['../md_README.html#autotoc_md49',1,'']]], - ['tt_20decodedsignalvalue_20tt_18',['<tt>DecodedSignalValue</tt>',['../md_README.html#autotoc_md45',1,'']]], - ['tt_20decodeframe_20tt_19',['<tt>DecodeFrame</tt>',['../md_README.html#autotoc_md36',1,'']]], - ['tt_20decodesignal_20tt_20',['<tt>DecodeSignal</tt>',['../md_README.html#autotoc_md34',1,'']]], - ['tt_20frameinfo_20tt_21',['<tt>FrameInfo</tt>',['../md_README.html#autotoc_md20',1,'']]], - ['tt_20framekey_20tt_22',['<tt>FrameKey</tt>',['../md_README.html#autotoc_md38',1,'']]], - ['tt_20rawcanframe_20tt_23',['<tt>RawCanFrame</tt>',['../md_README.html#autotoc_md43',1,'']]], - ['tt_20signalinfo_20tt_24',['<tt>SignalInfo</tt>',['../md_README.html#autotoc_md18',1,'']]], - ['tt_20treenode_20tt_25',['<tt>TreeNode</tt>',['../md_README.html#autotoc_md25',1,'']]], - ['tt_20valuetype_20tt_26',['<tt>ValueType</tt>',['../md_README.html#autotoc_md32',1,'']]], - ['typefactory_27',['TypeFactory',['../classTypeFactory.html',1,'']]], - ['typefactory_3c_20std_3a_3astring_2c_20dbcstatementhandler_20_3e_28',['TypeFactory< std::string, DbcStatementHandler >',['../classTypeFactory.html',1,'']]] + ['signal_20definition_0',['Signal definition',['../md_README.html#autotoc_md74',1,'']]], + ['signal_20validation_20and_20parse_20errors_1',['Signal validation and parse errors',['../md_README.html#autotoc_md76',1,'']]], + ['signal_20value_20descriptions_20tt_20val_5f_20tt_2',['Signal value descriptions (<tt>VAL_</tt>)',['../md_README.html#autotoc_md106',1,'']]], + ['signal_5finfo_2eh_3',['signal_info.h',['../signal__info_8h.html',1,'']]], + ['signalinfo_4',['SignalInfo',['../structSignalInfo.html',1,'']]], + ['signalinfo_20tt_5',['<tt>SignalInfo</tt>',['../md_README.html#autotoc_md32',1,'']]], + ['stage_201_20already_20implemented_6',['Stage 1 - already implemented',['../md_README.html#autotoc_md111',1,'']]], + ['stage_202_7',['Stage 2',['../md_README.html#autotoc_md112',1,'']]], + ['stage_203_8',['Stage 3',['../md_README.html#autotoc_md113',1,'']]], + ['stage_204_9',['Stage 4',['../md_README.html#autotoc_md114',1,'']]], + ['standalone_20tree_20tests_20without_20qt_10',['Standalone tree tests without Qt',['../md_README.html#autotoc_md119',1,'']]], + ['startbit_11',['startbit',['../structSignalInfo.html#ace290724f9801521609aedaa946d61f1',1,'SignalInfo::startBit'],['../structDecodeSignal.html#aaf5d7527ddf65b6355c2b4f3626df22d',1,'DecodeSignal::startBit']]], + ['statement_20handler_20factory_12',['Statement Handler Factory',['../md_README.html#autotoc_md104',1,'']]], + ['steps_13',['Recommended Next Steps',['../md_README.html#autotoc_md110',1,'']]], + ['strategy_14',['Unified Decode Strategy',['../md_README.html#autotoc_md96',1,'']]], + ['structures_15',['Parsed Data Structures',['../md_README.html#autotoc_md31',1,'']]], + ['support_16',['Parser Support',['../md_README.html#autotoc_md67',1,'']]], + ['supported_20dbc_20syntax_17',['Supported DBC Syntax',['../md_README.html#autotoc_md69',1,'']]], + ['syntax_18',['Supported DBC Syntax',['../md_README.html#autotoc_md69',1,'']]] ]; diff --git a/docs/html/search/all_16.js b/docs/html/search/all_16.js index ae1a27c..38b12ae 100644 --- a/docs/html/search/all_16.js +++ b/docs/html/search/all_16.js @@ -1,11 +1,37 @@ var searchData= [ - ['ui_20path_0',['1. Parse and UI path',['../md_README.html#autotoc_md4',1,'']]], - ['ui_20tree_1',['Build UI tree',['../md_README.html#autotoc_md76',1,'']]], - ['ui_20tree_20layer_2',['UI Tree Layer',['../md_README.html#autotoc_md24',1,'']]], - ['ui_20tree_20structures_3',['UI tree structures',['../md_README.html#autotoc_md11',1,'']]], - ['unified_20decode_20strategy_4',['Unified Decode Strategy',['../md_README.html#autotoc_md80',1,'']]], - ['unit_5',['unit',['../structDecodeSignal.html#a38eed9ca7581423fd8bfbedcffc12092',1,'DecodeSignal::unit'],['../structSignalInfo.html#a1f214f03e94ef5794de2d3367bfcbd01',1,'SignalInfo::unit']]], - ['usage_6',['Example Usage',['../md_README.html#autotoc_md74',1,'']]], - ['use_20in_20frametap_7',['Intended Use in FrameTap',['../md_README.html#autotoc_md84',1,'']]] + ['tests_0',['tests',['../md_tests_2README.html',1,'QtTest regression tests'],['../md_README.html#autotoc_md123',1,'Regression tests'],['../md_tests_2README.html#autotoc_md130',1,'Tree and optional model tests']]], + ['tests_20without_20qt_1',['Standalone tree tests without Qt',['../md_README.html#autotoc_md119',1,'']]], + ['the_20demo_2',['Build and run the demo',['../md_README.html#autotoc_md120',1,'']]], + ['the_20gcc_20coverage_20build_20in_20qt_20creator_3',['Configure the GCC coverage build in Qt Creator',['../md_README.html#autotoc_md126',1,'']]], + ['the_20runtime_20decode_20layer_20exists_4',['Why the Runtime Decode Layer Exists',['../md_README.html#autotoc_md27',1,'']]], + ['the_20tree_20is_20not_20enough_5',['Why the Tree Is Not Enough',['../md_README.html#autotoc_md102',1,'']]], + ['trace_20path_6',['trace path',['../md_README.html#autotoc_md98',1,'']]], + ['transmitter_7',['transmitter',['../structFrameInfo.html#a92749ec3798d4211a505860fb389a9e8',1,'FrameInfo::transmitter'],['../structDecodeFrame.html#ad78241dc40c793aabb8495b6989b81a9',1,'DecodeFrame::transmitter']]], + ['tree_8',['Build UI tree',['../md_README.html#autotoc_md92',1,'']]], + ['tree_20and_20optional_20model_20tests_9',['Tree and optional model tests',['../md_tests_2README.html#autotoc_md130',1,'']]], + ['tree_20is_20not_20enough_10',['Why the Tree Is Not Enough',['../md_README.html#autotoc_md102',1,'']]], + ['tree_20layer_11',['UI Tree Layer',['../md_README.html#autotoc_md38',1,'']]], + ['tree_20tests_20without_20qt_12',['Standalone tree tests without Qt',['../md_README.html#autotoc_md119',1,'']]], + ['tree_5fnode_2ecpp_13',['tree_node.cpp',['../tree__node_8cpp.html',1,'']]], + ['tree_5fnode_2eh_14',['tree_node.h',['../tree__node_8h.html',1,'']]], + ['treenode_15',['treenode',['../classTreeNode.html#ab9f00f5253d56461bb2d420fd639c5ae',1,'TreeNode::TreeNode()'],['../classTreeNode.html',1,'TreeNode'],['../classTreeNode.html#a984a98d5ccf7ef1f5a18094c6821f35d',1,'TreeNode::TreeNode()'],['../classTreeNode.html#a8e38dd591d8801d7ee3a7dbad90c67fc',1,'TreeNode::TreeNode(const FrameInfo &frame)']]], + ['treenode_20tt_16',['<tt>TreeNode</tt>',['../md_README.html#autotoc_md39',1,'']]], + ['tt_20byteorder_20tt_17',['<tt>ByteOrder</tt>',['../md_README.html#autotoc_md44',1,'']]], + ['tt_20dbcdatabase_20tt_18',['<tt>DbcDatabase</tt>',['../md_README.html#autotoc_md36',1,'']]], + ['tt_20dbcdecoder_20tt_19',['<tt>DbcDecoder</tt>',['../md_README.html#autotoc_md65',1,'']]], + ['tt_20decodedatabase_20tt_20',['<tt>DecodeDatabase</tt>',['../md_README.html#autotoc_md54',1,'']]], + ['tt_20decodedframevalue_20tt_21',['<tt>DecodedFrameValue</tt>',['../md_README.html#autotoc_md63',1,'']]], + ['tt_20decodedsignalvalue_20tt_22',['<tt>DecodedSignalValue</tt>',['../md_README.html#autotoc_md59',1,'']]], + ['tt_20decodeframe_20tt_23',['<tt>DecodeFrame</tt>',['../md_README.html#autotoc_md50',1,'']]], + ['tt_20decodesignal_20tt_24',['<tt>DecodeSignal</tt>',['../md_README.html#autotoc_md48',1,'']]], + ['tt_20frameinfo_20tt_25',['<tt>FrameInfo</tt>',['../md_README.html#autotoc_md34',1,'']]], + ['tt_20framekey_20tt_26',['<tt>FrameKey</tt>',['../md_README.html#autotoc_md52',1,'']]], + ['tt_20rawcanframe_20tt_27',['<tt>RawCanFrame</tt>',['../md_README.html#autotoc_md57',1,'']]], + ['tt_20signalinfo_20tt_28',['<tt>SignalInfo</tt>',['../md_README.html#autotoc_md32',1,'']]], + ['tt_20treenode_20tt_29',['<tt>TreeNode</tt>',['../md_README.html#autotoc_md39',1,'']]], + ['tt_20val_5f_20tt_30',['Signal value descriptions (<tt>VAL_</tt>)',['../md_README.html#autotoc_md106',1,'']]], + ['tt_20valuetype_20tt_31',['<tt>ValueType</tt>',['../md_README.html#autotoc_md46',1,'']]], + ['typefactory_32',['TypeFactory',['../classTypeFactory.html',1,'']]], + ['typefactory_3c_20std_3a_3astring_2c_20dbcstatementhandler_20_3e_33',['TypeFactory< std::string, DbcStatementHandler >',['../classTypeFactory.html',1,'']]] ]; diff --git a/docs/html/search/all_17.js b/docs/html/search/all_17.js index 3f0906c..27f635c 100644 --- a/docs/html/search/all_17.js +++ b/docs/html/search/all_17.js @@ -1,8 +1,12 @@ var searchData= [ - ['valid_0',['valid',['../structDecodedSignalValue.html#aac0ed361af545cde48d0e6f41a859686',1,'DecodedSignalValue::valid'],['../structDecodedFrameValue.html#a4f51c31110dba1f73a763c596372beb0',1,'DecodedFrameValue::valid']]], - ['validation_20and_20parse_20errors_1',['validation and parse errors',['../md_README.html#autotoc_md58',1,'Frame validation and parse errors'],['../md_README.html#autotoc_md62',1,'Signal validation and parse errors']]], - ['value_20representation_20and_20precision_2',['Raw value representation and precision',['../md_README.html#autotoc_md47',1,'']]], - ['valuetype_3',['valuetype',['../structDecodeSignal.html#a9d37638129263b8902ba5be59baf39a8',1,'DecodeSignal::valueType'],['../decode__database_8h.html#ad9971b6ef33e02ba2c75d19c1d2518a1',1,'ValueType: decode_database.h']]], - ['valuetype_20tt_4',['<tt>ValueType</tt>',['../md_README.html#autotoc_md32',1,'']]] + ['ubuntu_0',['GCC, gcov, and LCOV on Debian/Ubuntu',['../md_README.html#autotoc_md125',1,'']]], + ['ui_20path_1',['1. Parse and UI path',['../md_README.html#autotoc_md24',1,'']]], + ['ui_20tree_2',['Build UI tree',['../md_README.html#autotoc_md92',1,'']]], + ['ui_20tree_20layer_3',['UI Tree Layer',['../md_README.html#autotoc_md38',1,'']]], + ['unified_20decode_20strategy_4',['Unified Decode Strategy',['../md_README.html#autotoc_md96',1,'']]], + ['unit_5',['unit',['../structDecodeSignal.html#a38eed9ca7581423fd8bfbedcffc12092',1,'DecodeSignal::unit'],['../structSignalInfo.html#a1f214f03e94ef5794de2d3367bfcbd01',1,'SignalInfo::unit']]], + ['unreleased_6',['Unreleased',['../md_changelog.html#autotoc_md1',1,'']]], + ['usage_7',['Example Usage',['../md_README.html#autotoc_md90',1,'']]], + ['use_20in_20frametap_8',['Intended Use in FrameTap',['../md_README.html#autotoc_md100',1,'']]] ]; diff --git a/docs/html/search/all_18.js b/docs/html/search/all_18.js index de2f9a0..722fe35 100644 --- a/docs/html/search/all_18.js +++ b/docs/html/search/all_18.js @@ -1,5 +1,12 @@ var searchData= [ - ['why_20the_20runtime_20decode_20layer_20exists_0',['Why the Runtime Decode Layer Exists',['../md_README.html#autotoc_md7',1,'']]], - ['why_20the_20tree_20is_20not_20enough_1',['Why the Tree Is Not Enough',['../md_README.html#autotoc_md86',1,'']]] + ['v1_200_20—_202026_2006_2014_0',['v1.0 — 2026-06-14',['../md_changelog.html#autotoc_md15',1,'']]], + ['val_5f_20tt_1',['Signal value descriptions (<tt>VAL_</tt>)',['../md_README.html#autotoc_md106',1,'']]], + ['valid_2',['valid',['../structDecodedSignalValue.html#aac0ed361af545cde48d0e6f41a859686',1,'DecodedSignalValue::valid'],['../structDecodedFrameValue.html#a4f51c31110dba1f73a763c596372beb0',1,'DecodedFrameValue::valid']]], + ['validation_20and_20parse_20errors_3',['validation and parse errors',['../md_README.html#autotoc_md72',1,'Frame validation and parse errors'],['../md_README.html#autotoc_md76',1,'Signal validation and parse errors']]], + ['value_20descriptions_20tt_20val_5f_20tt_4',['Signal value descriptions (<tt>VAL_</tt>)',['../md_README.html#autotoc_md106',1,'']]], + ['value_20representation_20and_20precision_5',['Raw value representation and precision',['../md_README.html#autotoc_md61',1,'']]], + ['valuedescriptions_6',['valuedescriptions',['../structDecodeSignal.html#a822155d9bf4ed5f3300c9e9befe606ff',1,'DecodeSignal::valueDescriptions'],['../structSignalInfo.html#a43f47d0433d0cc39076bd7278b46af9c',1,'SignalInfo::valueDescriptions']]], + ['valuetype_7',['valuetype',['../structDecodeSignal.html#a9d37638129263b8902ba5be59baf39a8',1,'DecodeSignal::valueType'],['../decode__database_8h.html#ad9971b6ef33e02ba2c75d19c1d2518a1',1,'ValueType: decode_database.h']]], + ['valuetype_20tt_8',['<tt>ValueType</tt>',['../md_README.html#autotoc_md46',1,'']]] ]; diff --git a/docs/html/search/all_19.js b/docs/html/search/all_19.js new file mode 100644 index 0000000..79d959e --- /dev/null +++ b/docs/html/search/all_19.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['why_20the_20runtime_20decode_20layer_20exists_0',['Why the Runtime Decode Layer Exists',['../md_README.html#autotoc_md27',1,'']]], + ['why_20the_20tree_20is_20not_20enough_1',['Why the Tree Is Not Enough',['../md_README.html#autotoc_md102',1,'']]], + ['without_20qt_2',['Standalone tree tests without Qt',['../md_README.html#autotoc_md119',1,'']]], + ['without_20qt_20libraries_3',['Build core without Qt libraries',['../md_README.html#autotoc_md117',1,'']]] +]; diff --git a/docs/html/search/all_1a.js b/docs/html/search/all_1a.js new file mode 100644 index 0000000..46abc98 --- /dev/null +++ b/docs/html/search/all_1a.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['—_202026_2003_2013_0',['Initial implementation — 2026-03-13',['../md_changelog.html#autotoc_md17',1,'']]], + ['—_202026_2006_2014_1',['v1.0 — 2026-06-14',['../md_changelog.html#autotoc_md15',1,'']]] +]; diff --git a/docs/html/search/all_2.js b/docs/html/search/all_2.js index fe24327..e74d65d 100644 --- a/docs/html/search/all_2.js +++ b/docs/html/search/all_2.js @@ -1,4 +1,11 @@ var searchData= [ - ['3_0',['Stage 3',['../md_README.html#autotoc_md95',1,'']]] + ['2_0',['Stage 2',['../md_README.html#autotoc_md112',1,'']]], + ['2_20runtime_20decode_20path_1',['2. Runtime decode path',['../md_README.html#autotoc_md25',1,'']]], + ['2026_2003_2013_2',['Initial implementation — 2026-03-13',['../md_changelog.html#autotoc_md17',1,'']]], + ['2026_2006_2014_3',['v1.0 — 2026-06-14',['../md_changelog.html#autotoc_md15',1,'']]], + ['2026_2010_2001_4',['2026-10-01',['../md_changelog.html#autotoc_md12',1,'']]], + ['2026_2010_2005_5',['2026-10-05',['../md_changelog.html#autotoc_md8',1,'']]], + ['2026_2010_2006_6',['2026-10-06',['../md_changelog.html#autotoc_md6',1,'']]], + ['2026_2010_2007_7',['2026-10-07',['../md_changelog.html#autotoc_md2',1,'']]] ]; diff --git a/docs/html/search/all_3.js b/docs/html/search/all_3.js index cd5d84a..6b2dc85 100644 --- a/docs/html/search/all_3.js +++ b/docs/html/search/all_3.js @@ -1,4 +1,4 @@ var searchData= [ - ['4_0',['Stage 4',['../md_README.html#autotoc_md96',1,'']]] + ['3_0',['Stage 3',['../md_README.html#autotoc_md113',1,'']]] ]; diff --git a/docs/html/search/all_4.js b/docs/html/search/all_4.js index 1ea8a6f..e823a76 100644 --- a/docs/html/search/all_4.js +++ b/docs/html/search/all_4.js @@ -1,12 +1,4 @@ var searchData= [ - ['a_20raw_20frame_0',['Decode a raw frame',['../md_README.html#autotoc_md78',1,'']]], - ['addchild_1',['AddChild',['../classTreeNode.html#a6161f2ebb92184eab4215d121870e788',1,'TreeNode']]], - ['already_20implemented_2',['Stage 1 - already implemented',['../md_README.html#autotoc_md93',1,'']]], - ['and_20motorola_20extraction_3',['Intel and Motorola Extraction',['../md_README.html#autotoc_md72',1,'']]], - ['and_20parse_20errors_4',['and parse errors',['../md_README.html#autotoc_md58',1,'Frame validation and parse errors'],['../md_README.html#autotoc_md62',1,'Signal validation and parse errors']]], - ['and_20precision_5',['Raw value representation and precision',['../md_README.html#autotoc_md47',1,'']]], - ['and_20runtime_20decode_20module_20documentation_6',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]], - ['and_20ui_20path_7',['1. Parse and UI path',['../md_README.html#autotoc_md4',1,'']]], - ['architecture_8',['High-Level Architecture',['../md_README.html#autotoc_md3',1,'']]] + ['4_0',['Stage 4',['../md_README.html#autotoc_md114',1,'']]] ]; diff --git a/docs/html/search/all_5.js b/docs/html/search/all_5.js index ed4c7f2..23ff0b7 100644 --- a/docs/html/search/all_5.js +++ b/docs/html/search/all_5.js @@ -1,9 +1,20 @@ var searchData= [ - ['build_0',['build',['../classDbcDecodeBuilder.html#a2bc6386dfb5e58976c42e22c19ec471b',1,'DbcDecodeBuilder::Build()'],['../classDbcTreeBuilder.html#a7e57d067d831b14b383947fd125edd4b',1,'DbcTreeBuilder::Build()']]], - ['build_20integration_1',['Build Integration',['../md_README.html#autotoc_md98',1,'']]], - ['build_20runtime_20decode_20database_2',['Build runtime decode database',['../md_README.html#autotoc_md77',1,'']]], - ['build_20ui_20tree_3',['Build UI tree',['../md_README.html#autotoc_md76',1,'']]], - ['byteorder_4',['byteorder',['../structDecodeSignal.html#abdc4c4bb4a67a6d61d6ca81e8a52833d',1,'DecodeSignal::byteOrder'],['../decode__database_8h.html#aaeb92d42f5a6e27b8ba19f18d69d142b',1,'ByteOrder: decode_database.h']]], - ['byteorder_20tt_5',['<tt>ByteOrder</tt>',['../md_README.html#autotoc_md30',1,'']]] + ['a_20raw_20frame_0',['Decode a raw frame',['../md_README.html#autotoc_md94',1,'']]], + ['adapter_1',['Optional Qt model adapter',['../md_README.html#autotoc_md118',1,'']]], + ['addchild_2',['AddChild',['../classTreeNode.html#a6161f2ebb92184eab4215d121870e788',1,'TreeNode']]], + ['added_3',['added',['../md_changelog.html#autotoc_md3',1,'Added'],['../md_changelog.html#autotoc_md7',1,'Added'],['../md_changelog.html#autotoc_md18',1,'Added']]], + ['additional_20regression_20coverage_4',['Additional regression coverage',['../md_tests_2README.html#autotoc_md131',1,'']]], + ['already_20implemented_5',['Stage 1 - already implemented',['../md_README.html#autotoc_md111',1,'']]], + ['and_20lcov_20on_20debian_20ubuntu_6',['GCC, gcov, and LCOV on Debian/Ubuntu',['../md_README.html#autotoc_md125',1,'']]], + ['and_20maintenance_7',['and maintenance',['../md_changelog.html#autotoc_md11',1,'Documentation and maintenance'],['../md_changelog.html#autotoc_md19',1,'Documentation and maintenance']]], + ['and_20motorola_20extraction_8',['Intel and Motorola Extraction',['../md_README.html#autotoc_md88',1,'']]], + ['and_20optional_20model_20tests_9',['Tree and optional model tests',['../md_tests_2README.html#autotoc_md130',1,'']]], + ['and_20parse_20errors_10',['and parse errors',['../md_README.html#autotoc_md72',1,'Frame validation and parse errors'],['../md_README.html#autotoc_md76',1,'Signal validation and parse errors']]], + ['and_20precision_11',['Raw value representation and precision',['../md_README.html#autotoc_md61',1,'']]], + ['and_20run_20the_20demo_12',['Build and run the demo',['../md_README.html#autotoc_md120',1,'']]], + ['and_20runtime_20decode_20module_20documentation_13',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]], + ['and_20ui_20path_14',['1. Parse and UI path',['../md_README.html#autotoc_md24',1,'']]], + ['api_20documentation_15',['Generate API documentation',['../md_README.html#autotoc_md121',1,'']]], + ['architecture_16',['High-Level Architecture',['../md_README.html#autotoc_md23',1,'']]] ]; diff --git a/docs/html/search/all_6.js b/docs/html/search/all_6.js index 1af75ab..ddc58fc 100644 --- a/docs/html/search/all_6.js +++ b/docs/html/search/all_6.js @@ -1,12 +1,13 @@ var searchData= [ - ['can_20id_20normalization_0',['CAN ID Normalization',['../md_README.html#autotoc_md66',1,'']]], - ['canid_1',['canid',['../structRawCanFrame.html#a2d0e7fa0e3d5c20bbed55ed8f7888ff4',1,'RawCanFrame::canId'],['../structDecodeFrame.html#a52e10215388db7df8b541b9d9909edcf',1,'DecodeFrame::canId'],['../structFrameInfo.html#af470b0742c05bfbffc31c51a68f5c05e',1,'FrameInfo::canId']]], - ['comment_2',['comment',['../structDecodeSignal.html#ae28c905d4a2bc86419c2a8361bfea473',1,'DecodeSignal::comment'],['../structDecodeFrame.html#a25819ef907a32391af5c9f7cae9cdb22',1,'DecodeFrame::comment'],['../structFrameInfo.html#ace75121294f9d89b762080ab5643293c',1,'FrameInfo::comment'],['../structSignalInfo.html#ac99ba7563a5dad01e39c4257216953f5',1,'SignalInfo::comment']]], - ['comments_3',['Comments',['../md_README.html#autotoc_md64',1,'']]], - ['contains_4',['contains',['../classTypeFactory.html#a1a119ad2956abe146213c6ca124d8dd4',1,'TypeFactory']]], - ['coverage_5',['coverage',['../md_tests_2README.html#autotoc_md105',1,'Decoder coverage'],['../md_tests_2README.html#autotoc_md106',1,'Parser coverage']]], - ['create_6',['create',['../classTypeFactory.html#a3f43b03d6e3a0fd503fdec01ecf62e9f',1,'TypeFactory']]], - ['creator_7',['creator',['../classTypeFactory.html#ad82f537569ece3d3a4a376523fa94473',1,'TypeFactory']]], - ['current_20limitations_8',['Current Limitations',['../md_README.html#autotoc_md90',1,'']]] + ['basic_20multiplexing_0',['Basic multiplexing',['../md_README.html#autotoc_md78',1,'']]], + ['build_1',['build',['../classDbcDecodeBuilder.html#a2bc6386dfb5e58976c42e22c19ec471b',1,'DbcDecodeBuilder::Build()'],['../classDbcTreeBuilder.html#a7e57d067d831b14b383947fd125edd4b',1,'DbcTreeBuilder::Build()']]], + ['build_20and_20run_20the_20demo_2',['Build and run the demo',['../md_README.html#autotoc_md120',1,'']]], + ['build_20core_20without_20qt_20libraries_3',['Build core without Qt libraries',['../md_README.html#autotoc_md117',1,'']]], + ['build_20in_20qt_20creator_4',['Configure the GCC coverage build in Qt Creator',['../md_README.html#autotoc_md126',1,'']]], + ['build_20integration_5',['Build Integration',['../md_README.html#autotoc_md116',1,'']]], + ['build_20runtime_20decode_20database_6',['Build runtime decode database',['../md_README.html#autotoc_md93',1,'']]], + ['build_20ui_20tree_7',['Build UI tree',['../md_README.html#autotoc_md92',1,'']]], + ['byteorder_8',['byteorder',['../structDecodeSignal.html#abdc4c4bb4a67a6d61d6ca81e8a52833d',1,'DecodeSignal::byteOrder'],['../decode__database_8h.html#aaeb92d42f5a6e27b8ba19f18d69d142b',1,'ByteOrder: decode_database.h']]], + ['byteorder_20tt_9',['<tt>ByteOrder</tt>',['../md_README.html#autotoc_md44',1,'']]] ]; diff --git a/docs/html/search/all_7.js b/docs/html/search/all_7.js index 23b0f56..b5d1239 100644 --- a/docs/html/search/all_7.js +++ b/docs/html/search/all_7.js @@ -1,62 +1,18 @@ var searchData= [ - ['data_0',['data',['../structRawCanFrame.html#a0acb487612104c99c9907344c035df83',1,'RawCanFrame']]], - ['data_20structures_1',['Parsed Data Structures',['../md_README.html#autotoc_md17',1,'']]], - ['database_2',['Build runtime decode database',['../md_README.html#autotoc_md77',1,'']]], - ['dbc_3',['Parse DBC',['../md_README.html#autotoc_md75',1,'']]], - ['dbc_20parser_20and_20runtime_20decode_20module_20documentation_4',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]], - ['dbc_20structures_5',['Parsed DBC structures',['../md_README.html#autotoc_md10',1,'']]], - ['dbc_20syntax_6',['Supported DBC Syntax',['../md_README.html#autotoc_md55',1,'']]], - ['dbc_5fdatabase_2eh_7',['dbc_database.h',['../dbc__database_8h.html',1,'']]], - ['dbc_5fdecode_5fbuilder_2ecpp_8',['dbc_decode_builder.cpp',['../dbc__decode__builder_8cpp.html',1,'']]], - ['dbc_5fdecode_5fbuilder_2eh_9',['dbc_decode_builder.h',['../dbc__decode__builder_8h.html',1,'']]], - ['dbc_5fdecoder_2ecpp_10',['dbc_decoder.cpp',['../dbc__decoder_8cpp.html',1,'']]], - ['dbc_5fdecoder_2eh_11',['dbc_decoder.h',['../dbc__decoder_8h.html',1,'']]], - ['dbc_5fparser_2ecpp_12',['dbc_parser.cpp',['../dbc__parser_8cpp.html',1,'']]], - ['dbc_5fparser_2eh_13',['dbc_parser.h',['../dbc__parser_8h.html',1,'']]], - ['dbc_5ftree_5fbuilder_2ecpp_14',['dbc_tree_builder.cpp',['../dbc__tree__builder_8cpp.html',1,'']]], - ['dbc_5ftree_5fbuilder_2eh_15',['dbc_tree_builder.h',['../dbc__tree__builder_8h.html',1,'']]], - ['dbccommenthandler_16',['DbcCommentHandler',['../classDbcCommentHandler.html',1,'']]], - ['dbcdatabase_17',['DbcDatabase',['../structDbcDatabase.html',1,'']]], - ['dbcdatabase_20tt_18',['<tt>DbcDatabase</tt>',['../md_README.html#autotoc_md22',1,'']]], - ['dbcdecodebuilder_19',['DbcDecodeBuilder',['../classDbcDecodeBuilder.html',1,'']]], - ['dbcdecoder_20',['DbcDecoder',['../classDbcDecoder.html',1,'']]], - ['dbcdecoder_20tt_21',['<tt>DbcDecoder</tt>',['../md_README.html#autotoc_md51',1,'']]], - ['dbcframehandler_22',['DbcFrameHandler',['../classDbcFrameHandler.html',1,'']]], - ['dbcparsecontext_23',['DbcParseContext',['../structDbcParseContext.html',1,'']]], - ['dbcparser_24',['DbcParser',['../classDbcParser.html',1,'']]], - ['dbcsignalhandler_25',['DbcSignalHandler',['../classDbcSignalHandler.html',1,'']]], - ['dbcstatementdispatcher_26',['DbcStatementDispatcher',['../classDbcStatementDispatcher.html',1,'']]], - ['dbcstatementhandler_27',['DbcStatementHandler',['../classDbcStatementHandler.html',1,'']]], - ['dbctreebuilder_28',['DbcTreeBuilder',['../classDbcTreeBuilder.html',1,'']]], - ['decode_29',['Decode',['../classDbcDecoder.html#a345951ffe5d943a70d3a1ea1f39e74f7',1,'DbcDecoder']]], - ['decode_20a_20raw_20frame_30',['Decode a raw frame',['../md_README.html#autotoc_md78',1,'']]], - ['decode_20database_31',['Build runtime decode database',['../md_README.html#autotoc_md77',1,'']]], - ['decode_20flow_32',['Decode Flow',['../md_README.html#autotoc_md70',1,'']]], - ['decode_20layer_33',['Runtime Decode Layer',['../md_README.html#autotoc_md27',1,'']]], - ['decode_20layer_20exists_34',['Why the Runtime Decode Layer Exists',['../md_README.html#autotoc_md7',1,'']]], - ['decode_20module_20documentation_35',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]], - ['decode_20path_36',['2. Runtime decode path',['../md_README.html#autotoc_md5',1,'']]], - ['decode_20representation_37',['Runtime decode representation',['../md_README.html#autotoc_md102',1,'']]], - ['decode_20strategy_38',['Unified Decode Strategy',['../md_README.html#autotoc_md80',1,'']]], - ['decode_20structures_39',['Runtime decode structures',['../md_README.html#autotoc_md12',1,'']]], - ['decode_5fdatabase_2eh_40',['decode_database.h',['../decode__database_8h.html',1,'']]], - ['decodedatabase_41',['DecodeDatabase',['../structDecodeDatabase.html',1,'']]], - ['decodedatabase_20tt_42',['<tt>DecodeDatabase</tt>',['../md_README.html#autotoc_md40',1,'']]], - ['decodedframevalue_43',['DecodedFrameValue',['../structDecodedFrameValue.html',1,'']]], - ['decodedframevalue_20tt_44',['<tt>DecodedFrameValue</tt>',['../md_README.html#autotoc_md49',1,'']]], - ['decodedsignalvalue_45',['DecodedSignalValue',['../structDecodedSignalValue.html',1,'']]], - ['decodedsignalvalue_20tt_46',['<tt>DecodedSignalValue</tt>',['../md_README.html#autotoc_md45',1,'']]], - ['decodeframe_47',['DecodeFrame',['../structDecodeFrame.html',1,'']]], - ['decodeframe_20tt_48',['<tt>DecodeFrame</tt>',['../md_README.html#autotoc_md36',1,'']]], - ['decoder_49',['Runtime decoder',['../md_README.html#autotoc_md13',1,'']]], - ['decoder_20coverage_50',['Decoder coverage',['../md_tests_2README.html#autotoc_md105',1,'']]], - ['decoder_20layer_51',['Decoder Layer',['../md_README.html#autotoc_md42',1,'']]], - ['decodesignal_52',['DecodeSignal',['../structDecodeSignal.html',1,'']]], - ['decodesignal_20tt_53',['<tt>DecodeSignal</tt>',['../md_README.html#autotoc_md34',1,'']]], - ['definition_54',['definition',['../structDecodedFrameValue.html#a60dda1cc352d2c8087f0bdbc81dd266c',1,'DecodedFrameValue::definition'],['../structDecodedSignalValue.html#acadc3b3bb21dd6b0412d342c7e6b20d7',1,'DecodedSignalValue::definition'],['../md_README.html#autotoc_md56',1,'Frame definition'],['../md_README.html#autotoc_md60',1,'Signal definition']]], - ['demo_55',['Demo',['../md_README.html#autotoc_md15',1,'']]], - ['dispatch_56',['Dispatch',['../classDbcStatementDispatcher.html#a495c2d5c7ebb8103b1987cdd87c142ed',1,'DbcStatementDispatcher']]], - ['dlc_57',['dlc',['../structFrameInfo.html#aa2b198ea0f55e560c123d35e7b3ecab9',1,'FrameInfo::dlc'],['../structDecodeFrame.html#a51111ac13988be372d5673d12cf3e060',1,'DecodeFrame::dlc']]], - ['documentation_58',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]] + ['can_20id_20normalization_0',['CAN ID Normalization',['../md_README.html#autotoc_md82',1,'']]], + ['canid_1',['canid',['../structDecodeFrame.html#a52e10215388db7df8b541b9d9909edcf',1,'DecodeFrame::canId'],['../structFrameInfo.html#af470b0742c05bfbffc31c51a68f5c05e',1,'FrameInfo::canId'],['../structRawCanFrame.html#a2d0e7fa0e3d5c20bbed55ed8f7888ff4',1,'RawCanFrame::canId']]], + ['changed_2',['changed',['../md_changelog.html#autotoc_md13',1,'Changed'],['../md_changelog.html#autotoc_md9',1,'Changed'],['../md_changelog.html#autotoc_md4',1,'Changed']]], + ['changelog_3',['Changelog',['../md_changelog.html',1,'']]], + ['code_20coverage_4',['Measuring code coverage',['../md_README.html#autotoc_md124',1,'']]], + ['comment_5',['comment',['../structSignalInfo.html#ac99ba7563a5dad01e39c4257216953f5',1,'SignalInfo::comment'],['../structFrameInfo.html#ace75121294f9d89b762080ab5643293c',1,'FrameInfo::comment'],['../structDecodeFrame.html#a25819ef907a32391af5c9f7cae9cdb22',1,'DecodeFrame::comment'],['../structDecodeSignal.html#ae28c905d4a2bc86419c2a8361bfea473',1,'DecodeSignal::comment']]], + ['comments_6',['Comments',['../md_README.html#autotoc_md80',1,'']]], + ['configure_20the_20gcc_20coverage_20build_20in_20qt_20creator_7',['Configure the GCC coverage build in Qt Creator',['../md_README.html#autotoc_md126',1,'']]], + ['contains_8',['contains',['../classTypeFactory.html#a1a119ad2956abe146213c6ca124d8dd4',1,'TypeFactory']]], + ['core_20without_20qt_20libraries_9',['Build core without Qt libraries',['../md_README.html#autotoc_md117',1,'']]], + ['coverage_10',['coverage',['../md_tests_2README.html#autotoc_md131',1,'Additional regression coverage'],['../md_tests_2README.html#autotoc_md128',1,'Decoder coverage'],['../md_README.html#autotoc_md124',1,'Measuring code coverage'],['../md_tests_2README.html#autotoc_md129',1,'Parser coverage']]], + ['coverage_20build_20in_20qt_20creator_11',['Configure the GCC coverage build in Qt Creator',['../md_README.html#autotoc_md126',1,'']]], + ['create_12',['create',['../classTypeFactory.html#a3f43b03d6e3a0fd503fdec01ecf62e9f',1,'TypeFactory']]], + ['creator_13',['creator',['../md_README.html#autotoc_md126',1,'Configure the GCC coverage build in Qt Creator'],['../classTypeFactory.html#ad82f537569ece3d3a4a376523fa94473',1,'TypeFactory::creator()']]], + ['current_20limitations_14',['Current Limitations',['../md_README.html#autotoc_md108',1,'']]] ]; diff --git a/docs/html/search/all_8.js b/docs/html/search/all_8.js index 760e9a7..37e9f61 100644 --- a/docs/html/search/all_8.js +++ b/docs/html/search/all_8.js @@ -1,9 +1,64 @@ var searchData= [ - ['enough_0',['Why the Tree Is Not Enough',['../md_README.html#autotoc_md86',1,'']]], - ['errors_1',['errors',['../md_README.html#autotoc_md58',1,'Frame validation and parse errors'],['../md_README.html#autotoc_md62',1,'Signal validation and parse errors']]], - ['example_20usage_2',['Example Usage',['../md_README.html#autotoc_md74',1,'']]], - ['examples_2fmain_2ecpp_3',['main.cpp',['../examples_2main_8cpp.html',1,'']]], - ['exists_4',['Why the Runtime Decode Layer Exists',['../md_README.html#autotoc_md7',1,'']]], - ['extraction_5',['extraction',['../md_README.html#autotoc_md72',1,'Intel and Motorola Extraction'],['../md_README.html#autotoc_md68',1,'PGN Extraction']]] + ['data_0',['data',['../structRawCanFrame.html#a0acb487612104c99c9907344c035df83',1,'RawCanFrame']]], + ['data_20structures_1',['Parsed Data Structures',['../md_README.html#autotoc_md31',1,'']]], + ['database_2',['Build runtime decode database',['../md_README.html#autotoc_md93',1,'']]], + ['dbc_3',['Parse DBC',['../md_README.html#autotoc_md91',1,'']]], + ['dbc_20parser_20and_20runtime_20decode_20module_20documentation_4',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]], + ['dbc_20syntax_5',['Supported DBC Syntax',['../md_README.html#autotoc_md69',1,'']]], + ['dbc_5fdatabase_2eh_6',['dbc_database.h',['../dbc__database_8h.html',1,'']]], + ['dbc_5fdecode_5fbuilder_2ecpp_7',['dbc_decode_builder.cpp',['../dbc__decode__builder_8cpp.html',1,'']]], + ['dbc_5fdecode_5fbuilder_2eh_8',['dbc_decode_builder.h',['../dbc__decode__builder_8h.html',1,'']]], + ['dbc_5fdecoder_2ecpp_9',['dbc_decoder.cpp',['../dbc__decoder_8cpp.html',1,'']]], + ['dbc_5fdecoder_2eh_10',['dbc_decoder.h',['../dbc__decoder_8h.html',1,'']]], + ['dbc_5fparser_2ecpp_11',['dbc_parser.cpp',['../dbc__parser_8cpp.html',1,'']]], + ['dbc_5fparser_2eh_12',['dbc_parser.h',['../dbc__parser_8h.html',1,'']]], + ['dbc_5ftree_5fbuilder_2ecpp_13',['dbc_tree_builder.cpp',['../dbc__tree__builder_8cpp.html',1,'']]], + ['dbc_5ftree_5fbuilder_2eh_14',['dbc_tree_builder.h',['../dbc__tree__builder_8h.html',1,'']]], + ['dbccommenthandler_15',['DbcCommentHandler',['../classDbcCommentHandler.html',1,'']]], + ['dbcdatabase_16',['DbcDatabase',['../structDbcDatabase.html',1,'']]], + ['dbcdatabase_20tt_17',['<tt>DbcDatabase</tt>',['../md_README.html#autotoc_md36',1,'']]], + ['dbcdecodebuilder_18',['DbcDecodeBuilder',['../classDbcDecodeBuilder.html',1,'']]], + ['dbcdecoder_19',['DbcDecoder',['../classDbcDecoder.html',1,'']]], + ['dbcdecoder_20tt_20',['<tt>DbcDecoder</tt>',['../md_README.html#autotoc_md65',1,'']]], + ['dbcframehandler_21',['DbcFrameHandler',['../classDbcFrameHandler.html',1,'']]], + ['dbcparsecontext_22',['DbcParseContext',['../structDbcParseContext.html',1,'']]], + ['dbcparser_23',['DbcParser',['../classDbcParser.html',1,'']]], + ['dbcsignalhandler_24',['DbcSignalHandler',['../classDbcSignalHandler.html',1,'']]], + ['dbcstatementdispatcher_25',['DbcStatementDispatcher',['../classDbcStatementDispatcher.html',1,'']]], + ['dbcstatementhandler_26',['DbcStatementHandler',['../classDbcStatementHandler.html',1,'']]], + ['dbctreebuilder_27',['DbcTreeBuilder',['../classDbcTreeBuilder.html',1,'']]], + ['dbctreemodel_28',['DbcTreeModel',['../classDbcTreeModel.html',1,'']]], + ['dbcunsupportedmultiplexinghandler_29',['DbcUnsupportedMultiplexingHandler',['../classDbcUnsupportedMultiplexingHandler.html',1,'']]], + ['dbcvaluedescriptionhandler_30',['DbcValueDescriptionHandler',['../classDbcValueDescriptionHandler.html',1,'']]], + ['debian_20ubuntu_31',['GCC, gcov, and LCOV on Debian/Ubuntu',['../md_README.html#autotoc_md125',1,'']]], + ['decode_32',['Decode',['../classDbcDecoder.html#a345951ffe5d943a70d3a1ea1f39e74f7',1,'DbcDecoder']]], + ['decode_20a_20raw_20frame_33',['Decode a raw frame',['../md_README.html#autotoc_md94',1,'']]], + ['decode_20database_34',['Build runtime decode database',['../md_README.html#autotoc_md93',1,'']]], + ['decode_20flow_35',['Decode Flow',['../md_README.html#autotoc_md86',1,'']]], + ['decode_20layer_36',['Runtime Decode Layer',['../md_README.html#autotoc_md41',1,'']]], + ['decode_20layer_20exists_37',['Why the Runtime Decode Layer Exists',['../md_README.html#autotoc_md27',1,'']]], + ['decode_20module_20documentation_38',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]], + ['decode_20path_39',['2. Runtime decode path',['../md_README.html#autotoc_md25',1,'']]], + ['decode_20strategy_40',['Unified Decode Strategy',['../md_README.html#autotoc_md96',1,'']]], + ['decode_5fdatabase_2eh_41',['decode_database.h',['../decode__database_8h.html',1,'']]], + ['decodedatabase_42',['DecodeDatabase',['../structDecodeDatabase.html',1,'']]], + ['decodedatabase_20tt_43',['<tt>DecodeDatabase</tt>',['../md_README.html#autotoc_md54',1,'']]], + ['decodedframevalue_44',['DecodedFrameValue',['../structDecodedFrameValue.html',1,'']]], + ['decodedframevalue_20tt_45',['<tt>DecodedFrameValue</tt>',['../md_README.html#autotoc_md63',1,'']]], + ['decodedsignalvalue_46',['DecodedSignalValue',['../structDecodedSignalValue.html',1,'']]], + ['decodedsignalvalue_20tt_47',['<tt>DecodedSignalValue</tt>',['../md_README.html#autotoc_md59',1,'']]], + ['decodeframe_48',['DecodeFrame',['../structDecodeFrame.html',1,'']]], + ['decodeframe_20tt_49',['<tt>DecodeFrame</tt>',['../md_README.html#autotoc_md50',1,'']]], + ['decoder_20coverage_50',['Decoder coverage',['../md_tests_2README.html#autotoc_md128',1,'']]], + ['decoder_20layer_51',['Decoder Layer',['../md_README.html#autotoc_md56',1,'']]], + ['decodesignal_52',['DecodeSignal',['../structDecodeSignal.html',1,'']]], + ['decodesignal_20tt_53',['<tt>DecodeSignal</tt>',['../md_README.html#autotoc_md48',1,'']]], + ['definition_54',['definition',['../structDecodedFrameValue.html#a60dda1cc352d2c8087f0bdbc81dd266c',1,'DecodedFrameValue::definition'],['../structDecodedSignalValue.html#acadc3b3bb21dd6b0412d342c7e6b20d7',1,'DecodedSignalValue::definition'],['../md_README.html#autotoc_md70',1,'Frame definition'],['../md_README.html#autotoc_md74',1,'Signal definition']]], + ['demo_55',['Build and run the demo',['../md_README.html#autotoc_md120',1,'']]], + ['descriptions_20tt_20val_5f_20tt_56',['Signal value descriptions (<tt>VAL_</tt>)',['../md_README.html#autotoc_md106',1,'']]], + ['dispatch_57',['Dispatch',['../classDbcStatementDispatcher.html#a495c2d5c7ebb8103b1987cdd87c142ed',1,'DbcStatementDispatcher']]], + ['dlc_58',['dlc',['../structFrameInfo.html#aa2b198ea0f55e560c123d35e7b3ecab9',1,'FrameInfo::dlc'],['../structDecodeFrame.html#a51111ac13988be372d5673d12cf3e060',1,'DecodeFrame::dlc']]], + ['documentation_59',['documentation',['../md_README.html',1,'DBC Parser and Runtime Decode Module Documentation'],['../md_changelog.html#autotoc_md16',1,'Documentation'],['../md_README.html#autotoc_md121',1,'Generate API documentation']]], + ['documentation_20and_20maintenance_60',['documentation and maintenance',['../md_changelog.html#autotoc_md11',1,'Documentation and maintenance'],['../md_changelog.html#autotoc_md19',1,'Documentation and maintenance']]] ]; diff --git a/docs/html/search/all_9.js b/docs/html/search/all_9.js index caed244..05abbd8 100644 --- a/docs/html/search/all_9.js +++ b/docs/html/search/all_9.js @@ -1,18 +1,9 @@ var searchData= [ - ['factor_0',['factor',['../structDecodeSignal.html#a428c39913a366a8476dd291061354391',1,'DecodeSignal::factor'],['../structSignalInfo.html#ae4f78d99a2750aa564d7eba860171499',1,'SignalInfo::factor']]], - ['factory_1',['Statement Handler Factory',['../md_README.html#autotoc_md88',1,'']]], - ['findframe_2',['FindFrame',['../classDbcDecoder.html#ab2cfb2fb711c95d3a29365546b89f3da',1,'DbcDecoder']]], - ['flow_3',['Decode Flow',['../md_README.html#autotoc_md70',1,'']]], - ['frame_4',['Decode a raw frame',['../md_README.html#autotoc_md78',1,'']]], - ['frame_20definition_5',['Frame definition',['../md_README.html#autotoc_md56',1,'']]], - ['frame_20validation_20and_20parse_20errors_6',['Frame validation and parse errors',['../md_README.html#autotoc_md58',1,'']]], - ['frame_5finfo_2eh_7',['frame_info.h',['../frame__info_8h.html',1,'']]], - ['frameinfo_8',['FrameInfo',['../structFrameInfo.html',1,'']]], - ['frameinfo_20tt_9',['<tt>FrameInfo</tt>',['../md_README.html#autotoc_md20',1,'']]], - ['framekey_10',['FrameKey',['../structFrameKey.html',1,'']]], - ['framekey_20tt_11',['<tt>FrameKey</tt>',['../md_README.html#autotoc_md38',1,'']]], - ['framekeyhasher_12',['FrameKeyHasher',['../structFrameKeyHasher.html',1,'']]], - ['frames_13',['frames',['../structDbcDatabase.html#a2cade5d0234ee816132127542f8c612b',1,'DbcDatabase']]], - ['frametap_14',['Intended Use in FrameTap',['../md_README.html#autotoc_md84',1,'']]] + ['enough_0',['Why the Tree Is Not Enough',['../md_README.html#autotoc_md102',1,'']]], + ['errors_1',['errors',['../md_README.html#autotoc_md72',1,'Frame validation and parse errors'],['../md_README.html#autotoc_md76',1,'Signal validation and parse errors']]], + ['example_20usage_2',['Example Usage',['../md_README.html#autotoc_md90',1,'']]], + ['examples_2fmain_2ecpp_3',['main.cpp',['../examples_2main_8cpp.html',1,'']]], + ['exists_4',['Why the Runtime Decode Layer Exists',['../md_README.html#autotoc_md27',1,'']]], + ['extraction_5',['extraction',['../md_README.html#autotoc_md88',1,'Intel and Motorola Extraction'],['../md_README.html#autotoc_md84',1,'PGN Extraction']]] ]; diff --git a/docs/html/search/all_a.js b/docs/html/search/all_a.js index dcbd3c7..2b38936 100644 --- a/docs/html/search/all_a.js +++ b/docs/html/search/all_a.js @@ -1,9 +1,19 @@ var searchData= [ - ['getchild_0',['getchild',['../classTreeNode.html#a4727ff801a2d1b9323c5ae50a35457a6',1,'TreeNode::GetChild(std::size_t index) const'],['../classTreeNode.html#a81047bd7d2a4cc96b9ef5e20d0d63b5f',1,'TreeNode::GetChild(std::size_t index)']]], - ['getchildcount_1',['GetChildCount',['../classTreeNode.html#abdd82460187dca8d3e5d66f5d5c529ea',1,'TreeNode']]], - ['getframe_2',['GetFrame',['../classTreeNode.html#afc503b40004764163605d6dbdb4ef811',1,'TreeNode']]], - ['getname_3',['GetName',['../classTreeNode.html#aaac5b8d9dc9e5ae1f367d1adbcf20e18',1,'TreeNode']]], - ['getsignal_4',['GetSignal',['../classTreeNode.html#a226518612d0d00b5988a2c44fc21d3f1',1,'TreeNode']]], - ['gettype_5',['GetType',['../classTreeNode.html#afa2f4b0aafa12d3d41ed00df8e0250c9',1,'TreeNode']]] + ['factor_0',['factor',['../structDecodeSignal.html#a428c39913a366a8476dd291061354391',1,'DecodeSignal::factor'],['../structSignalInfo.html#ae4f78d99a2750aa564d7eba860171499',1,'SignalInfo::factor']]], + ['factory_1',['Statement Handler Factory',['../md_README.html#autotoc_md104',1,'']]], + ['findframe_2',['FindFrame',['../classDbcDecoder.html#ab2cfb2fb711c95d3a29365546b89f3da',1,'DbcDecoder']]], + ['fixed_3',['fixed',['../md_changelog.html#autotoc_md10',1,'Fixed'],['../md_changelog.html#autotoc_md14',1,'Fixed'],['../md_changelog.html#autotoc_md5',1,'Fixed']]], + ['flow_4',['Decode Flow',['../md_README.html#autotoc_md86',1,'']]], + ['frame_5',['Decode a raw frame',['../md_README.html#autotoc_md94',1,'']]], + ['frame_20definition_6',['Frame definition',['../md_README.html#autotoc_md70',1,'']]], + ['frame_20validation_20and_20parse_20errors_7',['Frame validation and parse errors',['../md_README.html#autotoc_md72',1,'']]], + ['frame_5finfo_2eh_8',['frame_info.h',['../frame__info_8h.html',1,'']]], + ['frameinfo_9',['FrameInfo',['../structFrameInfo.html',1,'']]], + ['frameinfo_20tt_10',['<tt>FrameInfo</tt>',['../md_README.html#autotoc_md34',1,'']]], + ['framekey_11',['FrameKey',['../structFrameKey.html',1,'']]], + ['framekey_20tt_12',['<tt>FrameKey</tt>',['../md_README.html#autotoc_md52',1,'']]], + ['framekeyhasher_13',['FrameKeyHasher',['../structFrameKeyHasher.html',1,'']]], + ['frames_14',['frames',['../structDbcDatabase.html#a2cade5d0234ee816132127542f8c612b',1,'DbcDatabase']]], + ['frametap_15',['Intended Use in FrameTap',['../md_README.html#autotoc_md100',1,'']]] ]; diff --git a/docs/html/search/all_b.js b/docs/html/search/all_b.js index 6a66f22..780d60a 100644 --- a/docs/html/search/all_b.js +++ b/docs/html/search/all_b.js @@ -1,6 +1,16 @@ var searchData= [ - ['handler_20factory_0',['Statement Handler Factory',['../md_README.html#autotoc_md88',1,'']]], - ['haspgn_1',['haspgn',['../structDecodeFrame.html#a2551102670c4a540fced4c71da0b369d',1,'DecodeFrame::hasPgn'],['../structFrameInfo.html#a4737a5420213ad4304724e39f3a4e55d',1,'FrameInfo::hasPgn']]], - ['high_20level_20architecture_2',['High-Level Architecture',['../md_README.html#autotoc_md3',1,'']]] + ['gcc_20coverage_20build_20in_20qt_20creator_0',['Configure the GCC coverage build in Qt Creator',['../md_README.html#autotoc_md126',1,'']]], + ['gcc_20gcov_20and_20lcov_20on_20debian_20ubuntu_1',['GCC, gcov, and LCOV on Debian/Ubuntu',['../md_README.html#autotoc_md125',1,'']]], + ['gcov_20and_20lcov_20on_20debian_20ubuntu_2',['GCC, gcov, and LCOV on Debian/Ubuntu',['../md_README.html#autotoc_md125',1,'']]], + ['generate_20api_20documentation_3',['Generate API documentation',['../md_README.html#autotoc_md121',1,'']]], + ['getchild_4',['getchild',['../classTreeNode.html#a4727ff801a2d1b9323c5ae50a35457a6',1,'TreeNode::GetChild(std::size_t index) const'],['../classTreeNode.html#a81047bd7d2a4cc96b9ef5e20d0d63b5f',1,'TreeNode::GetChild(std::size_t index)']]], + ['getchildcount_5',['GetChildCount',['../classTreeNode.html#abdd82460187dca8d3e5d66f5d5c529ea',1,'TreeNode']]], + ['getframe_6',['GetFrame',['../classTreeNode.html#afc503b40004764163605d6dbdb4ef811',1,'TreeNode']]], + ['getname_7',['GetName',['../classTreeNode.html#aaac5b8d9dc9e5ae1f367d1adbcf20e18',1,'TreeNode']]], + ['getparent_8',['GetParent',['../classTreeNode.html#aa48fbc17903eb8cfa40353e29f853c6f',1,'TreeNode']]], + ['getrow_9',['GetRow',['../classTreeNode.html#ad501f97eeec7f7d3353bfae838fbb6a8',1,'TreeNode']]], + ['getsignal_10',['GetSignal',['../classTreeNode.html#a226518612d0d00b5988a2c44fc21d3f1',1,'TreeNode']]], + ['gettype_11',['GetType',['../classTreeNode.html#afa2f4b0aafa12d3d41ed00df8e0250c9',1,'TreeNode']]], + ['getvaluedescription_12',['GetValueDescription',['../structDecodedSignalValue.html#affc38af1bf31bcb6f2c33044bce92bd2',1,'DecodedSignalValue']]] ]; diff --git a/docs/html/search/all_c.js b/docs/html/search/all_c.js index aa90b7a..a93d108 100644 --- a/docs/html/search/all_c.js +++ b/docs/html/search/all_c.js @@ -1,13 +1,6 @@ var searchData= [ - ['id_20normalization_0',['CAN ID Normalization',['../md_README.html#autotoc_md66',1,'']]], - ['implemented_1',['Stage 1 - already implemented',['../md_README.html#autotoc_md93',1,'']]], - ['in_20frametap_2',['Intended Use in FrameTap',['../md_README.html#autotoc_md84',1,'']]], - ['integration_3',['Build Integration',['../md_README.html#autotoc_md98',1,'']]], - ['intel_20and_20motorola_20extraction_4',['Intel and Motorola Extraction',['../md_README.html#autotoc_md72',1,'']]], - ['intended_20use_20in_20frametap_5',['Intended Use in FrameTap',['../md_README.html#autotoc_md84',1,'']]], - ['is_20not_20enough_6',['Why the Tree Is Not Enough',['../md_README.html#autotoc_md86',1,'']]], - ['isextended_7',['isextended',['../structRawCanFrame.html#a462193d275adc1dba8bd18ffa0e36bb7',1,'RawCanFrame::isExtended'],['../structDecodeFrame.html#a3ee2348d781f8f15aaf87e8dcf57ec41',1,'DecodeFrame::isExtended'],['../structFrameInfo.html#a34b726afaad2ac5c697fdb2ac070cdaf',1,'FrameInfo::isExtended']]], - ['islittleendian_8',['isLittleEndian',['../structSignalInfo.html#af363b1563fb4c7cc8973f9a80c06846c',1,'SignalInfo']]], - ['issigned_9',['isSigned',['../structSignalInfo.html#a52a52b320eef92fbcb4626307f9a498f',1,'SignalInfo']]] + ['handler_20factory_0',['Statement Handler Factory',['../md_README.html#autotoc_md104',1,'']]], + ['haspgn_1',['haspgn',['../structDecodeFrame.html#a2551102670c4a540fced4c71da0b369d',1,'DecodeFrame::hasPgn'],['../structFrameInfo.html#a4737a5420213ad4304724e39f3a4e55d',1,'FrameInfo::hasPgn']]], + ['high_20level_20architecture_2',['High-Level Architecture',['../md_README.html#autotoc_md23',1,'']]] ]; diff --git a/docs/html/search/all_d.js b/docs/html/search/all_d.js index f1710ab..081da3f 100644 --- a/docs/html/search/all_d.js +++ b/docs/html/search/all_d.js @@ -1,10 +1,16 @@ var searchData= [ - ['layer_0',['layer',['../md_README.html#autotoc_md42',1,'Decoder Layer'],['../md_README.html#autotoc_md27',1,'Runtime Decode Layer'],['../md_README.html#autotoc_md24',1,'UI Tree Layer']]], - ['layer_20exists_1',['Why the Runtime Decode Layer Exists',['../md_README.html#autotoc_md7',1,'']]], - ['layout_2',['Module Layout',['../md_README.html#autotoc_md9',1,'']]], - ['length_3',['length',['../structDecodeSignal.html#acd4ef5ee30421d117b5756854302debb',1,'DecodeSignal::length'],['../structSignalInfo.html#a1008b5201f71848177217bd52fb84baa',1,'SignalInfo::length']]], - ['level_20architecture_4',['High-Level Architecture',['../md_README.html#autotoc_md3',1,'']]], - ['limitations_5',['Current Limitations',['../md_README.html#autotoc_md90',1,'']]], - ['live_20path_6',['live path',['../md_README.html#autotoc_md81',1,'']]] + ['id_20normalization_0',['CAN ID Normalization',['../md_README.html#autotoc_md82',1,'']]], + ['implementation_20—_202026_2003_2013_1',['Initial implementation — 2026-03-13',['../md_changelog.html#autotoc_md17',1,'']]], + ['implemented_2',['Stage 1 - already implemented',['../md_README.html#autotoc_md111',1,'']]], + ['in_20frametap_3',['Intended Use in FrameTap',['../md_README.html#autotoc_md100',1,'']]], + ['in_20qt_20creator_4',['Configure the GCC coverage build in Qt Creator',['../md_README.html#autotoc_md126',1,'']]], + ['initial_20implementation_20—_202026_2003_2013_5',['Initial implementation — 2026-03-13',['../md_changelog.html#autotoc_md17',1,'']]], + ['integration_6',['Build Integration',['../md_README.html#autotoc_md116',1,'']]], + ['intel_20and_20motorola_20extraction_7',['Intel and Motorola Extraction',['../md_README.html#autotoc_md88',1,'']]], + ['intended_20use_20in_20frametap_8',['Intended Use in FrameTap',['../md_README.html#autotoc_md100',1,'']]], + ['is_20not_20enough_9',['Why the Tree Is Not Enough',['../md_README.html#autotoc_md102',1,'']]], + ['isextended_10',['isextended',['../structRawCanFrame.html#a462193d275adc1dba8bd18ffa0e36bb7',1,'RawCanFrame::isExtended'],['../structDecodeFrame.html#a3ee2348d781f8f15aaf87e8dcf57ec41',1,'DecodeFrame::isExtended'],['../structFrameInfo.html#a34b726afaad2ac5c697fdb2ac070cdaf',1,'FrameInfo::isExtended']]], + ['islittleendian_11',['isLittleEndian',['../structSignalInfo.html#af363b1563fb4c7cc8973f9a80c06846c',1,'SignalInfo']]], + ['issigned_12',['isSigned',['../structSignalInfo.html#a52a52b320eef92fbcb4626307f9a498f',1,'SignalInfo']]] ]; diff --git a/docs/html/search/all_e.js b/docs/html/search/all_e.js index 0c87f60..7006849 100644 --- a/docs/html/search/all_e.js +++ b/docs/html/search/all_e.js @@ -1,8 +1,12 @@ var searchData= [ - ['maximum_0',['maximum',['../structDecodeSignal.html#a4a6ba87142a9badbf0ca830e9e709cb7',1,'DecodeSignal::maximum'],['../structSignalInfo.html#adf1c4331b9eabced0d7fdda40ff0eb52',1,'SignalInfo::maximum']]], - ['minimum_1',['minimum',['../structDecodeSignal.html#a0fb84e19a0ab3bd50b6f65c1075ebc25',1,'DecodeSignal::minimum'],['../structSignalInfo.html#ada7bf94fbeaa26bd08c73982b5af255b',1,'SignalInfo::minimum']]], - ['module_20documentation_2',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]], - ['module_20layout_3',['Module Layout',['../md_README.html#autotoc_md9',1,'']]], - ['motorola_20extraction_4',['Intel and Motorola Extraction',['../md_README.html#autotoc_md72',1,'']]] + ['layer_0',['layer',['../md_README.html#autotoc_md56',1,'Decoder Layer'],['../md_README.html#autotoc_md41',1,'Runtime Decode Layer'],['../md_README.html#autotoc_md38',1,'UI Tree Layer']]], + ['layer_20exists_1',['Why the Runtime Decode Layer Exists',['../md_README.html#autotoc_md27',1,'']]], + ['layout_2',['Module Layout',['../md_README.html#autotoc_md29',1,'']]], + ['lcov_20on_20debian_20ubuntu_3',['GCC, gcov, and LCOV on Debian/Ubuntu',['../md_README.html#autotoc_md125',1,'']]], + ['length_4',['length',['../structDecodeSignal.html#acd4ef5ee30421d117b5756854302debb',1,'DecodeSignal::length'],['../structSignalInfo.html#a1008b5201f71848177217bd52fb84baa',1,'SignalInfo::length']]], + ['level_20architecture_5',['High-Level Architecture',['../md_README.html#autotoc_md23',1,'']]], + ['libraries_6',['Build core without Qt libraries',['../md_README.html#autotoc_md117',1,'']]], + ['limitations_7',['Current Limitations',['../md_README.html#autotoc_md108',1,'']]], + ['live_20path_8',['live path',['../md_README.html#autotoc_md97',1,'']]] ]; diff --git a/docs/html/search/all_f.js b/docs/html/search/all_f.js index 80d2902..8bf0c69 100644 --- a/docs/html/search/all_f.js +++ b/docs/html/search/all_f.js @@ -1,8 +1,13 @@ var searchData= [ - ['name_0',['name',['../structDecodeSignal.html#a58cf5844f2272a23dcb9687d912e4780',1,'DecodeSignal::name'],['../structDecodeFrame.html#aa0a7f8fd5bfde2148dfd0d838328f579',1,'DecodeFrame::name'],['../structFrameInfo.html#abb53a7f93ed7abc0ea1ae4a8ccafcdcb',1,'FrameInfo::name'],['../structSignalInfo.html#a379e422a00cad56f896cacf60455b088',1,'SignalInfo::name']]], - ['next_20steps_1',['Recommended Next Steps',['../md_README.html#autotoc_md92',1,'']]], - ['nodetype_2',['NodeType',['../tree__node_8h.html#acac9cbaeea226ed297804c012dc12b16',1,'tree_node.h']]], - ['normalization_3',['CAN ID Normalization',['../md_README.html#autotoc_md66',1,'']]], - ['not_20enough_4',['Why the Tree Is Not Enough',['../md_README.html#autotoc_md86',1,'']]] + ['maintenance_0',['maintenance',['../md_changelog.html#autotoc_md11',1,'Documentation and maintenance'],['../md_changelog.html#autotoc_md19',1,'Documentation and maintenance']]], + ['maximum_1',['maximum',['../structDecodeSignal.html#a4a6ba87142a9badbf0ca830e9e709cb7',1,'DecodeSignal::maximum'],['../structSignalInfo.html#adf1c4331b9eabced0d7fdda40ff0eb52',1,'SignalInfo::maximum']]], + ['measuring_20code_20coverage_2',['Measuring code coverage',['../md_README.html#autotoc_md124',1,'']]], + ['minimum_3',['minimum',['../structDecodeSignal.html#a0fb84e19a0ab3bd50b6f65c1075ebc25',1,'DecodeSignal::minimum'],['../structSignalInfo.html#ada7bf94fbeaa26bd08c73982b5af255b',1,'SignalInfo::minimum']]], + ['model_20adapter_4',['Optional Qt model adapter',['../md_README.html#autotoc_md118',1,'']]], + ['model_20tests_5',['Tree and optional model tests',['../md_tests_2README.html#autotoc_md130',1,'']]], + ['module_20documentation_6',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]], + ['module_20layout_7',['Module Layout',['../md_README.html#autotoc_md29',1,'']]], + ['motorola_20extraction_8',['Intel and Motorola Extraction',['../md_README.html#autotoc_md88',1,'']]], + ['multiplexing_9',['multiplexing',['../md_README.html#autotoc_md78',1,'Basic multiplexing'],['../structMultiplexing.html',1,'Multiplexing']]] ]; diff --git a/docs/html/search/classes_0.js b/docs/html/search/classes_0.js index 2b375a1..017a291 100644 --- a/docs/html/search/classes_0.js +++ b/docs/html/search/classes_0.js @@ -11,9 +11,12 @@ var searchData= ['dbcstatementdispatcher_8',['DbcStatementDispatcher',['../classDbcStatementDispatcher.html',1,'']]], ['dbcstatementhandler_9',['DbcStatementHandler',['../classDbcStatementHandler.html',1,'']]], ['dbctreebuilder_10',['DbcTreeBuilder',['../classDbcTreeBuilder.html',1,'']]], - ['decodedatabase_11',['DecodeDatabase',['../structDecodeDatabase.html',1,'']]], - ['decodedframevalue_12',['DecodedFrameValue',['../structDecodedFrameValue.html',1,'']]], - ['decodedsignalvalue_13',['DecodedSignalValue',['../structDecodedSignalValue.html',1,'']]], - ['decodeframe_14',['DecodeFrame',['../structDecodeFrame.html',1,'']]], - ['decodesignal_15',['DecodeSignal',['../structDecodeSignal.html',1,'']]] + ['dbctreemodel_11',['DbcTreeModel',['../classDbcTreeModel.html',1,'']]], + ['dbcunsupportedmultiplexinghandler_12',['DbcUnsupportedMultiplexingHandler',['../classDbcUnsupportedMultiplexingHandler.html',1,'']]], + ['dbcvaluedescriptionhandler_13',['DbcValueDescriptionHandler',['../classDbcValueDescriptionHandler.html',1,'']]], + ['decodedatabase_14',['DecodeDatabase',['../structDecodeDatabase.html',1,'']]], + ['decodedframevalue_15',['DecodedFrameValue',['../structDecodedFrameValue.html',1,'']]], + ['decodedsignalvalue_16',['DecodedSignalValue',['../structDecodedSignalValue.html',1,'']]], + ['decodeframe_17',['DecodeFrame',['../structDecodeFrame.html',1,'']]], + ['decodesignal_18',['DecodeSignal',['../structDecodeSignal.html',1,'']]] ]; diff --git a/docs/html/search/classes_2.js b/docs/html/search/classes_2.js index ee60254..731f810 100644 --- a/docs/html/search/classes_2.js +++ b/docs/html/search/classes_2.js @@ -1,4 +1,4 @@ var searchData= [ - ['rawcanframe_0',['RawCanFrame',['../structRawCanFrame.html',1,'']]] + ['multiplexing_0',['Multiplexing',['../structMultiplexing.html',1,'']]] ]; diff --git a/docs/html/search/classes_3.js b/docs/html/search/classes_3.js index 3cc8467..9fdab5b 100644 --- a/docs/html/search/classes_3.js +++ b/docs/html/search/classes_3.js @@ -1,4 +1,4 @@ var searchData= [ - ['signalinfo_0',['SignalInfo',['../structSignalInfo.html',1,'']]] + ['pendingvaluedescriptions_0',['PendingValueDescriptions',['../structPendingValueDescriptions.html',1,'']]] ]; diff --git a/docs/html/search/classes_4.js b/docs/html/search/classes_4.js index 5c7d392..ee60254 100644 --- a/docs/html/search/classes_4.js +++ b/docs/html/search/classes_4.js @@ -1,6 +1,4 @@ var searchData= [ - ['treenode_0',['TreeNode',['../classTreeNode.html',1,'']]], - ['typefactory_1',['TypeFactory',['../classTypeFactory.html',1,'']]], - ['typefactory_3c_20std_3a_3astring_2c_20dbcstatementhandler_20_3e_2',['TypeFactory< std::string, DbcStatementHandler >',['../classTypeFactory.html',1,'']]] + ['rawcanframe_0',['RawCanFrame',['../structRawCanFrame.html',1,'']]] ]; diff --git a/docs/html/search/classes_5.js b/docs/html/search/classes_5.js new file mode 100644 index 0000000..3cc8467 --- /dev/null +++ b/docs/html/search/classes_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['signalinfo_0',['SignalInfo',['../structSignalInfo.html',1,'']]] +]; diff --git a/docs/html/search/classes_6.js b/docs/html/search/classes_6.js new file mode 100644 index 0000000..5c7d392 --- /dev/null +++ b/docs/html/search/classes_6.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['treenode_0',['TreeNode',['../classTreeNode.html',1,'']]], + ['typefactory_1',['TypeFactory',['../classTypeFactory.html',1,'']]], + ['typefactory_3c_20std_3a_3astring_2c_20dbcstatementhandler_20_3e_2',['TypeFactory< std::string, DbcStatementHandler >',['../classTypeFactory.html',1,'']]] +]; diff --git a/docs/html/search/functions_5.js b/docs/html/search/functions_5.js index dcbd3c7..ac4a700 100644 --- a/docs/html/search/functions_5.js +++ b/docs/html/search/functions_5.js @@ -4,6 +4,9 @@ var searchData= ['getchildcount_1',['GetChildCount',['../classTreeNode.html#abdd82460187dca8d3e5d66f5d5c529ea',1,'TreeNode']]], ['getframe_2',['GetFrame',['../classTreeNode.html#afc503b40004764163605d6dbdb4ef811',1,'TreeNode']]], ['getname_3',['GetName',['../classTreeNode.html#aaac5b8d9dc9e5ae1f367d1adbcf20e18',1,'TreeNode']]], - ['getsignal_4',['GetSignal',['../classTreeNode.html#a226518612d0d00b5988a2c44fc21d3f1',1,'TreeNode']]], - ['gettype_5',['GetType',['../classTreeNode.html#afa2f4b0aafa12d3d41ed00df8e0250c9',1,'TreeNode']]] + ['getparent_4',['GetParent',['../classTreeNode.html#aa48fbc17903eb8cfa40353e29f853c6f',1,'TreeNode']]], + ['getrow_5',['GetRow',['../classTreeNode.html#ad501f97eeec7f7d3353bfae838fbb6a8',1,'TreeNode']]], + ['getsignal_6',['GetSignal',['../classTreeNode.html#a226518612d0d00b5988a2c44fc21d3f1',1,'TreeNode']]], + ['gettype_7',['GetType',['../classTreeNode.html#afa2f4b0aafa12d3d41ed00df8e0250c9',1,'TreeNode']]], + ['getvaluedescription_8',['GetValueDescription',['../structDecodedSignalValue.html#affc38af1bf31bcb6f2c33044bce92bd2',1,'DecodedSignalValue']]] ]; diff --git a/docs/html/search/pages_1.js b/docs/html/search/pages_1.js index 79cbdab..9a8dbbc 100644 --- a/docs/html/search/pages_1.js +++ b/docs/html/search/pages_1.js @@ -1,6 +1,4 @@ var searchData= [ - ['dbc_20parser_20and_20runtime_20decode_20module_20documentation_0',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]], - ['decode_20module_20documentation_1',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]], - ['documentation_2',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]] + ['changelog_0',['Changelog',['../md_changelog.html',1,'']]] ]; diff --git a/docs/html/search/pages_2.js b/docs/html/search/pages_2.js index 6e406cf..79cbdab 100644 --- a/docs/html/search/pages_2.js +++ b/docs/html/search/pages_2.js @@ -1,4 +1,6 @@ var searchData= [ - ['module_20documentation_0',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]] + ['dbc_20parser_20and_20runtime_20decode_20module_20documentation_0',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]], + ['decode_20module_20documentation_1',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]], + ['documentation_2',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]] ]; diff --git a/docs/html/search/pages_3.js b/docs/html/search/pages_3.js index ccba57e..6e406cf 100644 --- a/docs/html/search/pages_3.js +++ b/docs/html/search/pages_3.js @@ -1,4 +1,4 @@ var searchData= [ - ['parser_20and_20runtime_20decode_20module_20documentation_0',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]] + ['module_20documentation_0',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]] ]; diff --git a/docs/html/search/pages_4.js b/docs/html/search/pages_4.js index 8b9b038..ccba57e 100644 --- a/docs/html/search/pages_4.js +++ b/docs/html/search/pages_4.js @@ -1,4 +1,4 @@ var searchData= [ - ['qttest_20regression_20tests_0',['QtTest regression tests',['../md_tests_2README.html',1,'']]] + ['parser_20and_20runtime_20decode_20module_20documentation_0',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]] ]; diff --git a/docs/html/search/pages_5.js b/docs/html/search/pages_5.js index 25f5fce..8b9b038 100644 --- a/docs/html/search/pages_5.js +++ b/docs/html/search/pages_5.js @@ -1,5 +1,4 @@ var searchData= [ - ['regression_20tests_0',['QtTest regression tests',['../md_tests_2README.html',1,'']]], - ['runtime_20decode_20module_20documentation_1',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]] + ['qttest_20regression_20tests_0',['QtTest regression tests',['../md_tests_2README.html',1,'']]] ]; diff --git a/docs/html/search/pages_6.js b/docs/html/search/pages_6.js index 7f0360c..25f5fce 100644 --- a/docs/html/search/pages_6.js +++ b/docs/html/search/pages_6.js @@ -1,4 +1,5 @@ var searchData= [ - ['tests_0',['QtTest regression tests',['../md_tests_2README.html',1,'']]] + ['regression_20tests_0',['QtTest regression tests',['../md_tests_2README.html',1,'']]], + ['runtime_20decode_20module_20documentation_1',['DBC Parser and Runtime Decode Module Documentation',['../md_README.html',1,'']]] ]; diff --git a/docs/html/search/pages_7.js b/docs/html/search/pages_7.js new file mode 100644 index 0000000..7f0360c --- /dev/null +++ b/docs/html/search/pages_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['tests_0',['QtTest regression tests',['../md_tests_2README.html',1,'']]] +]; diff --git a/docs/html/search/searchdata.js b/docs/html/search/searchdata.js index 6f7bbcc..7aa779b 100644 --- a/docs/html/search/searchdata.js +++ b/docs/html/search/searchdata.js @@ -1,12 +1,12 @@ var indexSectionsWithContent = { - 0: "1234abcdefghilmnopqrstuvw", - 1: "dfrst", + 0: "01234abcdefghilmnopqrstuvw—", + 1: "dfmprst", 2: "defst", 3: "abcdfgprt", 4: "bcdfhilmnoprstuv", 5: "bnv", - 6: "admpqrt" + 6: "acdmpqrt" }; var indexSectionNames = diff --git a/docs/html/search/variables_b.js b/docs/html/search/variables_b.js index 4d557e6..52b5519 100644 --- a/docs/html/search/variables_b.js +++ b/docs/html/search/variables_b.js @@ -1,5 +1,5 @@ var searchData= [ - ['rawvalue_0',['rawValue',['../structDecodedSignalValue.html#a95db4f7f93b5f311e8f272833e45055e',1,'DecodedSignalValue']]], + ['rawvalue_0',['rawValue',['../structDecodedSignalValue.html#a503c90b4b1a610b8252c45e466367c28',1,'DecodedSignalValue']]], ['receivers_1',['receivers',['../structDecodeSignal.html#abdbae62a64d2df716bf60c6b67b30eaa',1,'DecodeSignal::receivers'],['../structSignalInfo.html#a2c95562fd0b29327a7fd7b1e6feee7f3',1,'SignalInfo::receivers']]] ]; diff --git a/docs/html/search/variables_f.js b/docs/html/search/variables_f.js index b36f63c..d699763 100644 --- a/docs/html/search/variables_f.js +++ b/docs/html/search/variables_f.js @@ -1,5 +1,6 @@ var searchData= [ ['valid_0',['valid',['../structDecodedSignalValue.html#aac0ed361af545cde48d0e6f41a859686',1,'DecodedSignalValue::valid'],['../structDecodedFrameValue.html#a4f51c31110dba1f73a763c596372beb0',1,'DecodedFrameValue::valid']]], - ['valuetype_1',['valueType',['../structDecodeSignal.html#a9d37638129263b8902ba5be59baf39a8',1,'DecodeSignal']]] + ['valuedescriptions_1',['valuedescriptions',['../structDecodeSignal.html#a822155d9bf4ed5f3300c9e9befe606ff',1,'DecodeSignal::valueDescriptions'],['../structSignalInfo.html#a43f47d0433d0cc39076bd7278b46af9c',1,'SignalInfo::valueDescriptions']]], + ['valuetype_2',['valueType',['../structDecodeSignal.html#a9d37638129263b8902ba5be59baf39a8',1,'DecodeSignal']]] ]; diff --git a/docs/html/signal__info_8h.html b/docs/html/signal__info_8h.html index dc673e0..539a0b0 100644 --- a/docs/html/signal__info_8h.html +++ b/docs/html/signal__info_8h.html @@ -98,7 +98,9 @@ $(document).ready(function(){initNavTree('signal__info_8h.html',''); initResizab

    Created: 2026-03-13 Author: Deeaitch (Dim. Himro) More...

    -
    #include <cstdint>
    +
    #include "value_descriptions.h"
    +#include "multiplexing.h"
    +#include <cstdint>
    #include <string>
    #include <vector>
    diff --git a/docs/html/signal__info_8h_source.html b/docs/html/signal__info_8h_source.html index af6ed12..be85141 100644 --- a/docs/html/signal__info_8h_source.html +++ b/docs/html/signal__info_8h_source.html @@ -102,44 +102,48 @@ $(document).ready(function(){initNavTree('signal__info_8h_source.html',''); init
    12#ifndef SIGNAL_INFO_H
    13#define SIGNAL_INFO_H
    14
    -
    15#include <cstdint>
    -
    16#include <string>
    -
    17#include <vector>
    -
    18
    -
    -
    22struct SignalInfo {
    -
    23 std::string name;
    -
    24 std::uint32_t startBit;
    -
    25 std::uint32_t length;
    - -
    27 bool isSigned;
    -
    28 double factor;
    -
    29 double offset;
    -
    30 double minimum;
    -
    31 double maximum;
    -
    32 std::string unit;
    -
    33 std::vector<std::string> receivers;
    -
    34 std::string comment;
    - -
    37 : name(), startBit(0U), length(0U), isLittleEndian(true), isSigned(false), factor(1.0), offset(0.0), minimum(0.0), maximum(0.0), unit(), receivers(), comment() {
    -
    38 }
    -
    39};
    +
    15#include "value_descriptions.h"
    +
    16#include "multiplexing.h"
    +
    17#include <cstdint>
    +
    18#include <string>
    +
    19#include <vector>
    +
    20
    +
    +
    24struct SignalInfo {
    +
    25 Multiplexing multiplexing;
    +
    26 std::string name;
    +
    27 std::uint32_t startBit = 0U;
    +
    28 std::uint32_t length = 0U;
    +
    29 bool isLittleEndian = true;
    +
    30 bool isSigned = false;
    +
    31 double factor = 1.0;
    +
    32 double offset = 0.0;
    +
    33 double minimum = 0.0;
    +
    34 double maximum = 0.0;
    +
    35 std::string unit;
    +
    36 std::vector<std::string> receivers;
    +
    37 ValueDescriptions valueDescriptions;
    +
    38 std::string comment;
    +
    40 SignalInfo() = default;
    +
    41};
    -
    40
    -
    41#endif /* SIGNAL_INFO_H */
    -
    Describes one signal inside a DBC frame.
    Definition signal_info.h:22
    -
    std::uint32_t length
    Definition signal_info.h:25
    -
    std::string unit
    Definition signal_info.h:32
    -
    std::vector< std::string > receivers
    Definition signal_info.h:33
    -
    std::string name
    Definition signal_info.h:23
    -
    bool isSigned
    Definition signal_info.h:27
    -
    double offset
    Definition signal_info.h:29
    -
    std::string comment
    Definition signal_info.h:34
    -
    std::uint32_t startBit
    Definition signal_info.h:24
    -
    double minimum
    Definition signal_info.h:30
    -
    double maximum
    Definition signal_info.h:31
    -
    double factor
    Definition signal_info.h:28
    -
    bool isLittleEndian
    Definition signal_info.h:26
    +
    42
    +
    43#endif /* SIGNAL_INFO_H */
    + +
    Describes one signal inside a DBC frame.
    Definition signal_info.h:24
    +
    std::uint32_t length
    Definition signal_info.h:28
    +
    std::string unit
    Definition signal_info.h:35
    +
    std::vector< std::string > receivers
    Definition signal_info.h:36
    +
    std::string name
    Definition signal_info.h:26
    +
    ValueDescriptions valueDescriptions
    Definition signal_info.h:37
    +
    bool isSigned
    Definition signal_info.h:30
    +
    double offset
    Definition signal_info.h:32
    +
    std::string comment
    Definition signal_info.h:38
    +
    std::uint32_t startBit
    Definition signal_info.h:27
    +
    double minimum
    Definition signal_info.h:33
    +
    double maximum
    Definition signal_info.h:34
    +
    double factor
    Definition signal_info.h:31
    +
    bool isLittleEndian
    Definition signal_info.h:29
    diff --git a/docs/html/structDbcParseContext-members.html b/docs/html/structDbcParseContext-members.html index ba07fa3..dbb3931 100644 --- a/docs/html/structDbcParseContext-members.html +++ b/docs/html/structDbcParseContext-members.html @@ -98,6 +98,11 @@ $(document).ready(function(){initNavTree('structDbcParseContext.html',''); initR + + + + +
    currentFrame (defined in DbcParseContext)DbcParseContext
    database (defined in DbcParseContext)DbcParseContext
    lineNumber (defined in DbcParseContext)DbcParseContext
    pendingValues (defined in DbcParseContext)DbcParseContext
    ResolveValueDescriptions(const std::string &filePath) (defined in DbcParseContext)DbcParseContext
    signalLines (defined in DbcParseContext)DbcParseContext
    ValidateMultiplexing(const std::string &filePath) const (defined in DbcParseContext)DbcParseContext
    diff --git a/docs/html/structDbcParseContext.html b/docs/html/structDbcParseContext.html index 96f151d..39c8a9c 100644 --- a/docs/html/structDbcParseContext.html +++ b/docs/html/structDbcParseContext.html @@ -91,6 +91,7 @@ $(document).ready(function(){initNavTree('structDbcParseContext.html',''); initR
    DbcParseContext Struct Reference
    @@ -99,18 +100,72 @@ $(document).ready(function(){initNavTree('structDbcParseContext.html',''); initR

    #include <dbc_statement_handler.h>

    + + + + + +

    +Public Member Functions

    void ValidateMultiplexing (const std::string &filePath) const
     
    void ResolveValueDescriptions (const std::string &filePath)
     
    + + + + + +

    Public Attributes

    DbcDatabase & database
     
    FrameInfo * currentFrame = nullptr
     
    std::size_t lineNumber = 0U
     
    std::vector< PendingValueDescriptions > pendingValues = {}
     
    std::vector< std::vector< std::size_t > > signalLines = {}
     

    Detailed Description

    Mutable state belonging to one file parse. Handlers do not retain it.

    -

    Definition at line 11 of file dbc_statement_handler.h.

    -

    Member Data Documentation

    +

    Definition at line 19 of file dbc_statement_handler.h.

    +

    Member Function Documentation

    + +

    ◆ ValidateMultiplexing()

    + +
    +
    + + + + + + + + +
    void DbcParseContext::ValidateMultiplexing (const std::string & filePath) const
    +
    + +

    Definition at line 502 of file dbc_statement_handler.cpp.

    + +
    +
    + +

    ◆ ResolveValueDescriptions()

    + +
    +
    + + + + + + + + +
    void DbcParseContext::ResolveValueDescriptions (const std::string & filePath)
    +
    + +

    Definition at line 427 of file dbc_statement_handler.cpp.

    + +
    +
    +

    Member Data Documentation

    ◆ database

    @@ -123,7 +178,7 @@ Public Attributes
    -

    Definition at line 12 of file dbc_statement_handler.h.

    +

    Definition at line 20 of file dbc_statement_handler.h.

    @@ -139,12 +194,61 @@ Public Attributes
    -

    Definition at line 13 of file dbc_statement_handler.h.

    +

    Definition at line 21 of file dbc_statement_handler.h.

    -
    The documentation for this struct was generated from the following file:
      + +

      ◆ lineNumber

      + +
      +
      + + + + +
      std::size_t DbcParseContext::lineNumber = 0U
      +
      + +

      Definition at line 22 of file dbc_statement_handler.h.

      + +
      +
      + +

      ◆ pendingValues

      + +
      +
      + + + + +
      std::vector<PendingValueDescriptions> DbcParseContext::pendingValues = {}
      +
      + +

      Definition at line 23 of file dbc_statement_handler.h.

      + +
      +
      + +

      ◆ signalLines

      + +
      +
      + + + + +
      std::vector<std::vector<std::size_t> > DbcParseContext::signalLines = {}
      +
      + +

      Definition at line 25 of file dbc_statement_handler.h.

      + +
      +
      +
      The documentation for this struct was generated from the following files: diff --git a/docs/html/structDecodeDatabase.html b/docs/html/structDecodeDatabase.html index bc0586d..ee1aced 100644 --- a/docs/html/structDecodeDatabase.html +++ b/docs/html/structDecodeDatabase.html @@ -112,7 +112,7 @@ Public Attributes

      Detailed Description

      Runtime decode database with fast lookup by CAN ID.

      -

      Definition at line 111 of file decode_database.h.

      +

      Definition at line 109 of file decode_database.h.

      Member Data Documentation

      ◆ frames

      @@ -126,7 +126,7 @@ Public Attributes
      -

      Definition at line 112 of file decode_database.h.

      +

      Definition at line 110 of file decode_database.h.

      @@ -142,7 +142,7 @@ Public Attributes
      -

      Definition at line 113 of file decode_database.h.

      +

      Definition at line 111 of file decode_database.h.

      diff --git a/docs/html/structDecodeFrame-members.html b/docs/html/structDecodeFrame-members.html index 84a55c8..9e6679b 100644 --- a/docs/html/structDecodeFrame-members.html +++ b/docs/html/structDecodeFrame-members.html @@ -98,7 +98,7 @@ $(document).ready(function(){initNavTree('structDecodeFrame.html',''); initResiz - + diff --git a/docs/html/structDecodeFrame.html b/docs/html/structDecodeFrame.html index ea5ed23..b370909 100644 --- a/docs/html/structDecodeFrame.html +++ b/docs/html/structDecodeFrame.html @@ -106,15 +106,15 @@ $(document).ready(function(){initNavTree('structDecodeFrame.html',''); initResiz Public Attributes - + - + - + - + - + @@ -126,36 +126,8 @@ Public Attributes

      Detailed Description

      Runtime-ready frame definition.

      -

      Definition at line 61 of file decode_database.h.

      -

      Constructor & Destructor Documentation

      - -

      ◆ DecodeFrame()

      - -
      -
      -
      canIdDecodeFrame
      commentDecodeFrame
      DecodeFrame() (defined in DecodeFrame)DecodeFrameinline
      DecodeFrame()=default (defined in DecodeFrame)DecodeFrame
      dlcDecodeFrame
      hasPgnDecodeFrame
      isExtendedDecodeFrame
      std::string name
       
      std::uint32_t canId
      std::uint32_t canId = 0U
       
      bool isExtended
      bool isExtended = false
       
      std::uint8_t dlc
      std::uint8_t dlc = 0U
       
      std::uint32_t pgn
      std::uint32_t pgn = 0U
       
      bool hasPgn
      bool hasPgn = false
       
      std::string transmitter
       
      - - - - -
      - - - - - - - -
      DecodeFrame::DecodeFrame ()
      -
      -inline
      -
      - -

      Definition at line 72 of file decode_database.h.

      - -
      - -

      Member Data Documentation

      +

      Definition at line 63 of file decode_database.h.

      +

      Member Data Documentation

      ◆ name

      @@ -169,7 +141,7 @@ Public Attributes

      Frame name.

      -

      Definition at line 62 of file decode_database.h.

      +

      Definition at line 64 of file decode_database.h.

      Referenced by DbcDecodeBuilder::Build().

      @@ -182,13 +154,13 @@ Public Attributes
      - +
      std::uint32_t DecodeFrame::canIdstd::uint32_t DecodeFrame::canId = 0U

      Normalized CAN ID.

      -

      Definition at line 63 of file decode_database.h.

      +

      Definition at line 65 of file decode_database.h.

      Referenced by DbcDecodeBuilder::Build().

      @@ -201,13 +173,13 @@ Public Attributes
      - +
      bool DecodeFrame::isExtendedbool DecodeFrame::isExtended = false

      true for extended frame.

      -

      Definition at line 64 of file decode_database.h.

      +

      Definition at line 66 of file decode_database.h.

      Referenced by DbcDecodeBuilder::Build().

      @@ -220,13 +192,13 @@ Public Attributes
      - +
      std::uint8_t DecodeFrame::dlcstd::uint8_t DecodeFrame::dlc = 0U

      Payload length.

      -

      Definition at line 65 of file decode_database.h.

      +

      Definition at line 67 of file decode_database.h.

      Referenced by DbcDecodeBuilder::Build().

      @@ -239,13 +211,13 @@ Public Attributes
      - +
      std::uint32_t DecodeFrame::pgnstd::uint32_t DecodeFrame::pgn = 0U

      PGN if available.

      -

      Definition at line 66 of file decode_database.h.

      +

      Definition at line 68 of file decode_database.h.

      Referenced by DbcDecodeBuilder::Build().

      @@ -258,13 +230,13 @@ Public Attributes
      - +
      bool DecodeFrame::hasPgnbool DecodeFrame::hasPgn = false

      true if PGN is valid.

      -

      Definition at line 67 of file decode_database.h.

      +

      Definition at line 69 of file decode_database.h.

      Referenced by DbcDecodeBuilder::Build().

      @@ -283,7 +255,7 @@ Public Attributes

      Transmitter ECU.

      -

      Definition at line 68 of file decode_database.h.

      +

      Definition at line 70 of file decode_database.h.

      Referenced by DbcDecodeBuilder::Build().

      @@ -302,7 +274,7 @@ Public Attributes

      Frame comment.

      -

      Definition at line 69 of file decode_database.h.

      +

      Definition at line 71 of file decode_database.h.

      Referenced by DbcDecodeBuilder::Build().

      @@ -321,7 +293,7 @@ Public Attributes

      Signal definitions.

      -

      Definition at line 70 of file decode_database.h.

      +

      Definition at line 72 of file decode_database.h.

      diff --git a/docs/html/structDecodeSignal-members.html b/docs/html/structDecodeSignal-members.html index 9701e44..9dbd912 100644 --- a/docs/html/structDecodeSignal-members.html +++ b/docs/html/structDecodeSignal-members.html @@ -98,16 +98,18 @@ $(document).ready(function(){initNavTree('structDecodeSignal.html',''); initResi - + - - - - - + + + + + + +
      byteOrderDecodeSignal
      commentDecodeSignal
      DecodeSignal() (defined in DecodeSignal)DecodeSignalinline
      DecodeSignal()=default (defined in DecodeSignal)DecodeSignal
      factorDecodeSignal
      lengthDecodeSignal
      maximumDecodeSignal
      minimumDecodeSignal
      nameDecodeSignal
      offsetDecodeSignal
      receiversDecodeSignal
      startBitDecodeSignal
      unitDecodeSignal
      multiplexing (defined in DecodeSignal)DecodeSignal
      nameDecodeSignal
      offsetDecodeSignal
      receiversDecodeSignal
      startBitDecodeSignal
      unitDecodeSignal
      valueDescriptionsDecodeSignal
      valueTypeDecodeSignal
      diff --git a/docs/html/structDecodeSignal.html b/docs/html/structDecodeSignal.html index 282849c..4fc775c 100644 --- a/docs/html/structDecodeSignal.html +++ b/docs/html/structDecodeSignal.html @@ -104,64 +104,56 @@ $(document).ready(function(){initNavTree('structDecodeSignal.html',''); initResi + + - + - + - + - + - + - + - + - + + +

      Public Attributes

      Multiplexing multiplexing
       
      std::string name
       
      std::uint32_t startBit
      std::uint32_t startBit = 0U
       
      std::uint32_t length
      std::uint32_t length = 0U
       
      ByteOrder byteOrder
      ByteOrder byteOrder = ByteOrder::Intel
       
      ValueType valueType
      ValueType valueType = ValueType::Unsigned
       
      double factor
      double factor = 1.0
       
      double offset
      double offset = 0.0
       
      double minimum
      double minimum = 0.0
       
      double maximum
      double maximum = 0.0
       
      std::string unit
       
      std::vector< std::string > receivers
       
      ValueDescriptions valueDescriptions
       
      std::string comment
       

      Detailed Description

      Runtime-ready signal definition.

      -

      Definition at line 39 of file decode_database.h.

      -

      Constructor & Destructor Documentation

      - -

      ◆ DecodeSignal()

      +

      Definition at line 41 of file decode_database.h.

      +

      Member Data Documentation

      + +

      ◆ multiplexing

      - - - - - -
      - - - - +
      DecodeSignal::DecodeSignal ()Multiplexing DecodeSignal::multiplexing
      -
      -inline
      -

      Definition at line 53 of file decode_database.h.

      +

      Definition at line 42 of file decode_database.h.

      -

      Member Data Documentation

      ◆ name

      @@ -175,7 +167,7 @@ Public Attributes

      Signal name.

      -

      Definition at line 40 of file decode_database.h.

      +

      Definition at line 43 of file decode_database.h.

      Referenced by DbcDecodeBuilder::Build().

      @@ -188,13 +180,13 @@ Public Attributes
      - +
      std::uint32_t DecodeSignal::startBitstd::uint32_t DecodeSignal::startBit = 0U

      DBC start bit.

      -

      Definition at line 41 of file decode_database.h.

      +

      Definition at line 44 of file decode_database.h.

      Referenced by DbcDecodeBuilder::Build().

      @@ -207,15 +199,15 @@ Public Attributes
      - +
      std::uint32_t DecodeSignal::lengthstd::uint32_t DecodeSignal::length = 0U

      Signal length in bits.

      -

      Definition at line 42 of file decode_database.h.

      +

      Definition at line 45 of file decode_database.h.

      -

      Referenced by DbcDecodeBuilder::Build(), and DbcDecoder::Decode().

      +

      Referenced by DbcDecodeBuilder::Build().

      @@ -226,13 +218,13 @@ Public Attributes
      - +
      ByteOrder DecodeSignal::byteOrderByteOrder DecodeSignal::byteOrder = ByteOrder::Intel

      Intel or Motorola.

      -

      Definition at line 43 of file decode_database.h.

      +

      Definition at line 46 of file decode_database.h.

      Referenced by DbcDecodeBuilder::Build().

      @@ -245,15 +237,15 @@ Public Attributes
      - +
      ValueType DecodeSignal::valueTypeValueType DecodeSignal::valueType = ValueType::Unsigned

      Signed or unsigned.

      -

      Definition at line 44 of file decode_database.h.

      +

      Definition at line 47 of file decode_database.h.

      -

      Referenced by DbcDecodeBuilder::Build(), and DbcDecoder::Decode().

      +

      Referenced by DbcDecodeBuilder::Build().

      @@ -264,15 +256,15 @@ Public Attributes
      - +
      double DecodeSignal::factordouble DecodeSignal::factor = 1.0

      Scaling factor.

      -

      Definition at line 45 of file decode_database.h.

      +

      Definition at line 48 of file decode_database.h.

      -

      Referenced by DbcDecodeBuilder::Build(), and DbcDecoder::Decode().

      +

      Referenced by DbcDecodeBuilder::Build().

      @@ -283,15 +275,15 @@ Public Attributes
      - +
      double DecodeSignal::offsetdouble DecodeSignal::offset = 0.0

      Physical offset.

      -

      Definition at line 46 of file decode_database.h.

      +

      Definition at line 49 of file decode_database.h.

      -

      Referenced by DbcDecodeBuilder::Build(), and DbcDecoder::Decode().

      +

      Referenced by DbcDecodeBuilder::Build().

      @@ -302,13 +294,13 @@ Public Attributes
      - +
      double DecodeSignal::minimumdouble DecodeSignal::minimum = 0.0

      Minimum physical value.

      -

      Definition at line 47 of file decode_database.h.

      +

      Definition at line 50 of file decode_database.h.

      Referenced by DbcDecodeBuilder::Build().

      @@ -321,13 +313,13 @@ Public Attributes
      - +
      double DecodeSignal::maximumdouble DecodeSignal::maximum = 0.0

      Maximum physical value.

      -

      Definition at line 48 of file decode_database.h.

      +

      Definition at line 51 of file decode_database.h.

      Referenced by DbcDecodeBuilder::Build().

      @@ -346,7 +338,7 @@ Public Attributes

      Physical unit.

      -

      Definition at line 49 of file decode_database.h.

      +

      Definition at line 52 of file decode_database.h.

      Referenced by DbcDecodeBuilder::Build().

      @@ -365,10 +357,29 @@ Public Attributes

      Receivers.

      -

      Definition at line 50 of file decode_database.h.

      +

      Definition at line 53 of file decode_database.h.

      Referenced by DbcDecodeBuilder::Build().

      +
      +
      + +

      ◆ valueDescriptions

      + +
      +
      + + + + +
      ValueDescriptions DecodeSignal::valueDescriptions
      +
      +

      Raw integer state descriptions.

      + +

      Definition at line 54 of file decode_database.h.

      + +

      Referenced by DbcDecodeBuilder::Build(), and DecodedSignalValue::GetValueDescription().

      +
      @@ -384,7 +395,7 @@ Public Attributes

      Comment.

      -

      Definition at line 51 of file decode_database.h.

      +

      Definition at line 55 of file decode_database.h.

      Referenced by DbcDecodeBuilder::Build().

      diff --git a/docs/html/structDecodeSignal.js b/docs/html/structDecodeSignal.js index 10381c9..6284253 100644 --- a/docs/html/structDecodeSignal.js +++ b/docs/html/structDecodeSignal.js @@ -11,5 +11,6 @@ var structDecodeSignal = [ "maximum", "structDecodeSignal.html#a4a6ba87142a9badbf0ca830e9e709cb7", null ], [ "unit", "structDecodeSignal.html#a38eed9ca7581423fd8bfbedcffc12092", null ], [ "receivers", "structDecodeSignal.html#abdbae62a64d2df716bf60c6b67b30eaa", null ], + [ "valueDescriptions", "structDecodeSignal.html#a822155d9bf4ed5f3300c9e9befe606ff", null ], [ "comment", "structDecodeSignal.html#ae28c905d4a2bc86419c2a8361bfea473", null ] ]; \ No newline at end of file diff --git a/docs/html/structDecodedFrameValue-members.html b/docs/html/structDecodedFrameValue-members.html index 62ad8f2..4d9b779 100644 --- a/docs/html/structDecodedFrameValue-members.html +++ b/docs/html/structDecodedFrameValue-members.html @@ -96,7 +96,7 @@ $(document).ready(function(){initNavTree('structDecodedFrameValue.html',''); ini

      This is the complete list of members for DecodedFrameValue, including all inherited members.

      - + diff --git a/docs/html/structDecodedFrameValue.html b/docs/html/structDecodedFrameValue.html index 878cddd..40faccb 100644 --- a/docs/html/structDecodedFrameValue.html +++ b/docs/html/structDecodedFrameValue.html @@ -104,46 +104,18 @@ $(document).ready(function(){initNavTree('structDecodedFrameValue.html',''); ini
      DecodedFrameValue() (defined in DecodedFrameValue)DecodedFrameValueinline
      DecodedFrameValue()=default (defined in DecodedFrameValue)DecodedFrameValue
      definitionDecodedFrameValue
      publicDecodedFrameValue
      validDecodedFrameValue
      - + - +

      Public Attributes

      const DecodeFrame * definition
      const DecodeFrame * definition = nullptr
       
      std::vector< DecodedSignalValue > public
       
      bool valid
      bool valid = false
       

      Detailed Description

      Fully decoded frame.

      -

      Definition at line 51 of file dbc_decoder.h.

      -

      Constructor & Destructor Documentation

      - -

      ◆ DecodedFrameValue()

      - -
      -
      - - - - - -
      - - - - - - - -
      DecodedFrameValue::DecodedFrameValue ()
      -
      -inline
      -
      - -

      Definition at line 56 of file dbc_decoder.h.

      - -
      -
      -

      Member Data Documentation

      +

      Definition at line 61 of file dbc_decoder.h.

      +

      Member Data Documentation

      ◆ definition

      @@ -151,13 +123,13 @@ Public Attributes
      - +
      const DecodeFrame* DecodedFrameValue::definitionconst DecodeFrame* DecodedFrameValue::definition = nullptr

      Frame definition.

      -

      Definition at line 52 of file dbc_decoder.h.

      +

      Definition at line 62 of file dbc_decoder.h.

      Referenced by DbcDecoder::Decode().

      @@ -176,7 +148,7 @@ Public Attributes

      Decoded signal values.

      -

      Definition at line 53 of file dbc_decoder.h.

      +

      Definition at line 63 of file dbc_decoder.h.

      @@ -187,13 +159,13 @@ Public Attributes
      - +
      bool DecodedFrameValue::validbool DecodedFrameValue::valid = false

      true if frame was matched.

      -

      Definition at line 54 of file dbc_decoder.h.

      +

      Definition at line 64 of file dbc_decoder.h.

      Referenced by DbcDecoder::Decode().

      diff --git a/docs/html/structDecodedSignalValue-members.html b/docs/html/structDecodedSignalValue-members.html index 7e3b1e6..c7fea96 100644 --- a/docs/html/structDecodedSignalValue-members.html +++ b/docs/html/structDecodedSignalValue-members.html @@ -96,10 +96,12 @@ $(document).ready(function(){initNavTree('structDecodedSignalValue.html',''); in

      This is the complete list of members for DecodedSignalValue, including all inherited members.

      - + - - + + + +
      DecodedSignalValue() (defined in DecodedSignalValue)DecodedSignalValueinline
      DecodedSignalValue()=default (defined in DecodedSignalValue)DecodedSignalValue
      definitionDecodedSignalValue
      physicalValueDecodedSignalValue
      rawValueDecodedSignalValue
      GetValueDescription() constDecodedSignalValueinline
      physicalValueDecodedSignalValue
      rawValueDecodedSignalValue
      status (defined in DecodedSignalValue)DecodedSignalValue
      validDecodedSignalValue
      diff --git a/docs/html/structDecodedSignalValue.html b/docs/html/structDecodedSignalValue.html index 0717be8..1b35271 100644 --- a/docs/html/structDecodedSignalValue.html +++ b/docs/html/structDecodedSignalValue.html @@ -91,6 +91,7 @@ $(document).ready(function(){initNavTree('structDecodedSignalValue.html',''); in
      DecodedSignalValue Struct Reference
      @@ -102,24 +103,31 @@ $(document).ready(function(){initNavTree('structDecodedSignalValue.html',''); in

      #include <dbc_decoder.h>

      + + + +

      +Public Member Functions

      const std::string * GetValueDescription () const
       
      - + - - - + + + - + + +

      Public Attributes

      const DecodeSignal * definition
      const DecodeSignal * definition = nullptr
       
      std::variant< std::int64_t, std::uint64_t > rawValue
       
      double physicalValue
      RawSignalValue rawValue = std::uint64_t(0U)
       
      double physicalValue = 0.0
       
      bool valid
      bool valid = false
       
      SignalDecodeStatus status = SignalDecodeStatus::InvalidDefinition
       

      Detailed Description

      One decoded signal value.

      -

      Definition at line 37 of file dbc_decoder.h.

      -

      Constructor & Destructor Documentation

      - -

      ◆ DecodedSignalValue()

      +

      Definition at line 43 of file dbc_decoder.h.

      +

      Member Function Documentation

      + +

      ◆ GetValueDescription()

      @@ -128,10 +136,10 @@ Public Attributes - + - +
      DecodedSignalValue::DecodedSignalValue const std::string * DecodedSignalValue::GetValueDescription ( ) const
      @@ -140,8 +148,11 @@ Public Attributes
      +

      Lookup using the raw integer; nullptr for invalid or unmapped values.

      -

      Definition at line 43 of file dbc_decoder.h.

      +

      Definition at line 51 of file dbc_decoder.h.

      + +

      References definition, rawValue, valid, and DecodeSignal::valueDescriptions.

      @@ -153,34 +164,34 @@ Public Attributes
      - +
      const DecodeSignal* DecodedSignalValue::definitionconst DecodeSignal* DecodedSignalValue::definition = nullptr

      Signal definition.

      -

      Definition at line 38 of file dbc_decoder.h.

      +

      Definition at line 44 of file dbc_decoder.h.

      -

      Referenced by DbcDecoder::Decode().

      +

      Referenced by GetValueDescription().

      - -

      ◆ rawValue

      + +

      ◆ rawValue

      - +
      std::variant<std::int64_t, std::uint64_t> DecodedSignalValue::rawValueRawSignalValue DecodedSignalValue::rawValue = std::uint64_t(0U)

      Exact signed or unsigned raw value.

      -

      Definition at line 39 of file dbc_decoder.h.

      +

      Definition at line 45 of file dbc_decoder.h.

      -

      Referenced by DbcDecoder::Decode().

      +

      Referenced by GetValueDescription().

      @@ -191,15 +202,13 @@ Public Attributes
      - +
      double DecodedSignalValue::physicalValuedouble DecodedSignalValue::physicalValue = 0.0

      Converted physical value.

      -

      Definition at line 40 of file dbc_decoder.h.

      - -

      Referenced by DbcDecoder::Decode().

      +

      Definition at line 46 of file dbc_decoder.h.

      @@ -210,15 +219,31 @@ Public Attributes
      - +
      bool DecodedSignalValue::validbool DecodedSignalValue::valid = false

      true if decoding succeeded.

      -

      Definition at line 41 of file dbc_decoder.h.

      +

      Definition at line 47 of file dbc_decoder.h.

      -

      Referenced by DbcDecoder::Decode().

      +

      Referenced by GetValueDescription().

      + +
      + + +

      ◆ status

      + +
      +
      + + + + +
      SignalDecodeStatus DecodedSignalValue::status = SignalDecodeStatus::InvalidDefinition
      +
      + +

      Definition at line 48 of file dbc_decoder.h.

      diff --git a/docs/html/structDecodedSignalValue.js b/docs/html/structDecodedSignalValue.js index 8ea1ace..d4a015f 100644 --- a/docs/html/structDecodedSignalValue.js +++ b/docs/html/structDecodedSignalValue.js @@ -1,7 +1,8 @@ var structDecodedSignalValue = [ + [ "GetValueDescription", "structDecodedSignalValue.html#affc38af1bf31bcb6f2c33044bce92bd2", null ], [ "definition", "structDecodedSignalValue.html#acadc3b3bb21dd6b0412d342c7e6b20d7", null ], - [ "rawValue", "structDecodedSignalValue.html#a95db4f7f93b5f311e8f272833e45055e", null ], + [ "rawValue", "structDecodedSignalValue.html#a503c90b4b1a610b8252c45e466367c28", null ], [ "physicalValue", "structDecodedSignalValue.html#a6847d05b3cb00d5e0f6c611968f57978", null ], [ "valid", "structDecodedSignalValue.html#aac0ed361af545cde48d0e6f41a859686", null ] ]; \ No newline at end of file diff --git a/docs/html/structFrameInfo-members.html b/docs/html/structFrameInfo-members.html index 5826700..76b58f3 100644 --- a/docs/html/structFrameInfo-members.html +++ b/docs/html/structFrameInfo-members.html @@ -99,7 +99,7 @@ $(document).ready(function(){initNavTree('structFrameInfo.html',''); initResizab canIdFrameInfo commentFrameInfo dlcFrameInfo - FrameInfo() (defined in FrameInfo)FrameInfoinline + FrameInfo()=default (defined in FrameInfo)FrameInfo hasPgnFrameInfo isExtendedFrameInfo nameFrameInfo diff --git a/docs/html/structFrameInfo.html b/docs/html/structFrameInfo.html index 030e61f..d0d3cca 100644 --- a/docs/html/structFrameInfo.html +++ b/docs/html/structFrameInfo.html @@ -106,15 +106,15 @@ $(document).ready(function(){initNavTree('structFrameInfo.html',''); initResizab Public Attributes std::string name   -std::uint32_t canId +std::uint32_t canId = 0U   -bool isExtended +bool isExtended = false   -std::uint32_t pgn +std::uint32_t pgn = 0U   -bool hasPgn +bool hasPgn = false   -std::uint8_t dlc +std::uint8_t dlc = 0U   std::string transmitter   @@ -127,35 +127,7 @@ Public Attributes

      Describes one CAN frame from a DBC file.

      Definition at line 24 of file frame_info.h.

      -

      Constructor & Destructor Documentation

      - -

      ◆ FrameInfo()

      - -
      -
      - - - - - -
      - - - - - - - -
      FrameInfo::FrameInfo ()
      -
      -inline
      -
      - -

      Definition at line 35 of file frame_info.h.

      - -
      -
      -

      Member Data Documentation

      +

      Member Data Documentation

      ◆ name

      @@ -171,8 +143,6 @@ Public Attributes

      Definition at line 25 of file frame_info.h.

      -

      Referenced by DbcDecodeBuilder::Build().

      - @@ -182,7 +152,7 @@ Public Attributes
      - +
      std::uint32_t FrameInfo::canIdstd::uint32_t FrameInfo::canId = 0U
      @@ -190,8 +160,6 @@ Public Attributes

      Definition at line 26 of file frame_info.h.

      -

      Referenced by DbcDecodeBuilder::Build().

      -
      @@ -201,7 +169,7 @@ Public Attributes
      - +
      bool FrameInfo::isExtendedbool FrameInfo::isExtended = false
      @@ -209,8 +177,6 @@ Public Attributes

      Definition at line 27 of file frame_info.h.

      -

      Referenced by DbcDecodeBuilder::Build().

      -
      @@ -220,7 +186,7 @@ Public Attributes
      - +
      std::uint32_t FrameInfo::pgnstd::uint32_t FrameInfo::pgn = 0U
      @@ -228,8 +194,6 @@ Public Attributes

      Definition at line 28 of file frame_info.h.

      -

      Referenced by DbcDecodeBuilder::Build().

      -
      @@ -239,7 +203,7 @@ Public Attributes
      - +
      bool FrameInfo::hasPgnbool FrameInfo::hasPgn = false
      @@ -247,8 +211,6 @@ Public Attributes

      Definition at line 29 of file frame_info.h.

      -

      Referenced by DbcDecodeBuilder::Build().

      -
      @@ -258,7 +220,7 @@ Public Attributes
      - +
      std::uint8_t FrameInfo::dlcstd::uint8_t FrameInfo::dlc = 0U
      @@ -266,8 +228,6 @@ Public Attributes

      Definition at line 30 of file frame_info.h.

      -

      Referenced by DbcDecodeBuilder::Build().

      -
      @@ -285,8 +245,6 @@ Public Attributes

      Definition at line 31 of file frame_info.h.

      -

      Referenced by DbcDecodeBuilder::Build().

      - @@ -304,8 +262,6 @@ Public Attributes

      Definition at line 32 of file frame_info.h.

      -

      Referenced by DbcDecodeBuilder::Build().

      - diff --git a/docs/html/structFrameKey-members.html b/docs/html/structFrameKey-members.html index 9973d4c..7700119 100644 --- a/docs/html/structFrameKey-members.html +++ b/docs/html/structFrameKey-members.html @@ -97,7 +97,7 @@ $(document).ready(function(){initNavTree('structFrameKey.html',''); initResizabl

      This is the complete list of members for FrameKey, including all inherited members.

      - + diff --git a/docs/html/structFrameKey.html b/docs/html/structFrameKey.html index b40bb68..40c6dc2 100644 --- a/docs/html/structFrameKey.html +++ b/docs/html/structFrameKey.html @@ -112,9 +112,9 @@ Public Member Functions
      canId (defined in FrameKey)FrameKey
      FrameKey() (defined in FrameKey)FrameKeyinline
      FrameKey()=default (defined in FrameKey)FrameKey
      FrameKey(std::uint32_t id, bool extended) (defined in FrameKey)FrameKeyinline
      isExtended (defined in FrameKey)FrameKey
      operator==(const FrameKey &other) const (defined in FrameKey)FrameKeyinline
      - + - +

      Public Attributes

      std::uint32_t canId
      std::uint32_t canId = 0U
       
      bool isExtended
      bool isExtended = false
       

      Detailed Description

      @@ -122,35 +122,8 @@ Public Attributes

      Definition at line 80 of file decode_database.h.

      Constructor & Destructor Documentation

      - -

      ◆ FrameKey() [1/2]

      - -
      -
      - - - - - -
      - - - - - - - -
      FrameKey::FrameKey ()
      -
      -inline
      -
      - -

      Definition at line 84 of file decode_database.h.

      - -
      -
      -

      ◆ FrameKey() [2/2]

      +

      ◆ FrameKey()

      @@ -183,7 +156,7 @@ Public Attributes
      -

      Definition at line 88 of file decode_database.h.

      +

      Definition at line 86 of file decode_database.h.

      @@ -212,7 +185,7 @@ Public Attributes
      -

      Definition at line 92 of file decode_database.h.

      +

      Definition at line 90 of file decode_database.h.

      @@ -224,7 +197,7 @@ Public Attributes
      - +
      std::uint32_t FrameKey::canIdstd::uint32_t FrameKey::canId = 0U
      @@ -240,7 +213,7 @@ Public Attributes
      - +
      bool FrameKey::isExtendedbool FrameKey::isExtended = false
      diff --git a/docs/html/structFrameKeyHasher.html b/docs/html/structFrameKeyHasher.html index 1d0bcf9..c559633 100644 --- a/docs/html/structFrameKeyHasher.html +++ b/docs/html/structFrameKeyHasher.html @@ -110,7 +110,7 @@ Public Member Functions

      Detailed Description

      Hasher for frame key.

      -

      Definition at line 100 of file decode_database.h.

      +

      Definition at line 98 of file decode_database.h.

      Member Function Documentation

      ◆ operator()()

      @@ -136,7 +136,7 @@ Public Member Functions
      -

      Definition at line 101 of file decode_database.h.

      +

      Definition at line 99 of file decode_database.h.

      diff --git a/docs/html/structMultiplexing-members.html b/docs/html/structMultiplexing-members.html new file mode 100644 index 0000000..b623616 --- /dev/null +++ b/docs/html/structMultiplexing-members.html @@ -0,0 +1,110 @@ + + + + + + + +DBC Framework: Member List + + + + + + + + + + + + + +
      +
      + + + + + + +
      +
      DBC Framework +
      +
      DBC parsing and CAN signal decoding framework
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      +
      +
      +
      +
      +
      Loading...
      +
      Searching...
      +
      No Matches
      +
      +
      +
      +
      + +
      +
      Multiplexing Member List
      +
      +
      + +

      This is the complete list of members for Multiplexing, including all inherited members.

      + + + +
      role (defined in Multiplexing)Multiplexing
      value (defined in Multiplexing)Multiplexing
      +
      + + + + diff --git a/docs/html/structMultiplexing.html b/docs/html/structMultiplexing.html new file mode 100644 index 0000000..27a00c2 --- /dev/null +++ b/docs/html/structMultiplexing.html @@ -0,0 +1,159 @@ + + + + + + + +DBC Framework: Multiplexing Struct Reference + + + + + + + + + + + + + +
      +
      + + + + + + +
      +
      DBC Framework +
      +
      DBC parsing and CAN signal decoding framework
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      +
      +
      +
      +
      +
      Loading...
      +
      Searching...
      +
      No Matches
      +
      +
      +
      +
      + +
      + +
      Multiplexing Struct Reference
      +
      +
      + +

      #include <multiplexing.h>

      + + + + + + +

      +Public Attributes

      MultiplexRole role = MultiplexRole::Unconditional
       
      std::uint64_t value = 0U
       
      +

      Detailed Description

      +

      Basic multiplexing: one unsigned selector per frame, one raw value per branch.

      + +

      Definition at line 14 of file multiplexing.h.

      +

      Member Data Documentation

      + +

      ◆ role

      + +
      +
      + + + + +
      MultiplexRole Multiplexing::role = MultiplexRole::Unconditional
      +
      + +

      Definition at line 15 of file multiplexing.h.

      + +
      +
      + +

      ◆ value

      + +
      +
      + + + + +
      std::uint64_t Multiplexing::value = 0U
      +
      + +

      Definition at line 16 of file multiplexing.h.

      + +
      +
      +
      The documentation for this struct was generated from the following file: +
      +
      + + + + diff --git a/docs/html/structPendingValueDescriptions-members.html b/docs/html/structPendingValueDescriptions-members.html new file mode 100644 index 0000000..a91c4eb --- /dev/null +++ b/docs/html/structPendingValueDescriptions-members.html @@ -0,0 +1,113 @@ + + + + + + + +DBC Framework: Member List + + + + + + + + + + + + + +
      +
      + + + + + + +
      +
      DBC Framework +
      +
      DBC parsing and CAN signal decoding framework
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      +
      +
      +
      +
      +
      Loading...
      +
      Searching...
      +
      No Matches
      +
      +
      +
      +
      + +
      +
      PendingValueDescriptions Member List
      +
      +
      + +

      This is the complete list of members for PendingValueDescriptions, including all inherited members.

      + + + + + + +
      canId (defined in PendingValueDescriptions)PendingValueDescriptions
      descriptions (defined in PendingValueDescriptions)PendingValueDescriptions
      isExtended (defined in PendingValueDescriptions)PendingValueDescriptions
      lineNumber (defined in PendingValueDescriptions)PendingValueDescriptions
      signalName (defined in PendingValueDescriptions)PendingValueDescriptions
      +
      + + + + diff --git a/docs/html/structPendingValueDescriptions.html b/docs/html/structPendingValueDescriptions.html new file mode 100644 index 0000000..3987e78 --- /dev/null +++ b/docs/html/structPendingValueDescriptions.html @@ -0,0 +1,210 @@ + + + + + + + +DBC Framework: PendingValueDescriptions Struct Reference + + + + + + + + + + + + + +
      +
      + + + + + + +
      +
      DBC Framework +
      +
      DBC parsing and CAN signal decoding framework
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      +
      +
      +
      +
      +
      Loading...
      +
      Searching...
      +
      No Matches
      +
      +
      +
      +
      + +
      + +
      PendingValueDescriptions Struct Reference
      +
      +
      + + + + + + + + + + + + +

      +Public Attributes

      std::uint32_t canId
       
      bool isExtended
       
      std::string signalName
       
      ValueDescriptions descriptions
       
      std::size_t lineNumber
       
      +

      Detailed Description

      +
      +

      Definition at line 10 of file dbc_statement_handler.h.

      +

      Member Data Documentation

      + +

      ◆ canId

      + +
      +
      + + + + +
      std::uint32_t PendingValueDescriptions::canId
      +
      + +

      Definition at line 11 of file dbc_statement_handler.h.

      + +
      +
      + +

      ◆ isExtended

      + +
      +
      + + + + +
      bool PendingValueDescriptions::isExtended
      +
      + +

      Definition at line 12 of file dbc_statement_handler.h.

      + +
      +
      + +

      ◆ signalName

      + +
      +
      + + + + +
      std::string PendingValueDescriptions::signalName
      +
      + +

      Definition at line 13 of file dbc_statement_handler.h.

      + +
      +
      + +

      ◆ descriptions

      + +
      +
      + + + + +
      ValueDescriptions PendingValueDescriptions::descriptions
      +
      + +

      Definition at line 14 of file dbc_statement_handler.h.

      + +
      +
      + +

      ◆ lineNumber

      + +
      +
      + + + + +
      std::size_t PendingValueDescriptions::lineNumber
      +
      + +

      Definition at line 15 of file dbc_statement_handler.h.

      + +
      +
      +
      The documentation for this struct was generated from the following file: +
      +
      + + + + diff --git a/docs/html/structRawCanFrame-members.html b/docs/html/structRawCanFrame-members.html index bf17a56..27ba5f1 100644 --- a/docs/html/structRawCanFrame-members.html +++ b/docs/html/structRawCanFrame-members.html @@ -99,7 +99,7 @@ $(document).ready(function(){initNavTree('structRawCanFrame.html',''); initResiz canIdRawCanFrame dataRawCanFrame isExtendedRawCanFrame - RawCanFrame() (defined in RawCanFrame)RawCanFrameinline + RawCanFrame()=default (defined in RawCanFrame)RawCanFrame diff --git a/docs/html/structRawCanFrame.html b/docs/html/structRawCanFrame.html index 235ac24..f5c1288 100644 --- a/docs/html/structRawCanFrame.html +++ b/docs/html/structRawCanFrame.html @@ -104,9 +104,9 @@ $(document).ready(function(){initNavTree('structRawCanFrame.html',''); initResiz - + - + @@ -115,35 +115,7 @@ Public Attributes

      Raw CAN frame used for runtime or trace decoding.

      Definition at line 24 of file dbc_decoder.h.

      -

      Constructor & Destructor Documentation

      - -

      ◆ RawCanFrame()

      - -
      -
      -

      Public Attributes

      std::uint32_t canId
      std::uint32_t canId = 0U
       
      bool isExtended
      bool isExtended = false
       
      std::vector< std::uint8_t > data
       
      - - - - -
      - - - - - - - -
      RawCanFrame::RawCanFrame ()
      -
      -inline
      -
      - -

      Definition at line 29 of file dbc_decoder.h.

      - -
      - -

      Member Data Documentation

      +

      Member Data Documentation

      ◆ canId

      @@ -151,7 +123,7 @@ Public Attributes
      - +
      std::uint32_t RawCanFrame::canIdstd::uint32_t RawCanFrame::canId = 0U
      @@ -170,7 +142,7 @@ Public Attributes
      - +
      bool RawCanFrame::isExtendedbool RawCanFrame::isExtended = false
      @@ -197,8 +169,6 @@ Public Attributes

      Definition at line 27 of file dbc_decoder.h.

      -

      Referenced by DbcDecoder::Decode().

      -

      The documentation for this struct was generated from the following file:
        diff --git a/docs/html/structSignalInfo-members.html b/docs/html/structSignalInfo-members.html index 35f6bc2..6557d7f 100644 --- a/docs/html/structSignalInfo-members.html +++ b/docs/html/structSignalInfo-members.html @@ -103,12 +103,14 @@ $(document).ready(function(){initNavTree('structSignalInfo.html',''); initResiza lengthSignalInfo maximumSignalInfo minimumSignalInfo - nameSignalInfo - offsetSignalInfo - receiversSignalInfo - SignalInfo() (defined in SignalInfo)SignalInfoinline - startBitSignalInfo - unitSignalInfo + multiplexing (defined in SignalInfo)SignalInfo + nameSignalInfo + offsetSignalInfo + receiversSignalInfo + SignalInfo()=default (defined in SignalInfo)SignalInfo + startBitSignalInfo + unitSignalInfo + valueDescriptionsSignalInfo diff --git a/docs/html/structSignalInfo.html b/docs/html/structSignalInfo.html index e511e99..227c4e4 100644 --- a/docs/html/structSignalInfo.html +++ b/docs/html/structSignalInfo.html @@ -104,64 +104,56 @@ $(document).ready(function(){initNavTree('structSignalInfo.html',''); initResiza + + - + - + - + - + - + - + - + - + + +

        Public Attributes

        Multiplexing multiplexing
         
        std::string name
         
        std::uint32_t startBit
        std::uint32_t startBit = 0U
         
        std::uint32_t length
        std::uint32_t length = 0U
         
        bool isLittleEndian
        bool isLittleEndian = true
         
        bool isSigned
        bool isSigned = false
         
        double factor
        double factor = 1.0
         
        double offset
        double offset = 0.0
         
        double minimum
        double minimum = 0.0
         
        double maximum
        double maximum = 0.0
         
        std::string unit
         
        std::vector< std::string > receivers
         
        ValueDescriptions valueDescriptions
         
        std::string comment
         

        Detailed Description

        Describes one signal inside a DBC frame.

        -

        Definition at line 22 of file signal_info.h.

        -

        Constructor & Destructor Documentation

        - -

        ◆ SignalInfo()

        +

        Definition at line 24 of file signal_info.h.

        +

        Member Data Documentation

        + +

        ◆ multiplexing

        - - - - - -
        - - - - +
        SignalInfo::SignalInfo ()Multiplexing SignalInfo::multiplexing
        -
        -inline
        -

        Definition at line 36 of file signal_info.h.

        +

        Definition at line 25 of file signal_info.h.

        -

        Member Data Documentation

        ◆ name

        @@ -175,9 +167,7 @@ Public Attributes

        Signal name.

        -

        Definition at line 23 of file signal_info.h.

        - -

        Referenced by DbcDecodeBuilder::Build().

        +

        Definition at line 26 of file signal_info.h.

        @@ -188,15 +178,13 @@ Public Attributes
        - +
        std::uint32_t SignalInfo::startBitstd::uint32_t SignalInfo::startBit = 0U

        Start bit in DBC notation.

        -

        Definition at line 24 of file signal_info.h.

        - -

        Referenced by DbcDecodeBuilder::Build().

        +

        Definition at line 27 of file signal_info.h.

        @@ -207,15 +195,13 @@ Public Attributes
        - +
        std::uint32_t SignalInfo::lengthstd::uint32_t SignalInfo::length = 0U

        Signal length in bits.

        -

        Definition at line 25 of file signal_info.h.

        - -

        Referenced by DbcDecodeBuilder::Build().

        +

        Definition at line 28 of file signal_info.h.

        @@ -226,15 +212,13 @@ Public Attributes
        - +
        bool SignalInfo::isLittleEndianbool SignalInfo::isLittleEndian = true

        true for Intel, false for Motorola.

        -

        Definition at line 26 of file signal_info.h.

        - -

        Referenced by DbcDecodeBuilder::Build().

        +

        Definition at line 29 of file signal_info.h.

        @@ -245,15 +229,13 @@ Public Attributes
        - +
        bool SignalInfo::isSignedbool SignalInfo::isSigned = false

        true if signal is signed.

        -

        Definition at line 27 of file signal_info.h.

        - -

        Referenced by DbcDecodeBuilder::Build().

        +

        Definition at line 30 of file signal_info.h.

        @@ -264,15 +246,13 @@ Public Attributes
        - +
        double SignalInfo::factordouble SignalInfo::factor = 1.0

        Scaling factor.

        -

        Definition at line 28 of file signal_info.h.

        - -

        Referenced by DbcDecodeBuilder::Build().

        +

        Definition at line 31 of file signal_info.h.

        @@ -283,15 +263,13 @@ Public Attributes
        - +
        double SignalInfo::offsetdouble SignalInfo::offset = 0.0

        Physical offset.

        -

        Definition at line 29 of file signal_info.h.

        - -

        Referenced by DbcDecodeBuilder::Build().

        +

        Definition at line 32 of file signal_info.h.

        @@ -302,15 +280,13 @@ Public Attributes
        - +
        double SignalInfo::minimumdouble SignalInfo::minimum = 0.0

        Minimum physical value.

        -

        Definition at line 30 of file signal_info.h.

        - -

        Referenced by DbcDecodeBuilder::Build().

        +

        Definition at line 33 of file signal_info.h.

        @@ -321,15 +297,13 @@ Public Attributes
        - +
        double SignalInfo::maximumdouble SignalInfo::maximum = 0.0

        Maximum physical value.

        -

        Definition at line 31 of file signal_info.h.

        - -

        Referenced by DbcDecodeBuilder::Build().

        +

        Definition at line 34 of file signal_info.h.

        @@ -346,9 +320,7 @@ Public Attributes

        Physical unit.

        -

        Definition at line 32 of file signal_info.h.

        - -

        Referenced by DbcDecodeBuilder::Build().

        +

        Definition at line 35 of file signal_info.h.

        @@ -365,9 +337,24 @@ Public Attributes

        Signal receivers.

        -

        Definition at line 33 of file signal_info.h.

        +

        Definition at line 36 of file signal_info.h.

        -

        Referenced by DbcDecodeBuilder::Build().

        +
        + + +

        ◆ valueDescriptions

        + +
        +
        + + + + +
        ValueDescriptions SignalInfo::valueDescriptions
        +
        +

        Raw integer state descriptions.

        + +

        Definition at line 37 of file signal_info.h.

        @@ -384,9 +371,7 @@ Public Attributes

        Optional signal comment.

        -

        Definition at line 34 of file signal_info.h.

        - -

        Referenced by DbcDecodeBuilder::Build().

        +

        Definition at line 38 of file signal_info.h.

        diff --git a/docs/html/structSignalInfo.js b/docs/html/structSignalInfo.js index 229ec28..8cfee27 100644 --- a/docs/html/structSignalInfo.js +++ b/docs/html/structSignalInfo.js @@ -11,5 +11,6 @@ var structSignalInfo = [ "maximum", "structSignalInfo.html#adf1c4331b9eabced0d7fdda40ff0eb52", null ], [ "unit", "structSignalInfo.html#a1f214f03e94ef5794de2d3367bfcbd01", null ], [ "receivers", "structSignalInfo.html#a2c95562fd0b29327a7fd7b1e6feee7f3", null ], + [ "valueDescriptions", "structSignalInfo.html#a43f47d0433d0cc39076bd7278b46af9c", null ], [ "comment", "structSignalInfo.html#ac99ba7563a5dad01e39c4257216953f5", null ] ]; \ No newline at end of file diff --git a/docs/html/tests_2main_8cpp_source.html b/docs/html/tests_2main_8cpp_source.html index d2d90f0..71efedb 100644 --- a/docs/html/tests_2main_8cpp_source.html +++ b/docs/html/tests_2main_8cpp_source.html @@ -103,13 +103,15 @@ $(document).ready(function(){initNavTree('tests_2main_8cpp_source.html',''); ini
        3
        4int RunParserTests(int argc, char **argv);
        5int RunDecoderTests(int argc, char **argv);
        -
        6
        -
        7int main(int argc, char **argv) {
        -
        8 QCoreApplication application(argc, argv);
        -
        9 const int parserResult = RunParserTests(argc, argv);
        -
        10 const int decoderResult = RunDecoderTests(argc, argv);
        -
        11 return parserResult | decoderResult;
        -
        12}
        +
        6int RunCoverageTests(int argc, char **argv);
        +
        7
        +
        8int main(int argc, char **argv) {
        +
        9 QCoreApplication application(argc, argv);
        +
        10 const int parserResult = RunParserTests(argc, argv);
        +
        11 const int decoderResult = RunDecoderTests(argc, argv);
        +
        12 const int coverageResult = RunCoverageTests(argc, argv);
        +
        13 return parserResult | decoderResult | coverageResult;
        +
        14}
        diff --git a/docs/html/text__utils_8h_source.html b/docs/html/text__utils_8h_source.html new file mode 100644 index 0000000..0e3045b --- /dev/null +++ b/docs/html/text__utils_8h_source.html @@ -0,0 +1,134 @@ + + + + + + + +DBC Framework: text_utils.h Source File + + + + + + + + + + + + + +
        +
        + + + + + + +
        +
        DBC Framework +
        +
        DBC parsing and CAN signal decoding framework
        +
        +
        + + + + + + + + +
        +
        + +
        +
        +
        + +
        + +
        +
        + + +
        +
        +
        +
        +
        +
        Loading...
        +
        Searching...
        +
        No Matches
        +
        +
        +
        +
        + +
        +
        text_utils.h
        +
        +
        +
        1#ifndef DBC_TEXT_UTILS_H
        +
        2#define DBC_TEXT_UTILS_H
        +
        3
        +
        4#include <cctype>
        +
        5#include <string>
        +
        6
        +
        7namespace dbc_detail {
        +
        8 inline std::string TrimText(const std::string &text) {
        +
        9 std::string::size_type begin = 0U;
        +
        10 while ((begin < text.size()) &&
        +
        11 std::isspace(static_cast<unsigned char>(text[begin])))
        +
        12 ++begin;
        +
        13
        +
        14 std::string::size_type end = text.size();
        +
        15 while ((end > begin) &&
        +
        16 std::isspace(static_cast<unsigned char>(text[end - 1U])))
        +
        17 --end;
        +
        18
        +
        19 return text.substr(begin, end - begin);
        +
        20 }
        +
        21}
        +
        22
        +
        23#endif
        +
        +
        + + + + diff --git a/docs/html/tree__node_8cpp_source.html b/docs/html/tree__node_8cpp_source.html index dffa12e..da12f4d 100644 --- a/docs/html/tree__node_8cpp_source.html +++ b/docs/html/tree__node_8cpp_source.html @@ -103,87 +103,104 @@ $(document).ready(function(){initNavTree('tree__node_8cpp_source.html',''); init
        13
        -
        15 : m_type(NodeType::Root), m_name("dbc"), m_children(), m_frame(), m_signal() {
        +
        15 : m_type(NodeType::Root), m_name("dbc") {
        16}
        17
        -
        19 : m_type(NodeType::Frame), m_name(frame.name), m_children(), m_frame(new FrameInfo(frame)), m_signal() {
        +
        19 : m_type(NodeType::Frame), m_name(frame.name), m_frame(std::make_unique<FrameInfo>(frame)) {
        20}
        21
        -
        23 : m_type(NodeType::Signal), m_name(signal.name), m_children(), m_frame(), m_signal(new SignalInfo(signal)) {
        +
        23 : m_type(NodeType::Signal), m_name(signal.name), m_signal(std::make_unique<SignalInfo>(signal)) {
        24}
        25
        26void TreeNode::AddChild(std::unique_ptr<TreeNode> child) {
        -
        27 if (child)
        +
        27 if (child) {
        28 m_children.push_back(std::move(child));
        -
        29}
        +
        29 m_children.back()->m_parent = this;
        +
        30 m_children.back()->m_row = m_children.size() - 1U;
        +
        31 }
        +
        32}
        -
        30
        -
        -
        31std::size_t TreeNode::GetChildCount() const {
        -
        32 return m_children.size();
        -
        33}
        -
        -
        34
        -
        -
        35const TreeNode *TreeNode::GetChild(std::size_t index) const {
        -
        36 if (index >= m_children.size())
        -
        37 return nullptr;
        -
        38
        -
        39 return m_children[index].get();
        -
        40}
        +
        33
        +
        +
        34std::size_t TreeNode::GetChildCount() const {
        +
        35 return m_children.size();
        +
        36}
        +
        37
        +
        +
        38const TreeNode *TreeNode::GetChild(std::size_t index) const {
        +
        39 if (index >= m_children.size())
        +
        40 return nullptr;
        41
        -
        -
        42TreeNode *TreeNode::GetChild(std::size_t index) {
        -
        43 if (index >= m_children.size())
        -
        44 return nullptr;
        -
        45
        -
        46 return m_children[index].get();
        -
        47}
        +
        42 return m_children[index].get();
        +
        43}
        +
        44
        +
        +
        45TreeNode *TreeNode::GetChild(std::size_t index) {
        +
        46 if (index >= m_children.size())
        +
        47 return nullptr;
        48
        -
        - -
        50 return m_type;
        -
        51}
        +
        49 return m_children[index].get();
        +
        50}
        -
        52
        -
        -
        53const std::string &TreeNode::GetName() const {
        -
        54 return m_name;
        -
        55}
        +
        51
        +
        + +
        53 return m_type;
        +
        54}
        -
        56
        -
        - -
        58 return m_frame.get();
        -
        59}
        +
        55
        +
        +
        56const std::string &TreeNode::GetName() const {
        +
        57 return m_name;
        +
        58}
        -
        60
        -
        - -
        62 return m_signal.get();
        -
        63}
        +
        59
        +
        + +
        61 return m_frame.get();
        +
        62}
        +
        +
        63
        +
        + +
        65 return m_signal.get();
        +
        66}
        +
        +
        67
        +
        + +
        69 return m_parent;
        +
        70}
        +
        +
        71
        +
        +
        72std::size_t TreeNode::GetRow() const {
        +
        73 return m_row;
        +
        74}
        Tree node for later use in model/view or other hierarchy consumers.
        Definition tree_node.h:35
        -
        const SignalInfo * GetSignal() const
        Get signal payload if node is signal.
        Definition tree_node.cpp:61
        -
        const TreeNode * GetChild(std::size_t index) const
        Get child by index.
        Definition tree_node.cpp:35
        +
        const SignalInfo * GetSignal() const
        Get signal payload if node is signal.
        Definition tree_node.cpp:64
        +
        const TreeNode * GetChild(std::size_t index) const
        Get child by index.
        Definition tree_node.cpp:38
        void AddChild(std::unique_ptr< TreeNode > child)
        Add child node.
        Definition tree_node.cpp:26
        TreeNode()
        Create root node.
        Definition tree_node.cpp:14
        -
        const std::string & GetName() const
        Get display name.
        Definition tree_node.cpp:53
        -
        std::size_t GetChildCount() const
        Get child count.
        Definition tree_node.cpp:31
        -
        NodeType GetType() const
        Get node type.
        Definition tree_node.cpp:49
        -
        const FrameInfo * GetFrame() const
        Get frame payload if node is frame.
        Definition tree_node.cpp:57
        +
        const TreeNode * GetParent() const
        Definition tree_node.cpp:68
        +
        const std::string & GetName() const
        Get display name.
        Definition tree_node.cpp:56
        +
        std::size_t GetChildCount() const
        Get child count.
        Definition tree_node.cpp:34
        +
        std::size_t GetRow() const
        Definition tree_node.cpp:72
        +
        NodeType GetType() const
        Get node type.
        Definition tree_node.cpp:52
        +
        const FrameInfo * GetFrame() const
        Get frame payload if node is frame.
        Definition tree_node.cpp:60
        Describes one CAN frame from a DBC file.
        Definition frame_info.h:24
        -
        Describes one signal inside a DBC frame.
        Definition signal_info.h:22
        +
        Describes one signal inside a DBC frame.
        Definition signal_info.h:24
        Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
        NodeType
        Type of a tree node.
        Definition tree_node.h:26
        diff --git a/docs/html/tree__node_8h_source.html b/docs/html/tree__node_8h_source.html index f28e3b6..0d8ba1e 100644 --- a/docs/html/tree__node_8h_source.html +++ b/docs/html/tree__node_8h_source.html @@ -132,48 +132,56 @@ $(document).ready(function(){initNavTree('tree__node_8h_source.html',''); initRe
        56 TreeNode(const TreeNode &) = delete;
        57 TreeNode &operator=(const TreeNode &) = delete;
        58
        -
        59 TreeNode(TreeNode &&) = default;
        -
        60 TreeNode &operator=(TreeNode &&) = default;
        +
        59 TreeNode(TreeNode &&) = delete;
        +
        60 TreeNode &operator=(TreeNode &&) = delete;
        61
        66 void AddChild(std::unique_ptr<TreeNode> child);
        67
        -
        72 std::size_t GetChildCount() const;
        +
        69 const TreeNode *GetParent() const;
        +
        70
        +
        72 std::size_t GetRow() const;
        73
        -
        79 const TreeNode *GetChild(std::size_t index) const;
        -
        80
        -
        86 TreeNode *GetChild(std::size_t index);
        -
        87
        -
        92 NodeType GetType() const;
        +
        78 std::size_t GetChildCount() const;
        +
        79
        +
        85 const TreeNode *GetChild(std::size_t index) const;
        +
        86
        +
        92 TreeNode *GetChild(std::size_t index);
        93
        -
        98 const std::string &GetName() const;
        +
        98 NodeType GetType() const;
        99
        -
        104 const FrameInfo *GetFrame() const;
        +
        104 const std::string &GetName() const;
        105
        -
        110 const SignalInfo *GetSignal() const;
        +
        110 const FrameInfo *GetFrame() const;
        111
        -
        112private:
        -
        113 NodeType m_type;
        -
        114 std::string m_name;
        -
        115 std::vector<std::unique_ptr<TreeNode>> m_children;
        -
        116 std::unique_ptr<FrameInfo> m_frame;
        -
        117 std::unique_ptr<SignalInfo> m_signal;
        -
        118};
        +
        116 const SignalInfo *GetSignal() const;
        +
        117
        +
        118private:
        +
        119 TreeNode *m_parent = nullptr;
        +
        120 std::size_t m_row = 0U;
        +
        121 NodeType m_type;
        +
        122 std::string m_name;
        +
        123 std::vector<std::unique_ptr<TreeNode>> m_children;
        +
        124 std::unique_ptr<FrameInfo> m_frame;
        +
        125 std::unique_ptr<SignalInfo> m_signal;
        +
        126};
        -
        119
        -
        120#endif /* TREE_NODE_H */
        +
        127
        +
        128#endif /* TREE_NODE_H */
        Tree node for later use in model/view or other hierarchy consumers.
        Definition tree_node.h:35
        -
        const SignalInfo * GetSignal() const
        Get signal payload if node is signal.
        Definition tree_node.cpp:61
        -
        const TreeNode * GetChild(std::size_t index) const
        Get child by index.
        Definition tree_node.cpp:35
        +
        const SignalInfo * GetSignal() const
        Get signal payload if node is signal.
        Definition tree_node.cpp:64
        +
        const TreeNode * GetChild(std::size_t index) const
        Get child by index.
        Definition tree_node.cpp:38
        void AddChild(std::unique_ptr< TreeNode > child)
        Add child node.
        Definition tree_node.cpp:26
        TreeNode()
        Create root node.
        Definition tree_node.cpp:14
        -
        const std::string & GetName() const
        Get display name.
        Definition tree_node.cpp:53
        -
        std::size_t GetChildCount() const
        Get child count.
        Definition tree_node.cpp:31
        -
        NodeType GetType() const
        Get node type.
        Definition tree_node.cpp:49
        -
        const FrameInfo * GetFrame() const
        Get frame payload if node is frame.
        Definition tree_node.cpp:57
        +
        const TreeNode * GetParent() const
        Definition tree_node.cpp:68
        +
        const std::string & GetName() const
        Get display name.
        Definition tree_node.cpp:56
        +
        std::size_t GetChildCount() const
        Get child count.
        Definition tree_node.cpp:34
        +
        std::size_t GetRow() const
        Definition tree_node.cpp:72
        +
        NodeType GetType() const
        Get node type.
        Definition tree_node.cpp:52
        +
        const FrameInfo * GetFrame() const
        Get frame payload if node is frame.
        Definition tree_node.cpp:60
        Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
        Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
        Describes one CAN frame from a DBC file.
        Definition frame_info.h:24
        -
        Describes one signal inside a DBC frame.
        Definition signal_info.h:22
        +
        Describes one signal inside a DBC frame.
        Definition signal_info.h:24
        NodeType
        Type of a tree node.
        Definition tree_node.h:26
        diff --git a/docs/html/tree__node__test_8cpp_source.html b/docs/html/tree__node__test_8cpp_source.html new file mode 100644 index 0000000..91d7fb2 --- /dev/null +++ b/docs/html/tree__node__test_8cpp_source.html @@ -0,0 +1,156 @@ + + + + + + + +DBC Framework: tree_node_test.cpp Source File + + + + + + + + + + + + + +
        +
        + + + + + + +
        +
        DBC Framework +
        +
        DBC parsing and CAN signal decoding framework
        +
        +
        + + + + + + + + +
        +
        + +
        +
        +
        + +
        + +
        +
        + + +
        +
        +
        +
        +
        +
        Loading...
        +
        Searching...
        +
        No Matches
        +
        +
        +
        +
        + +
        +
        tree_node_test.cpp
        +
        +
        +
        1// Standalone C++17 test: no Qt required.
        +
        2#include "dbc_tree_builder.h"
        +
        3#include <stdexcept>
        +
        4#include <type_traits>
        +
        5
        +
        6static void Check(bool condition) {
        +
        7 if (!condition) throw std::runtime_error("Tree navigation test failed");
        +
        8}
        +
        9
        +
        10int main() {
        +
        11 static_assert(!std::is_move_constructible<TreeNode>::value, "Node addresses must be stable");
        +
        12 DbcDatabase database;
        +
        13 FrameInfo frame;
        +
        14 SignalInfo signal;
        +
        15 frame.signals.push_back(signal);
        +
        16 frame.signals.push_back(signal);
        +
        17 database.frames.push_back(frame);
        +
        18 database.frames.push_back(frame);
        +
        19 std::unique_ptr<TreeNode> root = DbcTreeBuilder().Build(database);
        +
        20 Check(root->GetParent() == nullptr && root->GetRow() == 0);
        +
        21 root->AddChild(nullptr);
        +
        22 Check(root->GetChildCount() == 2 && !root->GetChild(2));
        +
        23 for (std::size_t row = 0; row < root->GetChildCount(); ++row) {
        +
        24 const TreeNode *child = root->GetChild(row);
        +
        25 Check(child->GetParent() == root.get() && child->GetRow() == row);
        +
        26 for (std::size_t position = 0; position < child->GetChildCount(); ++position) {
        +
        27 const TreeNode *leaf = child->GetChild(position);
        +
        28 Check(leaf->GetParent() == child && leaf->GetRow() == position);
        +
        29 }
        +
        30 }
        +
        31 std::unique_ptr<TreeNode> transferred = std::move(root);
        +
        32 Check(transferred->GetChild(0)->GetParent() == transferred.get());
        +
        33}
        +
        Builds a simple tree from parsed DBC database.
        +
        std::unique_ptr< TreeNode > Build(const DbcDatabase &database) const
        Build tree representation of parsed DBC data.
        +
        Tree node for later use in model/view or other hierarchy consumers.
        Definition tree_node.h:35
        +
        const TreeNode * GetChild(std::size_t index) const
        Get child by index.
        Definition tree_node.cpp:38
        +
        const TreeNode * GetParent() const
        Definition tree_node.cpp:68
        +
        std::size_t GetChildCount() const
        Get child count.
        Definition tree_node.cpp:34
        +
        std::size_t GetRow() const
        Definition tree_node.cpp:72
        +
        Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
        +
        Parsed DBC content stored in a simple internal form.
        +
        std::vector< FrameInfo > frames
        +
        Describes one CAN frame from a DBC file.
        Definition frame_info.h:24
        +
        Describes one signal inside a DBC frame.
        Definition signal_info.h:24
        +
        +
        + + + + diff --git a/docs/html/value__descriptions_8h_source.html b/docs/html/value__descriptions_8h_source.html new file mode 100644 index 0000000..afce59d --- /dev/null +++ b/docs/html/value__descriptions_8h_source.html @@ -0,0 +1,139 @@ + + + + + + + +DBC Framework: value_descriptions.h Source File + + + + + + + + + + + + + +
        +
        + + + + + + +
        +
        DBC Framework +
        +
        DBC parsing and CAN signal decoding framework
        +
        +
        + + + + + + + + +
        +
        + +
        +
        +
        + +
        + +
        +
        + + +
        +
        +
        +
        +
        +
        Loading...
        +
        Searching...
        +
        No Matches
        +
        +
        +
        +
        + +
        +
        value_descriptions.h
        +
        +
        +
        1// SPDX-License-Identifier: MIT
        +
        2#ifndef VALUE_DESCRIPTIONS_H
        +
        3#define VALUE_DESCRIPTIONS_H
        +
        4
        +
        5#include <cstdint>
        +
        6#include <map>
        +
        7#include <string>
        +
        8#include <variant>
        +
        9
        +
        10using RawSignalValue = std::variant<std::int64_t, std::uint64_t>;
        +
        11
        +
        13inline RawSignalValue NormalizeValueKey(const RawSignalValue &value) {
        +
        14 if (const std::int64_t *number = std::get_if<std::int64_t>(&value)) {
        +
        15 if (*number >= 0)
        +
        16 return static_cast<std::uint64_t>(*number);
        +
        17 }
        +
        18 return value;
        +
        19}
        +
        20
        +
        21using ValueDescriptions = std::map<RawSignalValue, std::string>;
        +
        22
        +
        24inline const std::string *FindValueDescription(const ValueDescriptions &descriptions,
        +
        25 const RawSignalValue &rawValue) {
        +
        26 const ValueDescriptions::const_iterator found = descriptions.find(NormalizeValueKey(rawValue));
        +
        27 return found == descriptions.end() ? nullptr : &found->second;
        +
        28}
        +
        29
        +
        30#endif
        +
        +
        + + + +