| CAttributeAssignment | Explicit assignment; defaults remain on definitions | ||||||||||||
| CAttributeDefinition | Attribute type, permitted range, and optional default | ||||||||||||
| CDbcAttributeHandler | Defer typed attribute statements for resolution | ||||||||||||
| CDbcCommentHandler | Defer frame and signal comments for target resolution | ||||||||||||
| CDbcDatabase | Parsed DBC content stored in a simple internal form | ||||||||||||
| CDbcDecodeBuilder | Converts parsed DBC data into runtime decode database | ||||||||||||
| CDbcDecoder | Runtime CAN decoder using prebuilt decode database | ||||||||||||
| CDbcDiagnostic | Diagnostic message and physical source location | ||||||||||||
| CDbcDiagnosticError | |||||||||||||
| CDbcFrameHandler | Parse and append frame definitions | ||||||||||||
| CDbcHeaderHandler | |||||||||||||
| CDbcParseContext | |||||||||||||
| CDbcParser | Minimal DBC parser | ||||||||||||
| CDbcParseResult | Parsed database and diagnostics; the database is empty on error | ||||||||||||
| CDbcParserOptions | |||||||||||||
| CDbcSignalHandler | Parse and append signals to the current frame | ||||||||||||
| CDbcStatementDispatcher | |||||||||||||
| CDbcStatementHandler | Interface for processing a registered DBC statement | ||||||||||||
| CDbcTreeBuilder | Builds a simple tree from parsed DBC database | ||||||||||||
| CDbcTreeModel | |||||||||||||
| CDbcUnsupportedMultiplexingHandler | Reject unsupported extended multiplexing statements | ||||||||||||
| CDbcValueDescriptionHandler | Defer raw value descriptions for target resolution | ||||||||||||
| CDecodeDatabase | Immutable runtime snapshot. Copies share storage; reload replaces a snapshot. Owning lookup handles and decoded results keep old definitions alive | ||||||||||||
| CDecodedFrameValue | Fully decoded frame | ||||||||||||
| CDecodedSignalValue | One decoded signal value | ||||||||||||
| CDecodeFrame | Runtime-ready frame definition | ||||||||||||
| CDecodeSignal | Runtime-ready signal definition | ||||||||||||
| CFrameInfo | Describes one CAN frame from a DBC file | ||||||||||||
| CFrameKey | Stable frame identifier: normalized CAN ID and frame type | ||||||||||||
| CFrameKeyHasher | Hasher for frame key | ||||||||||||
| CMultiplexing | |||||||||||||
| CPendingAttribute | Attribute statement retained for ordered resolution | ||||||||||||
| CPendingComment | Deferred frame or signal comment and its source location | ||||||||||||
| CPendingValueDescriptions | Deferred raw value descriptions and their target | ||||||||||||
| CPgnLookupResult | |||||||||||||
| CRawCanFrame | Raw CAN frame used for runtime or trace decoding | ||||||||||||
| CSignalInfo | Describes one signal inside a DBC frame | ||||||||||||
| CSignalKey | |||||||||||||
| CSignalKeyHasher | Hasher for stable signal keys | ||||||||||||
| CTreeNode | Tree node for later use in model/view or other hierarchy consumers | ||||||||||||
| CTypeFactory | Registry-based factory for creating objects by runtime identifier | ||||||||||||
| ▼Ndbc_detail | |
| CMultiplexError | |
| CMultiplexGraph | |
| CAttributeAssignment | Explicit assignment; defaults remain on definitions |
| CAttributeDefinition | Attribute type, permitted range, and optional default |
| CDbcAttributeHandler | Defer typed attribute statements for resolution |
| CDbcCommentHandler | Defer frame and signal comments for target resolution |
| CDbcDatabase | Parsed DBC content stored in a simple internal form |
| CDbcDecodeBuilder | Converts parsed DBC data into runtime decode database |
| CDbcDecoder | Runtime CAN decoder using prebuilt decode database |
| CDbcDiagnostic | Diagnostic message and physical source location |
| CDbcDiagnosticError | |
| CDbcFrameHandler | Parse and append frame definitions |
| CDbcHeaderHandler | |
| CDbcMultiplexingHandler | Parse extended multiplexing conditions for deferred resolution |
| CDbcParseContext | |
| CDbcParser | Minimal DBC parser |
| CDbcParseResult | Parsed database and diagnostics; the database is empty on error |
| CDbcParserOptions | |
| CDbcSignalHandler | Parse and append signals to the current frame |
| CDbcStatementDispatcher | |
| CDbcStatementHandler | Interface for processing a registered DBC statement |
| CDbcTreeBuilder | Builds a simple tree from parsed DBC database |
| CDbcTreeModel | |
| CDbcValueDescriptionHandler | Defer raw value descriptions for target resolution |
| CDecodeDatabase | Immutable runtime snapshot. Copies share storage; reload replaces a snapshot. Owning lookup handles and decoded results keep old definitions alive |
| CDecodedFrameValue | Fully decoded frame |
| CDecodedSignalValue | One decoded signal value |
| CDecodeFrame | Runtime-ready frame definition |
| CDecodeSignal | Runtime-ready signal definition |
| CFrameInfo | Describes one CAN frame from a DBC file |
| CFrameKey | Stable frame identifier: normalized CAN ID and frame type |
| CFrameKeyHasher | Hasher for frame key |
| CMultiplexing | Basic markers and optional explicit extended multiplexing condition |
| CMultiplexRange | Inclusive raw selector range, without expanding individual values |
| CPendingAttribute | Attribute statement retained for ordered resolution |
| CPendingComment | Deferred frame or signal comment and its source location |
| CPendingMultiplexing | Deferred extended multiplexing condition and source location |
| CPendingValueDescriptions | Deferred raw value descriptions and their target |
| CPgnLookupResult | |
| CRawCanFrame | Raw CAN frame used for runtime or trace decoding |
| CSignalInfo | Describes one signal inside a DBC frame |
| CSignalKey | |
| CSignalKeyHasher | Hasher for stable signal keys |
| CTreeNode | Tree node for later use in model/view or other hierarchy consumers |
| CTypeFactory | Registry-based factory for creating objects by runtime identifier |
Defer typed attribute statements for resolution.
-Definition at line 106 of file dbc_statement_handler.h.
+Definition at line 119 of file dbc_statement_handler.h.
Implements DbcStatementHandler.
-Definition at line 251 of file dbc_attributes.cpp.
+Definition at line 255 of file dbc_attributes.cpp.
-References DbcParseContext::lineNumber, and DbcParseContext::pendingAttributes.
+References DbcParseContext::lineNumber, and DbcParseContext::pendingAttributes.
diff --git a/docs/html/classDbcCommentHandler.html b/docs/html/classDbcCommentHandler.html index 3072895..b840e0c 100644 --- a/docs/html/classDbcCommentHandler.html +++ b/docs/html/classDbcCommentHandler.html @@ -118,7 +118,7 @@ Public Member FunctionsDefer frame and signal comments for target resolution.
-Definition at line 100 of file dbc_statement_handler.h.
+Definition at line 113 of file dbc_statement_handler.h.
Implements DbcStatementHandler.
-Definition at line 306 of file dbc_statement_handler.cpp.
+Definition at line 308 of file dbc_statement_handler.cpp.
-References PendingComment::canId, PendingComment::comment, PendingComment::isExtended, PendingComment::isSignal, PendingComment::lineNumber, DbcParseContext::lineNumber, DbcParseContext::pendingComments, and PendingComment::signalName.
+References PendingComment::canId, PendingComment::comment, PendingComment::isExtended, PendingComment::isSignal, PendingComment::lineNumber, DbcParseContext::lineNumber, DbcParseContext::pendingComments, and PendingComment::signalName.
diff --git a/docs/html/classDbcDecodeBuilder.html b/docs/html/classDbcDecodeBuilder.html index c218a43..3741d54 100644 --- a/docs/html/classDbcDecodeBuilder.html +++ b/docs/html/classDbcDecodeBuilder.html @@ -146,7 +146,7 @@ Public Member FunctionsDefinition at line 15 of file dbc_decode_builder.cpp.
-References DecodeSignal::attributes, DecodeFrame::attributes, DecodeSignal::byteOrder, DecodeFrame::canId, DecodeSignal::comment, DecodeFrame::comment, DecodeFrame::cycleTimeMs, DecodeFrame::dlc, DecodeSignal::factor, DecodeFrame::frameFormat, DbcDatabase::frames, DecodeFrame::hasPgn, DecodeFrame::isExtended, DecodeSignal::length, DecodeSignal::maximum, DecodeSignal::minimum, DecodeSignal::multiplexing, DecodeSignal::name, DecodeFrame::name, DecodeSignal::offset, DecodeFrame::pgn, DecodeSignal::receivers, DecodeSignal::startBit, DecodeFrame::transmitter, DecodeSignal::unit, DecodeSignal::valueDescriptions, and DecodeSignal::valueType.
+References DecodeSignal::attributes, DecodeFrame::attributes, DecodeSignal::byteOrder, DecodeFrame::canId, DecodeSignal::comment, DecodeFrame::comment, DecodeFrame::cycleTimeMs, DecodeFrame::dlc, DecodeSignal::factor, DecodeFrame::frameFormat, DbcDatabase::frames, DecodeFrame::hasPgn, DecodeFrame::isExtended, DecodeSignal::length, DecodeSignal::maximum, DecodeSignal::minimum, DecodeSignal::multiplexing, DecodeSignal::name, DecodeFrame::name, DecodeSignal::offset, DecodeFrame::pgn, DecodeSignal::receivers, DecodeSignal::startBit, DecodeFrame::transmitter, DecodeSignal::unit, DecodeSignal::valueDescriptions, and DecodeSignal::valueType.
Referenced by main().
diff --git a/docs/html/classDbcDecoder.html b/docs/html/classDbcDecoder.html index 050b435..a41c534 100644 --- a/docs/html/classDbcDecoder.html +++ b/docs/html/classDbcDecoder.html @@ -91,7 +91,6 @@ $(document).ready(function(){initNavTree('classDbcDecoder.html',''); initResizabRuntime CAN decoder using prebuilt decode database.
-Definition at line 86 of file dbc_decoder.h.
+Definition at line 87 of file dbc_decoder.h.
Definition at line 20 of file dbc_decoder.cpp.
-References PgnLookupResult::definition.
+References PgnLookupResult::definition.
Definition at line 40 of file dbc_statement_handler.h.
-Referenced by DbcParser::ParseFileWithDiagnostics().
+Referenced by DbcParser::ParseFileWithDiagnostics().
diff --git a/docs/html/classDbcFrameHandler.html b/docs/html/classDbcFrameHandler.html index 1efb842..69d28ab 100644 --- a/docs/html/classDbcFrameHandler.html +++ b/docs/html/classDbcFrameHandler.html @@ -118,7 +118,7 @@ Public Member FunctionsParse and append frame definitions.
-Definition at line 82 of file dbc_statement_handler.h.
+Definition at line 95 of file dbc_statement_handler.h.
Implements DbcStatementHandler.
-Definition at line 278 of file dbc_statement_handler.cpp.
+Definition at line 280 of file dbc_statement_handler.cpp.
-References FrameInfo::canId, DbcParseContext::currentFrame, DbcParseContext::database, DbcParseContext::enableJ1939, DbcDatabase::frames, FrameInfo::hasPgn, FrameInfo::isExtended, FrameInfo::pgn, and DbcParseContext::signalLines.
+References FrameInfo::canId, DbcParseContext::currentFrame, DbcParseContext::database, DbcParseContext::enableJ1939, DbcDatabase::frames, FrameInfo::hasPgn, FrameInfo::isExtended, FrameInfo::pgn, and DbcParseContext::signalLines.
diff --git a/docs/html/classDbcHeaderHandler.html b/docs/html/classDbcHeaderHandler.html index 19e2cae..2aff14e 100644 --- a/docs/html/classDbcHeaderHandler.html +++ b/docs/html/classDbcHeaderHandler.html @@ -115,7 +115,7 @@ Public Member FunctionsCommon header metadata does not change the supported decode definitions.
-Definition at line 124 of file dbc_statement_handler.h.
+Definition at line 137 of file dbc_statement_handler.h.
Implements DbcStatementHandler.
-Definition at line 388 of file dbc_statement_handler.cpp.
+Definition at line 390 of file dbc_statement_handler.cpp.
diff --git a/docs/html/classDbcMultiplexingHandler-members.html b/docs/html/classDbcMultiplexingHandler-members.html new file mode 100644 index 0000000..412148d --- /dev/null +++ b/docs/html/classDbcMultiplexingHandler-members.html @@ -0,0 +1,110 @@ + + + + + + + +|
+ DBC Framework
+
+ DBC parsing and CAN signal decoding framework
+ |
+
This is the complete list of members for DbcMultiplexingHandler, including all inherited members.
+| Handle(const std::string &line, DbcParseContext &context) const override | DbcMultiplexingHandler | virtual |
| ~DbcStatementHandler()=default (defined in DbcStatementHandler) | DbcStatementHandler | virtual |
|
+ DBC Framework
+
+ DBC parsing and CAN signal decoding framework
+ |
+
Parse extended multiplexing conditions for deferred resolution. + More...
+ +#include <dbc_statement_handler.h>
Inheritance diagram for DbcMultiplexingHandler:+Public Member Functions | |
| void | Handle (const std::string &line, DbcParseContext &context) const override |
| Process a trimmed statement using state belonging to this parse. | |
Parse extended multiplexing conditions for deferred resolution.
+ +Definition at line 131 of file dbc_statement_handler.h.
+
+
|
+ +overridevirtual | +
Process a trimmed statement using state belonging to this parse.
+ +Implements DbcStatementHandler.
+ +Definition at line 453 of file dbc_statement_handler.cpp.
+ +References DbcParseContext::lineNumber.
+ +Frame/signal comments support multiline quoted text and deferred references.
-Reports unsupported statements as warnings, except SG_MUL_VAL_ which is an error. VERSION, NS_, BS_, BU_ and NS_ symbol declarations stay quiet.
+Frame/signal comments support multiline quoted text and deferred references. Attribute statements support multiline fields and quoted strings, ending at a semicolon outside quoted text. Diagnostics use the first physical line.
+Reports unsupported statements as warnings. Invalid multiplexing is an error. VERSION, NS_, BS_, BU_ and NS_ symbol declarations stay quiet.
-Definition at line 41 of file dbc_parser.h.
+Definition at line 43 of file dbc_parser.h.
Create a parser with explicit extended-frame interpretation options.
-Definition at line 44 of file dbc_parser.h.
+Definition at line 46 of file dbc_parser.h.
@@ -192,9 +192,9 @@ Public Member Functions -Definition at line 61 of file dbc_parser.cpp.
+Definition at line 90 of file dbc_parser.cpp.
-References DbcParseResult::database, DbcParseResult::diagnostics, and ParseFileWithDiagnostics().
+References DbcParseResult::database, DbcParseResult::diagnostics, and ParseFileWithDiagnostics().
Referenced by main().
@@ -219,11 +219,11 @@ Public Member FunctionsParse with warnings and a structured first error instead of throwing.
Definition at line 74 of file dbc_parser.cpp.
+Definition at line 103 of file dbc_parser.cpp.
-References DbcParseResult::database, DbcDiagnosticError::diagnostic, DbcParseResult::diagnostics, DbcStatementDispatcher::Dispatch(), and DbcParserOptions::enableJ1939.
+References DbcParseResult::database, DbcDiagnosticError::diagnostic, DbcParseResult::diagnostics, DbcStatementDispatcher::Dispatch(), and DbcParserOptions::enableJ1939.
-Referenced by ParseFile().
+Referenced by ParseFile().
diff --git a/docs/html/classDbcSignalHandler.html b/docs/html/classDbcSignalHandler.html index f9b464f..12c321e 100644 --- a/docs/html/classDbcSignalHandler.html +++ b/docs/html/classDbcSignalHandler.html @@ -118,7 +118,7 @@ Public Member FunctionsParse and append signals to the current frame.
-Definition at line 91 of file dbc_statement_handler.h.
+Definition at line 104 of file dbc_statement_handler.h.
Implements DbcStatementHandler.
-Definition at line 292 of file dbc_statement_handler.cpp.
+Definition at line 294 of file dbc_statement_handler.cpp.
-References DbcParseContext::currentFrame, FrameInfo::dlc, SignalInfo::isLittleEndian, SignalInfo::length, DbcParseContext::lineNumber, FrameInfo::name, SignalInfo::name, DbcParseContext::signalLines, and SignalInfo::startBit.
+References DbcParseContext::currentFrame, FrameInfo::dlc, SignalInfo::isLittleEndian, SignalInfo::length, DbcParseContext::lineNumber, FrameInfo::name, SignalInfo::name, DbcParseContext::signalLines, and SignalInfo::startBit.
diff --git a/docs/html/classDbcStatementDispatcher.html b/docs/html/classDbcStatementDispatcher.html index 3c85e1e..920c039 100644 --- a/docs/html/classDbcStatementDispatcher.html +++ b/docs/html/classDbcStatementDispatcher.html @@ -114,7 +114,7 @@ Public Member FunctionsExact-key dispatch to handlers created once per registration via TypeFactory.
-Definition at line 130 of file dbc_statement_handler.h.
+Definition at line 143 of file dbc_statement_handler.h.
Register supported statement handlers through TypeFactory.
-Definition at line 370 of file dbc_statement_handler.cpp.
+Definition at line 372 of file dbc_statement_handler.cpp.
@@ -166,7 +166,7 @@ template<class Handler >Register or replace a handler and create its reusable instance.
-Definition at line 137 of file dbc_statement_handler.h.
+Definition at line 150 of file dbc_statement_handler.h.
References TypeFactory< ClassId, BaseClass, Args >::create(), and TypeFactory< ClassId, BaseClass, Args >::registerType().
@@ -199,9 +199,9 @@ template<class Handler >Returns false for an unregistered keyword; input must be trimmed.
-Definition at line 390 of file dbc_statement_handler.cpp.
+Definition at line 392 of file dbc_statement_handler.cpp.
-Referenced by DbcParser::ParseFileWithDiagnostics().
+Referenced by DbcParser::ParseFileWithDiagnostics().
Interface for processing a registered DBC statement.
-Definition at line 74 of file dbc_statement_handler.h.
+Definition at line 87 of file dbc_statement_handler.h.
Process a trimmed statement using state belonging to this parse.
-Implemented in DbcFrameHandler, DbcSignalHandler, DbcCommentHandler, DbcAttributeHandler, DbcValueDescriptionHandler, DbcUnsupportedMultiplexingHandler, and DbcHeaderHandler.
+Implemented in DbcFrameHandler, DbcSignalHandler, DbcCommentHandler, DbcAttributeHandler, DbcValueDescriptionHandler, DbcMultiplexingHandler, and DbcHeaderHandler.
diff --git a/docs/html/classDbcStatementHandler__inherit__graph.map b/docs/html/classDbcStatementHandler__inherit__graph.map index 6f4e529..3afe99b 100644 --- a/docs/html/classDbcStatementHandler__inherit__graph.map +++ b/docs/html/classDbcStatementHandler__inherit__graph.map @@ -10,10 +10,10 @@ - - - - - - + + + + + + diff --git a/docs/html/classDbcStatementHandler__inherit__graph.md5 b/docs/html/classDbcStatementHandler__inherit__graph.md5 index 42a56ec..af5f909 100644 --- a/docs/html/classDbcStatementHandler__inherit__graph.md5 +++ b/docs/html/classDbcStatementHandler__inherit__graph.md5 @@ -1 +1 @@ -5f027bd277d1b10d4e4195710b2631a3 \ No newline at end of file +2aacbc7d65e32463c49617e36866cbe8 \ No newline at end of file diff --git a/docs/html/classDbcStatementHandler__inherit__graph.svg b/docs/html/classDbcStatementHandler__inherit__graph.svg index 64daf18..d0246d6 100644 --- a/docs/html/classDbcStatementHandler__inherit__graph.svg +++ b/docs/html/classDbcStatementHandler__inherit__graph.svg @@ -46,7 +46,7 @@ @@ -200,15 +200,15 @@ var sectionId = 'dynsection-0';Defer raw value descriptions for target resolution.
-Definition at line 112 of file dbc_statement_handler.h.
+Definition at line 125 of file dbc_statement_handler.h.
Implements DbcStatementHandler.
-Definition at line 402 of file dbc_statement_handler.cpp.
+Definition at line 404 of file dbc_statement_handler.cpp.
-References PendingValueDescriptions::canId, PendingValueDescriptions::descriptions, PendingValueDescriptions::isExtended, PendingValueDescriptions::lineNumber, DbcParseContext::lineNumber, DbcParseContext::pendingValues, and PendingValueDescriptions::signalName.
+References PendingValueDescriptions::canId, PendingValueDescriptions::descriptions, PendingValueDescriptions::isExtended, PendingValueDescriptions::lineNumber, DbcParseContext::lineNumber, DbcParseContext::pendingValues, and PendingValueDescriptions::signalName.
diff --git a/docs/html/classDecodeDatabase-members.html b/docs/html/classDecodeDatabase-members.html index 6a01ce6..547ffab 100644 --- a/docs/html/classDecodeDatabase-members.html +++ b/docs/html/classDecodeDatabase-members.html @@ -96,12 +96,13 @@ $(document).ready(function(){initNavTree('classDecodeDatabase.html',''); initResThis is the complete list of members for DecodeDatabase, including all inherited members.
| DecodeDatabase()=default (defined in DecodeDatabase) | DecodeDatabase | |
| DecodeDatabase(const std::vector< DecodeFrame > &frames) | DecodeDatabase | explicit |
| FindFrame(const FrameKey &key) const | DecodeDatabase | |
| FindFrameByPgn(std::uint32_t pgn) const | DecodeDatabase | |
| FindSignal(const SignalKey &key) const | DecodeDatabase | |
| GetFrames() const | DecodeDatabase | |
| DbcDecoder (defined in DecodeDatabase) | DecodeDatabase | friend |
| DecodeDatabase()=default (defined in DecodeDatabase) | DecodeDatabase | |
| DecodeDatabase(const std::vector< DecodeFrame > &frames) | DecodeDatabase | explicit |
| FindFrame(const FrameKey &key) const | DecodeDatabase | |
| FindFrameByPgn(std::uint32_t pgn) const | DecodeDatabase | |
| FindSignal(const SignalKey &key) const | DecodeDatabase | |
| GetFrames() const | DecodeDatabase |
+Friends | |
| class | DbcDecoder |
Immutable runtime snapshot. Copies share storage; reload replaces a snapshot. Owning lookup handles and decoded results keep old definitions alive.
-Definition at line 101 of file decode_database.h.
+Definition at line 102 of file decode_database.h.
Definition at line 111 of file decode_database.cpp.
+Definition at line 103 of file decode_database.cpp.
Borrowed view, valid while this snapshot remains alive and unchanged.
-Definition at line 115 of file decode_database.cpp.
+Definition at line 107 of file decode_database.cpp.
Referenced by main().
@@ -196,9 +202,9 @@ Public Member FunctionsOwning handles retain the entire snapshot across reload or destruction.
-Definition at line 120 of file decode_database.cpp.
+Definition at line 112 of file decode_database.cpp.
-Referenced by FindSignal().
+Referenced by FindSignal().
Only explicitly marked hasPgn frames participate; ambiguous results have no definition.
-Definition at line 130 of file decode_database.cpp.
+Definition at line 122 of file decode_database.cpp.
-References PgnLookupResult::ambiguous, and PgnLookupResult::definition.
+References PgnLookupResult::ambiguous, and PgnLookupResult::definition.
Return an owning signal handle, or an empty handle for a missing key.
-Definition at line 146 of file decode_database.cpp.
+Definition at line 138 of file decode_database.cpp.
-References FindFrame(), SignalKey::frame, DecodeSignal::name, and SignalKey::name.
+References FindFrame(), SignalKey::frame, DecodeSignal::name, and SignalKey::name.
+ + + +
+
|
+ +friend | +
Definition at line 122 of file decode_database.h.
References TypeFactory< ClassId, BaseClass, Args >::classes.
-Referenced by DbcStatementDispatcher::RegisterType().
+Referenced by DbcStatementDispatcher::RegisterType().
@@ -368,7 +368,7 @@ template<class ClassId , class BaseClass , class... Args>References TypeFactory< ClassId, BaseClass, Args >::creator().
-Referenced by DbcStatementDispatcher::RegisterType().
+Referenced by DbcStatementDispatcher::RegisterType().
diff --git a/docs/html/classdbc__detail_1_1MultiplexError-members.html b/docs/html/classdbc__detail_1_1MultiplexError-members.html new file mode 100644 index 0000000..8124438 --- /dev/null +++ b/docs/html/classdbc__detail_1_1MultiplexError-members.html @@ -0,0 +1,110 @@ + + + + + + + +|
+ DBC Framework
+
+ DBC parsing and CAN signal decoding framework
+ |
+
This is the complete list of members for dbc_detail::MultiplexError, including all inherited members.
+| index (defined in dbc_detail::MultiplexError) | dbc_detail::MultiplexError | |
| MultiplexError(std::size_t signalIndex, const std::string &message) (defined in dbc_detail::MultiplexError) | dbc_detail::MultiplexError | inline |
|
+ DBC Framework
+
+ DBC parsing and CAN signal decoding framework
+ |
+
#include <multiplex_graph.h>
Inheritance diagram for dbc_detail::MultiplexError:+Public Member Functions | |
| MultiplexError (std::size_t signalIndex, const std::string &message) | |
+Public Attributes | |
| std::size_t | index |
Validation failure associated with a signal in declaration order.
+ +Definition at line 11 of file multiplex_graph.h.
+
+
|
+ +inline | +
Definition at line 13 of file multiplex_graph.h.
+ +| std::size_t dbc_detail::MultiplexError::index | +
Definition at line 15 of file multiplex_graph.h.
+ +|
+ DBC Framework
+
+ DBC parsing and CAN signal decoding framework
+ |
+
This is the complete list of members for dbc_detail::MultiplexGraph, including all inherited members.
+| AreMutuallyExclusive(std::size_t first, std::size_t second) const (defined in dbc_detail::MultiplexGraph) | dbc_detail::MultiplexGraph | inline |
| Matches(std::size_t index, std::uint64_t value) const (defined in dbc_detail::MultiplexGraph) | dbc_detail::MultiplexGraph | inline |
| MultiplexGraph(const std::vector< Signal > &public) (defined in dbc_detail::MultiplexGraph) | dbc_detail::MultiplexGraph | inlineexplicit |
| parents (defined in dbc_detail::MultiplexGraph) | dbc_detail::MultiplexGraph | |
| ranges (defined in dbc_detail::MultiplexGraph) | dbc_detail::MultiplexGraph |
|
+ DBC Framework
+
+ DBC parsing and CAN signal decoding framework
+ |
+
#include <multiplex_graph.h>
+Public Member Functions | |
| template<class Signal > | |
| MultiplexGraph (const std::vector< Signal > &public) | |
| bool | Matches (std::size_t index, std::uint64_t value) const |
| bool | AreMutuallyExclusive (std::size_t first, std::size_t second) const |
+Public Attributes | |
| std::vector< std::size_t > | parents |
| std::vector< std::vector< MultiplexRange > > | ranges |
Resolved parent links shared by parser validation and runtime decoding.
+ +Definition at line 19 of file multiplex_graph.h.
+
+
|
+ +inlineexplicit | +
Definition at line 22 of file multiplex_graph.h.
+ +
+
|
+ +inline | +
Definition at line 69 of file multiplex_graph.h.
+ +
+
|
+ +inline | +
Definition at line 77 of file multiplex_graph.h.
+ +| std::vector<std::size_t> dbc_detail::MultiplexGraph::parents | +
Definition at line 97 of file multiplex_graph.h.
+ +| std::vector<std::vector<MultiplexRange> > dbc_detail::MultiplexGraph::ranges | +
Definition at line 98 of file multiplex_graph.h.
+ +#include <variant>#include <vector>#include "decode_database.h"#include "multiplex_graph.h"Go to the source code of this file.
| j1939.h | |
| multiplex_graph.h | |
| multiplexing.h | |
| signal_info.h | |
| definition_key.h | |
| frame_info.h | Parsed CAN frame metadata |
| j1939.h | |
| multiplexing.h | |
| signal_info.h | Parsed CAN signal metadata |
| signal_layout.h | |
| text_utils.h | |
| tree_node.cpp | Tree node ownership and navigation |
| tree_node.h | Qt-independent metadata tree nodes |
| typefactory.h | |
| value_descriptions.h | |
| ▼ examples | |
| main.cpp | Created: 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_lifetime_test.cpp | |
| dbc_parser_test.cpp | |
| dbc_pipeline_test.cpp | |
| dbc_tree_model_test.cpp | |
| dbc_validation_test.cpp | |
| main.cpp | |
| tree_node_test.cpp | |
| multiplex_graph.h | |
| multiplexing.h | |
| signal_info.h | Parsed CAN signal metadata |
| signal_layout.h | |
| text_utils.h | |
| tree_node.cpp | Tree node ownership and navigation |
| tree_node.h | Qt-independent metadata tree nodes |
| typefactory.h | |
| value_descriptions.h | |
| ▼ examples | |
| main.cpp | Created: 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_lifetime_test.cpp | |
| dbc_parser_test.cpp | |
| dbc_pipeline_test.cpp | |
| dbc_tree_model_test.cpp | |
| dbc_validation_test.cpp | |
| main.cpp | |
| tree_node_test.cpp | |
| CAttributeAssignment | Explicit assignment; defaults remain on definitions |
| CAttributeDefinition | Attribute type, permitted range, and optional default |
| CDbcDatabase | Parsed DBC content stored in a simple internal form | CDbcCommentHandler | Defer frame and signal comments for target resolution |
| CDbcFrameHandler | Parse and append frame definitions |
| CDbcHeaderHandler | |
| CDbcSignalHandler | Parse and append signals to the current frame |
| CDbcUnsupportedMultiplexingHandler | Reject unsupported extended multiplexing statements |
| CDbcMultiplexingHandler | Parse extended multiplexing conditions for deferred resolution |
| CDbcSignalHandler | Parse and append signals to the current frame |
| CDbcValueDescriptionHandler | Defer raw value descriptions for target resolution |
| CDbcTreeBuilder | Builds a simple tree from parsed DBC database |
| CDecodeDatabase | Immutable runtime snapshot. Copies share storage; reload replaces a snapshot. Owning lookup handles and decoded results keep old definitions alive | CDecodeFrame | Runtime-ready frame definition |
| CDecodeSignal | Runtime-ready signal definition |
| ▼Cstd::exception | STL class |
| ▼Cstd::runtime_error | STL class |
| CDbcDiagnosticError | |
| CFrameInfo | Describes one CAN frame from a DBC file |
| CFrameKey | Stable frame identifier: normalized CAN ID and frame type |
| CFrameKeyHasher | Hasher for frame key |
| CMultiplexing | |
| CPendingAttribute | Attribute statement retained for ordered resolution |
| CPendingComment | Deferred frame or signal comment and its source location |
| CPendingValueDescriptions | Deferred raw value descriptions and their target |
| CPgnLookupResult | |
| ▼CQAbstractItemModel | |
| CDbcTreeModel | |
| CRawCanFrame | Raw CAN frame used for runtime or trace decoding |
| CSignalInfo | Describes one signal inside a DBC frame |
| CSignalKey | |
| CSignalKeyHasher | Hasher for stable signal keys |
| CTreeNode | Tree 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 > | |
| ▼Cstd::logic_error | STL class |
| ▼Cstd::invalid_argument | STL class |
| Cdbc_detail::MultiplexError | |
| ▼Cstd::runtime_error | STL class |
| CDbcDiagnosticError | |
| CFrameInfo | Describes one CAN frame from a DBC file |
| CFrameKey | Stable frame identifier: normalized CAN ID and frame type |
| CFrameKeyHasher | Hasher for frame key |
| Cdbc_detail::MultiplexGraph | |
| CMultiplexing | Basic markers and optional explicit extended multiplexing condition |
| CMultiplexRange | Inclusive raw selector range, without expanding individual values |
| CPendingAttribute | Attribute statement retained for ordered resolution |
| CPendingComment | Deferred frame or signal comment and its source location |
| CPendingMultiplexing | Deferred extended multiplexing condition and source location |
| CPendingValueDescriptions | Deferred raw value descriptions and their target |
| CPgnLookupResult | |
| ▼CQAbstractItemModel | |
| CDbcTreeModel | |
| CRawCanFrame | Raw CAN frame used for runtime or trace decoding |
| CSignalInfo | Describes one signal inside a DBC frame |
| CSignalKey | |
| CSignalKeyHasher | Hasher for stable signal keys |
| CTreeNode | Tree 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 > |
This module provides a minimal but extensible DBC parser and runtime decode foundation for the FrameTap project.
Its purpose is to:
@@ -117,10 +117,10 @@ OverviewSee changelog.md for the release and development history, tests/README.md for test instructions, and generated API documentation for the API reference.
AGENTS.md contains project instructions for coding agents, including code style, build and test commands, and documentation requirements.
The module is divided into two main paths.
-Used for:
Used for:
This separation is intentional.
The tree is useful for UI, but it is not the main data structure for runtime decoding.
A tree structure is convenient for browsing, but a runtime decoder needs something different:
This avoids forcing UI-oriented structures into a decode role they were not meant for.
core/core.pro, core/core_files.pri, core/core.pri Represents one signal as parsed from the DBC file.
Fields:
@@ -239,7 +239,7 @@ Parsed Data StructuresPhysical value rule:
Represents one frame as parsed from the DBC file.
Fields:
@@ -261,7 +261,7 @@ Parsed Data Structurespgn is derived for extended frames only with explicit J1939 opt-in (see below)Top-level parsed DBC container.
Conceptually:
@@ -269,9 +269,9 @@ Parsed Data StructuresThis is the central structure produced by DbcParser.
The UI tree contains three node types:
GetFrameKey() returns std::optional<FrameKey> for frame nodes and signals directly attached to a frame. GetSignalKey() returns std::optional<SignalKey> for those signals. Roots, detached signals, and signals without a frame parent have no key. Keys use normalized CAN ID plus standard/extended type, and signal keys also include the signal name. They match runtime definition keys, remain independent of row order and frame display names, and survive source-database changes or destruction. Renaming a signal changes its logical identity. Returned keys are values and may be retained after destroying the tree.
It is not the primary runtime decode structure.
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.
Runtime byte order enum:
This is better for decode code than passing around raw DBC characters.
Numeric type enum:
This is clearer than combining multiple boolean flags during runtime logic.
Represents one runtime-ready signal definition.
Fields:
@@ -343,7 +343,7 @@ PurposeThis structure contains all information required for extracting and converting a signal value from raw frame data.
Represents one runtime-ready frame definition.
Fields:
@@ -360,7 +360,7 @@ PurposeThis structure is used directly by the decoder.
Stable identifier for runtime frame matching and application state.
Fields:
@@ -370,7 +370,7 @@ PurposeThis matters because the same numeric identifier must not be confused between standard and extended frames.
Immutable runtime snapshot with a private frame index. Build it with DbcDecodeBuilder::Build(parsed) or construct it from std::vector<DecodeFrame>. Construction validates all definitions and duplicate keys before building the lookup index or publishing the snapshot, and throws std::invalid_argument for invalid metadata, including manually supplied data:
dlc remains a byte count in the storage range 0–255; construction imposes no additional CAN/CAN FD payload limit. A zero-byte frame may contain no signals. Both DbcDecodeBuilder::Build and the direct constructor apply these rules. Construction copies the input, including nested metadata, even for rvalue input. Saved mutable aliases into that input cannot modify definitions or invalidate the lookup index. Database copies still share the frozen snapshot; a failed construction or replacement leaves the previous snapshot and its lookups intact.
Frame lookup uses a hash index; signal lookup scans the matched frame's signals. Decoding shares the snapshot without copying definitions or allocating ownership objects per signal.
Represents a raw CAN frame to decode.
Fields:
@@ -409,7 +409,7 @@ Decoder LayerRepresents one decoded signal result.
Fields:
@@ -422,7 +422,7 @@ Decoder LayerstatusDecodedSignalValue::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 physical value. Raw data is also available when status == PhysicalConversionFailed; other invalid results have no decoded numeric data.
Use std::get when the numeric type is known, or std::get_if to handle both:
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.
Represents one decoded frame result.
Fields:
@@ -464,13 +464,13 @@ Raw value representation and precisionShort-payload status takes precedence over signal errors; inspect each signal's status for the individual cause. valid retains its existing meaning of a matched definition and does not imply status == FrameDecodeStatus::Valid.
Payload policy uses dlc as a byte count, including for CAN FD; it is not the encoded wire DLC. A shorter payload is never padded: all signals whose bytes are available still decode, even if other signals fail. A longer payload is accepted; bytes beyond dlc are ignored. Signal bit layouts must fit the declared dlc, so extra bytes cannot rescue an invalid definition. Empty payloads and zero-byte frame definitions follow the same rules. Results include every signal in definition order, preserving successful values and definition handles on partial failures.
The decoder applies factor and offset; it does not clamp physical values to the declared minimum and maximum. Non-finite conversion results (NaN or positive/ negative infinity), including overflow with finite factor/offset, produce PhysicalConversionFailed. The exact raw value and non-finite physicalValue remain available, while signal valid is false. Non-finite numeric parameters are rejected during database construction. Finite parameters can still overflow during conversion; conversion failure of a selector does not prevent raw branch selection.
DecodedFrameValue::definition and DecodedSignalValue::definition are owning std::shared_ptr<const ...> handles. Each handle retains the immutable runtime snapshot. Definitions remain valid until the last database copy, lookup handle, or decoded result owning that snapshot is released. An independently copied signal result retains its definition even after the parent frame result is removed. Copying or moving results preserves ownership.
Reload by assigning a newly built database. Stored results continue to describe the old DBC, including its units, scaling, comments, and VAL_ descriptions; subsequent decoding uses the new DBC. Removed definitions cannot be found in the new database, but old results safely retain their old definitions. Keeping even one signal handle retains the whole old snapshot; release stored results when that metadata is no longer needed.
GetFrames() is a borrowed view. References, iterators, and raw pointers obtained from it or from a handle's .get() do not retain ownership. Keep an owning handle or an unchanged database copy while using them. Constructor input is copied and may be changed independently afterward. The raw string pointer from GetValueDescription() follows the same rule: keep the signal definition handle alive while using the string.
Parsed DbcDatabase/FrameInfo/SignalInfo remain ordinary mutable value containers: borrowed pointers follow standard vector invalidation rules. Builders copy their metadata, so parsed input may be changed or destroyed after building. Tree nodes own metadata copies; the Qt model owns its tree and invalidates model indexes on reset. Runtime handles do not depend on the parsed database or tree. Synchronize replacement of a shared database variable with decoding; immutable snapshots do not make concurrent assignment to the same object safe.
DecodedFrameValue::key is a FrameKey (normalized canId, isExtended), also available through DecodeFrame::GetKey(). DecodedSignalValue::key is a SignalKey (frame key, exact case-sensitive signal name). Both are value types with equality and hashers (FrameKeyHasher, SignalKeyHasher) for application maps and saved selections. Construct the same keys from parsed metadata when needed; do not use addresses or vector positions as identifiers.
Keys stay equal across reloads and reordering when their components stay equal. Frame renaming and changes to units, bit layout, scaling, or descriptions do not change a key. Changing a CAN ID/frame type or renaming a signal produces a new key. The same name in different frames and standard/extended frames with the same numeric CAN ID remain distinct. Keys identify definitions within one logical DBC database; applications combining databases must add their own database ID. A key is not a version identifier: matching keys in different snapshots may have different metadata. Use valid/the definition handle to distinguish a matched result; default keys alone do not indicate successful decoding.
API migration: replace reads of runtime.frames with runtime.GetFrames(). To edit runtime definitions, prepare a vector and construct a new database; frameIndexByKey is now private and built automatically. DbcDecoder::FindFrame and result definition fields now use owning handles instead of raw pointers; definition->name, boolean/null checks, and existing decode calls remain usable. Use .get() only for temporary raw-pointer interoperation with an owner alive.
Main runtime decoder class.
Responsibilities:
@@ -513,7 +513,7 @@ Stable frame and signal identifiersDecode(...)The current parser supports the following DBC elements:
CM_ BO_CM_ SG_VAL_ signal value descriptionsM / mN multiplexingM, mN, mNM, SG_MUL_VAL_)ParseFileWithDiagnostics(path) returns DbcParseResult containing database and diagnostics. Each DbcDiagnostic has severity, code, filePath, lineNumber, and message. Paths preserve the caller's supplied spelling. Lines are one-based physical lines, including blank lines; file-level errors use zero.
Warning / UnsupportedStatement Error / UnsupportedStatement SG_MUL_VAL_) rejected Error / InvalidMultiplexing SG_MUL_VAL_ syntax, references, ranges, or cycles Parsing stops at the first error and returns an empty database, together with any preceding warnings and the error. Deferred comment, VAL_, and multiplexing errors retain their original source lines. Invalid signal markers use InvalidStatement. HasErrors() checks severity; warnings alone do not make a parse fail.
Unknown statements are reported conservatively, including SIG_VALTYPE_, attribute relation forms (BA_REL_, BA_DEF_REL_), signal types/references, environment variables, named VAL_TABLE_ tables, and vendor extensions. For example, ignoring SIG_VALTYPE_ may decode a floating-point signal as an integer. The parser does not implement the warned features; consumers should review warnings.
BA_DEF_, BA_DEF_DEF_, and BA_ support database, BO_, SG_, BU_, and EV_ scopes with INT, HEX, FLOAT, STRING, and ENUM definitions. Integer/HEX values use decimal signed 64-bit numbers; floating values are finite and locale independent. ENUM assignments use zero-based indices; defaults accept an index or a quoted label. Strings support escaped quotes and backslashes. Each statement occupies one physical line and ends with ;.
BA_DEF_, BA_DEF_DEF_, and BA_ support database, BO_, SG_, BU_, and EV_ scopes with INT, HEX, FLOAT, STRING, and ENUM definitions. Integer/HEX values use decimal signed 64-bit numbers; floating values are finite and locale independent. ENUM assignments use zero-based indices; defaults accept an index or a quoted label. Strings support escaped quotes and backslashes. Statements end with ; outside quoted text and may span physical lines, including ENUM lists, defaults, and assignments. Newlines inside quoted strings are preserved; semicolons inside them do not terminate the statement. Attribute errors and format warnings refer to the statement's first physical line.
Common VERSION, NS_, BS_, and BU_ headers produce no diagnostics. Single-token symbols inside the NS_ declaration list are quiet regardless of indentation, even when they name unsupported syntax. Frame, signal, bus, and node definitions or a line with arguments end the list. Actual unsupported statements outside that list are reported. Node and bus metadata are not stored. Other comment forms (CM_, CM_ BU_, CM_ EV_) are ignored by the comment handler. Frame and signal comments may span physical lines and resolve after definitions are read; other supported statements require one physical line.
ParseFile(path) remains compatible: it returns the database, discards warnings, and throws std::runtime_error on the first error with the existing path:line: format. Use ParseFileWithDiagnostics to see skipped syntax. Resource failures such as allocation errors may still throw.
Example:
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.
Frame and signal definitions are validated as described here; comprehensive DBC grammar coverage is still planned. File-open exceptions contain the path but no line number. The structured diagnostic API uses line zero for file-level errors.
Example:
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. Conversion is independent of the application's C and C++ locales: the decimal separator is always a dot (.), and comma decimals and digit grouping are rejected. The entire numeric token must be valid; hexadecimal numbers, NaN, infinity, conversion overflow, and conversion underflow (including subnormal values) are rejected. Minimum must not exceed maximum. Zero and negative factors are allowed.
Basic multiplexing markers M and mN are supported as described below. Overlapping signals are rejected unless their branch values differ. Duplicate frame keys and signal names within a frame are rejected.
Basic and extended multiplexing markers are supported as described below. Overlapping signals are rejected unless their selector conditions prove mutual exclusion. Duplicate frame keys and signal names within a frame are rejected.
Invalid signal definitions stop parsing with path:line: description, including when the signal exceeds the declared payload length.
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.
SignalInfo and DecodeSignal contain multiplexing: a MultiplexRole (Unconditional, Selector, Branch, or BranchSelector), an exact uint64_t marker value, and optional parent selector name with inclusive ranges. M declares an unsigned selector; mN declares a branch and mNM declares a branch that is itself a selector. Without explicit ranges, mN/mNM use the unique unconditional M selector and the marker's raw value. If several root selectors exist, branches require explicit references.
Extended conditions use SG_MUL_VAL_ <message-id> <signal> <selector> <low>-<high>, ...;:
Here Value is active when Root is 1, 2, or 4 and Child is 3 through 5. Explicit ranges override the marker value. Repeated statements for the same signal/selector merge their range alternatives. Each signal has at most one parent selector; conflicting parent references are rejected. Multiple independent root selectors are supported. Statements and selectors may precede or follow their targets. Decimal values retain the full uint64_t range and must fit the parent's bit width. Ranges are stored without expanding individual values. Malformed ranges, unresolved references, signed selectors, ambiguous implicit selectors, and dependency cycles produce InvalidMultiplexing diagnostics. Statement errors retain the SG_MUL_VAL_ source line; graph and overlap errors identify the affected signal declaration.
Signal bits may overlap only when the complete ancestor conditions prove the signals mutually exclusive: at least one shared selector has disjoint ranges. This includes nested siblings using the same payload bits and independent selectors, whose branches may be active simultaneously. Validation uses Intel or Motorola bit traversal, including mixed byte orders. Metadata survives runtime and tree builders; the optional Qt adapter does not add multiplexing roles yet.
+The decoder checks ancestors from root to leaf using raw unsigned values. An inactive ancestor leaves descendants inactive even if their selector bytes are absent. Missing bytes on an otherwise active selector path produce SelectorUnavailable. Selective decoding reads required ancestors internally; result order remains selection or definition order. Factor, offset, and VAL_ descriptions do not influence branch selection.
Each result has SignalDecodeStatus status:
PhysicalConversionFailed | Raw value is available, but the converted physical value is NaN or infinity |
All statuses except Valid have valid == false and GetValueDescription() returns nullptr. PhysicalConversionFailed preserves extracted raw data and the non-finite conversion result; other invalid statuses have no decoded numeric data. Check status to distinguish inactive branches from errors. Consumers constructing runtime metadata manually receive the same selector and non-overlap validation as parsed files. Extended and nested multiplexing are outside this stage and are explicitly rejected, rather than silently decoded as unconditional signals.
All statuses except Valid have valid == false and GetValueDescription() returns nullptr. PhysicalConversionFailed preserves extracted raw data and the non-finite conversion result; other invalid statuses have no decoded numeric data. Check status to distinguish inactive branches from errors. Consumers constructing runtime metadata manually receive the same selector graph and non-overlap validation as parsed files.
Frame comment example:
Comments accept spaces and tabs between fields, quotes and backslashes escaped with a preceding backslash, and text spanning multiple physical lines. Newlines, blank lines, and indentation inside quoted text are preserved; CRLF becomes LF. Comments may appear before their frame or signal definitions. References use the same decimal CAN ID validation and normalization as BO_, including reserved-bit and overflow checks and distinct standard/extended targets. Repeated comments apply in statement order, so the last comment wins, including empty text.
Malformed supported comments (including invalid escapes, missing quotes or semicolon, and trailing text) and missing frame/signal references produce an InvalidStatement error at the comment's starting line. Failed parses return an empty database; ParseFile throws with the same source location.
The parser normalizes frame identifiers.
Common DBC behavior:
@@ -685,14 +693,14 @@ CAN ID NormalizationThis is important both for correct lookup and for future interoperability with live CAN APIs.
Extended CAN identifiers do not imply J1939. The default parser leaves hasPgn false and pgn zero, and decoding uses exact normalized CAN ID and frame type. Enable J1939 interpretation explicitly for a file:
DbcDecoder::FindFrame and both Decode overloads first try the exact ID/type. Only when that fails for a valid normalized extended ID do they try PGN lookup among definitions with hasPgn == true. A unique PGN can therefore match a changed source address or priority, and for PDU1 a changed destination address. A changed PDU2 group extension does not match. Exact matches win even when the PGN is ambiguous, including exact matches to ordinary extended CAN definitions. Multiple PGN candidates are never resolved by order, source, or payload: FindFrame returns null and Decode returns AmbiguousFrame without decoding signals or validating the selection. Missing candidates return UnknownFrame.
On success, decoded frame/signal keys belong to the matched DBC definition; selected-signal decoding also expects those definition keys. Keep the input RawCanFrame if the received address/ID is needed separately. This feature does not implement transport-protocol reassembly, address claiming, or full J1939 validation.
Typical runtime decode flow:
The decoder currently has separate extraction paths:
Intel and Motorola require different bit extraction logic.
This is one of the main reasons why the runtime decode layer should be explicit and prepared in advance.
Include the public headers from the core/ include directory supplied by core/core.pri:
A key design goal is that the same decoder should work for both:
That means this architecture supports:
-This avoids duplicating decode logic in two separate parts of the application.
This module is meant to support at least the following FrameTap workflows:
The tree exists for browsing.
However, runtime decode should not rely on tree traversal because that would introduce unnecessary coupling and inefficiency.
@@ -838,7 +846,7 @@ Why the Tree Is Not EnoughThat is why DecodeDatabase is a separate layer.
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:
SG_ → DbcSignalHandlerCM_ → DbcCommentHandlerVAL_ → DbcValueDescriptionHandlerSG_MUL_VAL_ → DbcUnsupportedMultiplexingHandlerSG_MUL_VAL_ → DbcMultiplexingHandlerVERSION, NS_, BS_, BU_ → DbcHeaderHandler (also accepts attached colons)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:
Register it in the dispatcher constructor:
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 produce UnsupportedStatement warnings through ParseFileWithDiagnostics. 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.
Signal descriptions attach text to exact raw integer values:
GetValueDescription() uses the exact raw integer before factor/offset scaling. It returns nullptr for an invalid decode or an unknown value; numeric decoding and physicalValue are unchanged. A mapped empty string returns a non-null pointer. The pointer belongs to the signal definition and stays valid while that definition remains alive. A decoded signal owns its immutable definition across reload.
For metadata or standalone raw values, use FindValueDescription(signal.valueDescriptions, rawValue), where rawValue is RawSignalValue (std::variant<std::int64_t, std::uint64_t>). The helper matches nonnegative signed and unsigned values identically and keeps negative values distinct from large unsigned values. Stored keys use negative int64_t and nonnegative uint64_t; when constructing mappings manually, normalize keys with NormalizeValueKey() before insertion.
Named VAL_TABLE_ tables, environment-variable mappings, multiline statements, are outside this implementation; the optional Qt adapter exposes signal mappings.
This is still a minimal implementation.
Not supported yet:
SG_MUL_VAL_, mNM)VAL_TABLE_ tables and environment-variable value descriptionsBA_REL_, BA_DEF_REL_)SIG_VALTYPE_ floating-point signal typesMotorola extraction uses DBC sawtooth numbering: a start bit of 7 traverses 7..0, 15..8, 23..16. Regression tests cover aligned and unaligned signals, byte boundaries, and 64-bit values.
A practical development order would be:
-BO_Recommended additions:
Recommended additions:
Advanced functionality:
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 core/core_files.pri; no CMake configuration is currently provided.
Qt-dependent qmake targets share qt/qt_version.pri, which rejects Qt versions other than 6.8.2. The core library remains independent of Qt libraries.
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.
Run bash tests/run_core_ci.sh release or bash tests/run_core_ci.sh sanitize to build the core archive with Qt 6.8.2, run all six core QtTest suites (parser, decoder, coverage, lifetime, validation, and pipeline/builder integration), and run both the qmake and standalone Qt-free tree tests. The sanitizer mode uses AddressSanitizer and UndefinedBehaviorSanitizer, with leak detection enabled by default and fatal sanitizer errors.
See Local regression checks for prerequisites and environment overrides. No automatic CI workflow is configured.
+From the repository root:
qmake is still the build tool; this target does not link Qt libraries.
-The adapter and its QAbstractItemModelTester 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 offscreen platform when QT_QPA_PLATFORM is unset or empty; no display server is required. An explicit platform setting is preserved.
ValueDescriptionsRole 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.
From the repository root, use only a C++17 compiler:
After building core, run these commands from the repository root:
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.
With Doxygen installed, run from the repository root:
Open docs/html/index.html to view the generated reference.
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. dbc_pipeline_test.cpp follows temporary DBC fixtures through parsed metadata, runtime frame/signal lookups, decoded raw/physical values and descriptions, and tree nodes. It verifies all supported metadata in both builders, standard and extended frames sharing a numeric ID, empty databases, comments, and replacement with another fixture or an empty database.
Attribute numeric parsing shares one locale-independent converter for integer and floating-point values. Default application skips unrelated scopes, CAN ID normalization uses the validated identifier mask, and signal layout validation owns the length checks. Statement handlers continue to use TypeFactory. Core, adapter, example, and test C++ sources use explicit return types and contain no lambdas. Public metadata and parser-state comments use Doxygen descriptions.
See tests/README.md for attribute boundary regressions, sanitizer commands, and the latest validation results.
-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.
Install the build and report tools:
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.
-dbc.pro and select a GCC kit with Qt 6.8.2.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.html/index.html in a browser. This workflow produces HTML reports; it does not require a licensed coverage toolchain.The local dbc.pro.user stores machine-specific kit IDs and build/run settings. It is ignored by Git (*.user) and should not be committed or copied between machines. Recreate the configurations below through the UI when setting up a new checkout. The Qt4ProjectManager identifiers inside .user are historical Qt Creator setting names; the project still requires Qt 6.8.2.
The local configuration set uses these independent build directories:
diff --git a/docs/html/md_changelog.html b/docs/html/md_changelog.html index 453136e..7a3206a 100644 --- a/docs/html/md_changelog.html +++ b/docs/html/md_changelog.html @@ -97,42 +97,64 @@ $(document).ready(function(){initNavTree('md_changelog.html',''); initResizable(SG_MUL_VAL_ range conditions and nested mNM selectors, dispatched through TypeFactory with deferred target resolution and source diagnostics.qmake6 ../dbc.pro, make -j4, and make check: 2,398 QtTest checks passed with no failures; one existing C-locale check skipped because a named comma-decimal locale is unavailable. Both qmake and standalone tree tests pass.tests/run_core_ci.sh for the core archive, all six core regression suites, and qmake/standalone tree tests, with separate build directories and fatal test/sanitizer failures.BA_DEF_, BA_DEF_DEF_, and BA_ attributes with deferred definitions/references, validated ranges, defaults, and explicit overrides. Preserve definitions and assignments plus effective database/frame/signal values.DbcParserOptions::enableJ1939 (default off) or explicit per-frame hasPgn metadata. Extended CAN alone no longer derives PGN metadata. Runtime construction validates opted-in PGNs against frame IDs.AmbiguousFrame. Result and selection keys identify the DBC definition.qmake6 ../dbc.pro, make -j4, and make check in build/: all six QtTest suites and the Qt-free tree target passed; the existing named comma-decimal C locale test skipped because that locale is not installed.std::from_chars, retaining signed decimals, scientific notation, complete-token validation, and range/finite checks.InvalidStatement errors; keep statement-order overwrites, including empty comments. Added regression coverage and updated parser/test documentation. Verified with qmake6, make -j4, and make check: all six regression suites passed.AGENTS.md with project coding rules, build/test commands, and documentation requirements, based on the existing .project_rules.DbcDecodeBuilder input: normalized CAN IDs, duplicate keys, signal lengths and positions, enums, finite numeric parameters, ordered ranges, selectors, branch ranges, and overlaps.SignalDecodeStatus::PhysicalConversionFailed reports NaN/Inf results, retaining exact raw values and the non-finite physical result.std::invalid_argument before publishing a snapshot. Decoder tests now expect construction failures for malformed definitions; finite arithmetic overflow remains a decode status.NS_ symbol declarations do not produce unsupported-statement warnings.DecodeDatabase is an immutable shared snapshot. Use GetFrames() for reads or construct a new snapshot from a vector; its frame index is private and built automatically, with duplicate-key validation.SG_MUL_VAL_ rejection through TypeFactory; extended and nested multiplexing remain unsupported. Added parser/decoder regression coverage and documented supported syntax and consumer behavior.QVERIFY_THROWS_EXCEPTION and explicitly discarding nodiscard return values in exception checks.DecodedSignalValue::GetValueDescription() and FindValueDescription() for raw integer lookup before physical scaling. Unknown values retain normal numeric decoding.core/, a demo in examples/, and a combined regression test executable in tests/. Added shared .pri files and updated build instructions. (f17ddb6, #11).clang-format and applied consistent formatting to the source code and tests. (b91cf4a, #7)03dc8f2)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)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)6cd9976, 0067cb4, f17ddb6)1163277)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)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)TypeFactory utility. (2c057b6)INT64_MAX, and updated physical conversion and demo output. Added tests for signed and unsigned boundaries and numeric output. (69074e3, #2)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)Tag v1.0 points to 38ce043 and includes the initial implementation below.
e2ffa97)e2c07dd, 4c8af9f)dfec39d, 38ce043)4270459)2a90b2d)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).gitignore and expanded the README with architecture, data structures, parsing behavior, decoding examples, and usage documentation. (efc57d6, f2aa10c, cb20f5f, f0e7065) For instrumented builds, LCOV HTML reports, and Qt Creator coverage configuration, see Measuring code coverage. For the complete IDE build/run configuration set, see Configure all build variants in Qt Creator. The Coverage configuration uses coverage_report.sh after its instrumented build; the script takes the source and build directories as its two arguments.
For instrumented builds, LCOV HTML reports, and Qt Creator coverage configuration, see Measuring code coverage. For the complete IDE build/run configuration set, see Configure all build variants in Qt Creator. The Coverage configuration uses coverage_report.sh after its instrumented build; the script takes the source and build directories as its two arguments.
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:
parser_tests.pri and decoder_tests.pri include the original test sources; tests.pro also includes dbc_coverage_test.cpp, dbc_lifetime_test.cpp, dbc_validation_test.cpp, and dbc_pipeline_test.cpp. ../core/core.pri supplies the library include path and linkage.
run_core_ci.sh builds the core archive, runs all six QtTest suites and the qmake tree target with make check, then compiles and runs the standalone C++17 tree/builder test without Qt. A failed command returns a nonzero status. The sanitize mode applies ASan/UBSan flags to core, tests, and the standalone executable, with leak detection enabled by default and sanitizer errors fatal. The optional adapter is not built. No automatic CI workflow is configured.
From the repository root, with Qt 6.8.2 available:
+Build directories default to build-ci/release and build-ci/sanitize; an optional second argument selects another directory. Always use separate build directories for the two modes. QMAKE, CXX, and JOBS override the qmake executable, standalone compiler, and build parallelism (default 4). Generate the locale as described below and set LOCPATH locally to run without locale skips. On hosts where LeakSanitizer cannot work under a tracer, run with ASAN_OPTIONS=detect_leaks=0:halt_on_error=1; this disables local leak checking only. Test output is written to the terminal.
Validation of this script used clean builds in /tmp/dbc-ci-release and /tmp/dbc-ci-sanitize with Qt 6.8.2 and the generated German locale. Each mode passed 2,397 QtTest checks with no failures or skips, the qmake tree test, and the standalone tree test. The sanitizer run used detect_leaks=0 because an explicit leak-enabled run failed with LeakSanitizer's ptrace restriction. Shell syntax, invalid-mode handling, and nonzero propagation of a failed qmake command were also checked.
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; frame status reports unknown frames, short payloads, and signal errors. Tests exercise empty/short/exact/long payloads, ignored trailing bytes, signals outside declared DLC, invalid enum metadata and overflowing start bits rejected at construction, and preservation of successful signals on partial payloads. Physical conversion checks cover NaN/Inf parameters rejected at construction, multiplication/addition overflow, finite limits, signed/unsigned raw retention, and raw selector activation after physical conversion failure.
Structured diagnostic tests cover severity, code, supplied path, and physical line numbers for skipped syntax and immediate/deferred errors; warnings preceding an error are retained, and failed parses return an empty database. Common headers and namespace symbol lists stay quiet. Tests also check file-open errors, fresh parse sessions, and compatibility with the legacy throwing API. The diagnostic audit also covers 13 unsupported-statement variants, all namespace termination forms, CRLF and missing final newlines, relative paths with spaces, first-error stopping, deferred diagnostic ordering, duplicate definitions/values, selector ranges, overlaps, and preservation of supported decoding and metadata. On Linux, reading a directory exercises the distinct FileReadError path.
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. Comment regressions cover tabs, escaped quotes/backslashes, multiline text with blank lines and indentation, CRLF, missing final newlines, comments preceding frame/signal definitions, last-wins and empty overwrites, normalized ID boundaries, standard/extended separation, malformed syntax/IDs, and missing targets. Errors verify both structured diagnostics and the throwing API at the starting line. 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. Physical-number tests apply a custom comma-decimal C++ locale and an available named comma-decimal C numeric locale. They check all four physical fields, leading signs, fractions, scientific notation, finite boundaries, zero, malformed numbers, comma/grouped numbers, overflow/underflow, and reversed ranges. Locale changes are restored after each test. The named C locale case skips if none of the supported locale names are installed; the custom C++ locale case always runs. On Linux with locale sources and localedef, run both cases without installing a system locale:
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. Comment regressions cover tabs, escaped quotes/backslashes, multiline text with blank lines and indentation, CRLF, missing final newlines, comments preceding frame/signal definitions, last-wins and empty overwrites, normalized ID boundaries, standard/extended separation, malformed syntax/IDs, and missing targets. Errors verify both structured diagnostics and the throwing API at the starting line. 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, invalid multiplexing, and Intel/Motorola declared-payload boundaries. Physical-number tests apply a custom comma-decimal C++ locale and an available named comma-decimal C numeric locale. They check all four physical fields, leading signs, fractions, scientific notation, finite boundaries, zero, malformed numbers, comma/grouped numbers, overflow/underflow, and reversed ranges. Locale changes are restored after each test. The named C locale case skips if none of the supported locale names are installed; the custom C++ locale case always runs. On Linux with locale sources and localedef, run both cases without installing a system locale:
Run make check from the build directory as usual. 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_node_test.cpp is a standalone C++17 executable without Qt; see the root README for its compiler command. It is also built as dbc_tree_tests and run by qmake's make check, without Qt linkage. It checks empty trees, parent/child round trips, sibling positions, const/mutable bounds, null children, vector growth, and unique_ptr transfer. Compile-time checks reject node copying and movement. Self/ancestor insertion must throw without consuming ownership or changing links. Key tests cover frame/signal identity, standard/extended separation, repeated signal names across frames, missing keys, source replacement, and row-independent identity.
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_.
-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, and overlaps.
+Extended and nested multiplexing coverage includes deferred SG_MUL_VAL_ references, inclusive and separated ranges, repeated range statements, explicit range precedence over markers, mNM fallback, independent selectors, nested siblings sharing Intel/Motorola payload bits, raw selection with scaling, and 64-bit boundaries. Tests verify metadata through tree/runtime builders, selective decoding with ancestor dependencies, inactive paths with missing bytes, missing selectors versus leaf payload, malformed ranges, unknown targets, cycles, conflicting parents, and invalid manually constructed runtime graphs. The extended multiplexing change was verified with the root qmake build, make -j4, make check (2,398 passed, no failures, one existing named C-locale check skipped because the locale is unavailable), and the standalone tree test.
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, construction rejection of 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.
J1939 regressions in dbc_coverage_test.cpp verify explicit parser opt-in and ordinary extended CAN defaults, PF 239/240 and all data-page combinations, PGN zero, PDU1 destination exclusion, PDU2 group-extension matching, changed source and priority, standard/invalid-ID exclusion, and inconsistent manual metadata. They also cover exact-ID precedence, order-independent ambiguous PGNs for both PDU formats, mixed ordinary/J1939 definitions, selected-signal definition keys, raw/physical values, and owning PGN handles across snapshot replacement. The pipeline fixture explicitly enables J1939 through the diagnostic parser API. Verified in build/ with qmake6 ../dbc.pro, make -j4, and make check: all six QtTest suites and the Qt-free tree target passed. The existing named comma-decimal C locale regression skipped because that locale is not installed.
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.
dbc_lifetime_test.cpp checks retained definitions and value-description strings across reload, clear, and destruction; independently saved signal results; copied/moved results and database copies; owning lookup handles; and release of the old snapshot after its final owner is removed. Compile-time checks enforce const access to runtime metadata. Reload fixtures change ordering, frame names, scaling, units, and descriptions, remove definitions, and rename signals.
Key tests check equality and hashing, standard/extended separation, the same signal name in different frames, and missing lookups. Constructor tests reject duplicate runtime keys, including manually supplied parsed metadata. Failed reload leaves the active database intact; empty reload clears it. Invalid/unknown results and insufficient payloads retain their documented ownership and status behavior. Inactive branches and unavailable selectors also retain definitions across reload.
-dbc_validation_test.cpp checks direct construction and manually assembled DbcDatabase input to DbcDecodeBuilder: standard/extended CAN ID limits, encoded/reserved ID bits, duplicate keys, lengths 0/1–64/65/UINT32_MAX, Intel/Motorola payload boundaries and overflowing start bits, invalid enums, NaN and both infinities in every numeric parameter, and reversed physical ranges. Selector tests include missing, duplicate, and signed selectors, branch ranges, UINT64_MAX selection, mixed-order overlaps, and exclusive branches sharing bits. Valid definitions cover the full byte-count storage range, including zero-byte frames without signals and 255-byte frames. Existing extraction tests cover lengths 1–64. Snapshot tests mutate retained frame, signal, and description aliases after rvalue construction, and verify unchanged lookups and metadata. Failed constructor/builder replacement preserves the active snapshot; clear removes its index while saved handles remain alive.
Layout validation is also compared with independent DBC bit traversal for every start position through one byte beyond payload sizes 0, 1, 8, 64, and 255, and all lengths 1–64, for both byte orders. Zero/65-bit lengths and uint32 maximum inputs are rejected. Builder snapshots survive input mutation and destruction; failed replacement with duplicate frame or signal keys preserves the existing frame and signal lookups.
-dbc_pipeline_test.cpp parses temporary DBC files and checks independent expected metadata against the parser, runtime builder, and tree builder. It exercises standard and extended frames with the same numeric ID and signal name, Intel and signed Motorola decoding, scaling, raw value descriptions, basic multiplexing, PGN metadata, receivers, units, ranges, and frame/signal comments. Tree checks include node types, payloads, parents, rows, names, and child counts.
dbc_pipeline_test.cpp parses temporary DBC files and checks independent expected metadata against the parser, runtime builder, and tree builder. It exercises standard and extended frames with the same numeric ID and signal name, Intel and signed Motorola decoding, scaling, raw value descriptions, basic and extended multiplexing, PGN metadata, receivers, units, ranges, and frame/signal comments. Tree checks include node types, payloads, parents, rows, names, and child counts.
Empty and headers-only fixtures produce an empty runtime database and a valid empty tree root. Replacement fixtures change definitions, metadata and decoded values, remove old lookup keys, and then clear both outputs through an empty fixture. Saved decoded results and trees retain their original metadata.
-multilineAttributes checks multiline definitions, defaults and assignments, deferred cycle times, frame format overrides, quoted newlines/semicolons and escapes, CRLF input, and warning locations for defaults and explicit values. invalidMultilineAttributes checks malformed ENUM lists/ranges, missing terminators, unterminated strings, undefined names, trailing fields, and error locations at the first physical line through both parser APIs.
The multiline changes passed a clean qmake build and make check in /tmp/dbc-attributes-build with Qt 6.8.2: 2,396 QtTest cases and the qmake tree target passed. The standalone C++17 tree test also passed. One existing C locale test skipped because no named comma-decimal locale is installed.
Parser slots attributes, invalidAttributes, and attributeWarnings cover all five scopes and types, deferred definitions/defaults/targets, explicit values overriding defaults, repeated assignments, escaped strings, typed range/scope errors, duplicate definitions/defaults, unknown attributes and missing targets. They check source diagnostics and the throwing API, distinct standard/extended targets, frame cycle times and enum labels, unsupported formats and ID conflicts, unchanged J1939 opt-in, and runtime/tree propagation. Existing unsupported-statement checks now use relation forms, which remain unsupported, instead of supported attribute forms.
Attribute changes were verified with qmake6 ../dbc.pro, make -j4, and make check in build/: all six QtTest suites and the qmake tree target passed. The standalone C++17 tree test also passed. The existing named comma-decimal C locale test skipped because the locale is not installed.
attributeNumbers checks signed 64-bit limits, leading plus signs, decimal HEX values, FLOAT fractions/exponents, and default overrides under a comma-decimal C++ locale. Node/environment defaults remain on definitions without becoming database attributes. invalidAttributeNumbers supplies 39 data rows, each checked in both definition bounds, a default, and an explicit assignment. The throwing and diagnostic APIs must reject malformed signs, trailing text, hexadecimal notation, non-finite values, overflow, and underflow with the correct error line. Additional malformed-attribute cases cover token separators, scope/type names, reversed FLOAT bounds, value types/ranges, and invalid CAN references.
Run AddressSanitizer and UndefinedBehaviorSanitizer in a separate directory:
diff --git a/docs/html/multiplex__graph_8h_source.html b/docs/html/multiplex__graph_8h_source.html new file mode 100644 index 0000000..b1179d8 --- /dev/null +++ b/docs/html/multiplex__graph_8h_source.html @@ -0,0 +1,221 @@ + + + + + + + +|
+ DBC Framework
+
+ DBC parsing and CAN signal decoding framework
+ |
+
Definition at line 60 of file attributes.h.
-Referenced by DbcParseContext::ResolveAttributes().
+Referenced by DbcParseContext::ResolveAttributes().
@@ -157,7 +157,7 @@ Public AttributesDefinition at line 61 of file attributes.h.
-Referenced by DbcParseContext::ResolveAttributes().
+Referenced by DbcParseContext::ResolveAttributes().
@@ -176,7 +176,7 @@ Public AttributesDefinition at line 62 of file attributes.h.
-Referenced by DbcParseContext::ResolveAttributes().
+Referenced by DbcParseContext::ResolveAttributes().
@@ -195,7 +195,7 @@ Public AttributesDefinition at line 63 of file attributes.h.
-Referenced by DbcParseContext::ResolveAttributes().
+Referenced by DbcParseContext::ResolveAttributes().
@@ -214,7 +214,7 @@ Public AttributesDefinition at line 64 of file attributes.h.
-Referenced by DbcParseContext::ResolveAttributes().
+Referenced by DbcParseContext::ResolveAttributes().
@@ -233,7 +233,7 @@ Public AttributesDefinition at line 65 of file attributes.h.
-Referenced by DbcParseContext::ResolveAttributes().
+Referenced by DbcParseContext::ResolveAttributes().
diff --git a/docs/html/structAttributeDefinition.html b/docs/html/structAttributeDefinition.html index 13b6d44..6572a4a 100644 --- a/docs/html/structAttributeDefinition.html +++ b/docs/html/structAttributeDefinition.html @@ -141,7 +141,7 @@ Public AttributesDefinition at line 43 of file attributes.h.
-Referenced by DbcParseContext::ResolveAttributes().
+Referenced by DbcParseContext::ResolveAttributes().
@@ -262,7 +262,7 @@ Public AttributesDefinition at line 50 of file attributes.h.
-Referenced by DbcParseContext::ResolveAttributes().
+Referenced by DbcParseContext::ResolveAttributes().
diff --git a/docs/html/structDbcDatabase.html b/docs/html/structDbcDatabase.html index 7902c73..13310b9 100644 --- a/docs/html/structDbcDatabase.html +++ b/docs/html/structDbcDatabase.html @@ -133,7 +133,7 @@ Public AttributesDefinition at line 23 of file dbc_database.h.
-Referenced by DbcTreeBuilder::Build(), DbcDecodeBuilder::Build(), DbcFrameHandler::Handle(), DbcParseContext::ResolveAttributes(), and DbcParseContext::ValidateMultiplexing().
+Referenced by DbcTreeBuilder::Build(), DbcDecodeBuilder::Build(), DbcFrameHandler::Handle(), DbcParseContext::ResolveAttributes(), and DbcParseContext::ValidateMultiplexing().
@@ -152,7 +152,7 @@ Public AttributesDefinition at line 24 of file dbc_database.h.
-Referenced by DbcParseContext::ResolveAttributes().
+Referenced by DbcParseContext::ResolveAttributes().
@@ -171,7 +171,7 @@ Public AttributesDefinition at line 25 of file dbc_database.h.
-Referenced by DbcParseContext::ResolveAttributes().
+Referenced by DbcParseContext::ResolveAttributes().
diff --git a/docs/html/structDbcParseContext-members.html b/docs/html/structDbcParseContext-members.html index 98fdcad..61bfdf7 100644 --- a/docs/html/structDbcParseContext-members.html +++ b/docs/html/structDbcParseContext-members.html @@ -102,9 +102,11 @@ $(document).ready(function(){initNavTree('structDbcParseContext.html',''); initRPublic Member Functions | |||||
| void | ResolveMultiplexing (const std::string &filePath) | ||||
| void | ValidateMultiplexing (const std::string &filePath) const | ||||
| Validate selectors, branch ranges, and signal overlap. | |||||
| std::vector< PendingValueDescriptions > | pendingValues = {} | ||||
| std::vector< PendingMultiplexing > | pendingMultiplexing = {} | ||||
| std::vector< std::vector< std::size_t > > | signalLines = {} | ||||
| std::vector< PendingComment > | pendingComments = {} | ||||
| void DbcParseContext::ResolveMultiplexing | +( | +const std::string & | +filePath | ) | ++ |
Definition at line 486 of file dbc_statement_handler.cpp.
+ +Validate selectors, branch ranges, and signal overlap.
-Definition at line 512 of file dbc_statement_handler.cpp.
+Definition at line 536 of file dbc_statement_handler.cpp.
-References database, DbcDatabase::frames, and signalLines.
+References database, DbcDatabase::frames, SignalInfo::isSigned, SignalInfo::multiplexing, and signalLines.
@@ -181,9 +205,9 @@ Public AttributesResolve deferred comments after all definitions are known.
-Definition at line 352 of file dbc_statement_handler.cpp.
+Definition at line 354 of file dbc_statement_handler.cpp.
-References FrameInfo::comment, SignalInfo::comment, database, and pendingComments.
+References FrameInfo::comment, SignalInfo::comment, database, and pendingComments.
@@ -215,9 +239,9 @@ Public AttributesResolve definitions, defaults, then assignments; append format warnings.
-Definition at line 255 of file dbc_attributes.cpp.
+Definition at line 259 of file dbc_attributes.cpp.
-References DbcDatabase::attributeAssignments, DbcDatabase::attributeDefinitions, AttributeAssignment::canId, database, AttributeDefinition::defaultValue, DbcDatabase::frames, AttributeAssignment::isExtended, AttributeAssignment::name, pendingAttributes, AttributeDefinition::scope, AttributeAssignment::scope, AttributeAssignment::targetName, and AttributeAssignment::value.
+References DbcDatabase::attributeAssignments, DbcDatabase::attributeDefinitions, AttributeAssignment::canId, database, AttributeDefinition::defaultValue, DbcDatabase::frames, AttributeAssignment::isExtended, AttributeAssignment::name, pendingAttributes, AttributeDefinition::scope, AttributeAssignment::scope, AttributeAssignment::targetName, and AttributeAssignment::value.
@@ -239,9 +263,9 @@ Public AttributesResolve deferred raw descriptions against unique targets.
-Definition at line 435 of file dbc_statement_handler.cpp.
+Definition at line 437 of file dbc_statement_handler.cpp.
-References database, pendingValues, and SignalInfo::valueDescriptions.
+References database, pendingValues, and SignalInfo::valueDescriptions.
@@ -259,9 +283,9 @@ Public AttributesParsed metadata under construction.
-Definition at line 51 of file dbc_statement_handler.h.
+Definition at line 61 of file dbc_statement_handler.h.
-Referenced by DbcFrameHandler::Handle(), ResolveAttributes(), ResolveComments(), ResolveValueDescriptions(), and ValidateMultiplexing().
+Referenced by DbcFrameHandler::Handle(), ResolveAttributes(), ResolveComments(), ResolveValueDescriptions(), and ValidateMultiplexing().
Current frame for following signal definitions.
-Definition at line 52 of file dbc_statement_handler.h.
+Definition at line 62 of file dbc_statement_handler.h.
-Referenced by DbcFrameHandler::Handle(), and DbcSignalHandler::Handle().
+Referenced by DbcFrameHandler::Handle(), and DbcSignalHandler::Handle().
Explicit interpretation option for extended frames.
-Definition at line 53 of file dbc_statement_handler.h.
+Definition at line 63 of file dbc_statement_handler.h.
-Referenced by DbcFrameHandler::Handle().
+Referenced by DbcFrameHandler::Handle().
Physical line of the current statement.
-Definition at line 54 of file dbc_statement_handler.h.
+Definition at line 64 of file dbc_statement_handler.h.
-Referenced by DbcSignalHandler::Handle(), DbcCommentHandler::Handle(), DbcAttributeHandler::Handle(), and DbcValueDescriptionHandler::Handle().
+Referenced by DbcSignalHandler::Handle(), DbcCommentHandler::Handle(), DbcAttributeHandler::Handle(), DbcValueDescriptionHandler::Handle(), and DbcMultiplexingHandler::Handle().
Unresolved raw value descriptions.
-Definition at line 55 of file dbc_statement_handler.h.
+Definition at line 65 of file dbc_statement_handler.h.
-Referenced by DbcValueDescriptionHandler::Handle(), and ResolveValueDescriptions().
+Referenced by DbcValueDescriptionHandler::Handle(), and ResolveValueDescriptions().
+ +| std::vector<PendingMultiplexing> DbcParseContext::pendingMultiplexing = {} | +
Definition at line 67 of file dbc_statement_handler.h.
Signal definition lines grouped by frame.
-Definition at line 57 of file dbc_statement_handler.h.
+Definition at line 70 of file dbc_statement_handler.h.
-Referenced by DbcFrameHandler::Handle(), DbcSignalHandler::Handle(), and ValidateMultiplexing().
+Referenced by DbcFrameHandler::Handle(), DbcSignalHandler::Handle(), and ValidateMultiplexing().
Unresolved comments in source order.
-Definition at line 61 of file dbc_statement_handler.h.
+Definition at line 74 of file dbc_statement_handler.h.
-Referenced by DbcCommentHandler::Handle(), and ResolveComments().
+Referenced by DbcCommentHandler::Handle(), and ResolveComments().
Unresolved attributes in source order.
-Definition at line 65 of file dbc_statement_handler.h.
+Definition at line 78 of file dbc_statement_handler.h.
-Referenced by DbcAttributeHandler::Handle(), and ResolveAttributes().
+Referenced by DbcAttributeHandler::Handle(), and ResolveAttributes().
Definition at line 39 of file dbc_diagnostic.h.
-Referenced by DbcParser::ParseFile(), and DbcParser::ParseFileWithDiagnostics().
+Referenced by DbcParser::ParseFile(), and DbcParser::ParseFileWithDiagnostics().
@@ -187,7 +187,7 @@ Public AttributesDefinition at line 40 of file dbc_diagnostic.h.
-Referenced by HasErrors(), DbcParser::ParseFile(), and DbcParser::ParseFileWithDiagnostics().
+Referenced by HasErrors(), DbcParser::ParseFile(), and DbcParser::ParseFileWithDiagnostics().
diff --git a/docs/html/structDbcParserOptions.html b/docs/html/structDbcParserOptions.html index e400804..067b0a4 100644 --- a/docs/html/structDbcParserOptions.html +++ b/docs/html/structDbcParserOptions.html @@ -124,7 +124,7 @@ Public AttributesDefinition at line 21 of file dbc_parser.h.
-Referenced by DbcParser::ParseFileWithDiagnostics().
+Referenced by DbcParser::ParseFileWithDiagnostics().
diff --git a/docs/html/structDecodeFrame.html b/docs/html/structDecodeFrame.html index 6b4b1ac..368ef4a 100644 --- a/docs/html/structDecodeFrame.html +++ b/docs/html/structDecodeFrame.html @@ -139,7 +139,7 @@ Public AttributesRuntime-ready frame definition.
-Definition at line 68 of file decode_database.h.
+Definition at line 69 of file decode_database.h.
Return the stable normalized frame identifier.
-Definition at line 86 of file decode_database.h.
+Definition at line 87 of file decode_database.h.
-References canId, and isExtended.
+References canId, and isExtended.
@@ -186,7 +186,7 @@ Public AttributesFrame name.
-Definition at line 69 of file decode_database.h.
+Definition at line 70 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -205,9 +205,9 @@ Public AttributesNormalized CAN ID.
-Definition at line 70 of file decode_database.h.
+Definition at line 71 of file decode_database.h.
-Referenced by DbcDecodeBuilder::Build(), and GetKey().
+Referenced by DbcDecodeBuilder::Build(), and GetKey().
true for extended frame.
-Definition at line 71 of file decode_database.h.
+Definition at line 72 of file decode_database.h.
-Referenced by DbcDecodeBuilder::Build(), and GetKey().
+Referenced by DbcDecodeBuilder::Build(), and GetKey().
Payload length.
-Definition at line 72 of file decode_database.h.
+Definition at line 73 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -262,7 +262,7 @@ Public AttributesPGN if available.
-Definition at line 73 of file decode_database.h.
+Definition at line 74 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -281,7 +281,7 @@ Public AttributesExplicit J1939 opt-in; pgn must match canId.
-Definition at line 74 of file decode_database.h.
+Definition at line 75 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -300,7 +300,7 @@ Public AttributesTransmitter ECU.
-Definition at line 75 of file decode_database.h.
+Definition at line 76 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -319,7 +319,7 @@ Public AttributesFrame comment.
-Definition at line 76 of file decode_database.h.
+Definition at line 77 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -338,7 +338,7 @@ Public AttributesSignal definitions.
-Definition at line 77 of file decode_database.h.
+Definition at line 78 of file decode_database.h.
Effective attributes after defaults and overrides.
-Definition at line 79 of file decode_database.h.
+Definition at line 80 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -374,7 +374,7 @@ Public AttributesVFrameFormat label, when declared.
-Definition at line 80 of file decode_database.h.
+Definition at line 81 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -393,7 +393,7 @@ Public AttributesGenMsgCycleTime in milliseconds, when declared.
-Definition at line 81 of file decode_database.h.
+Definition at line 82 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
diff --git a/docs/html/structDecodeSignal.html b/docs/html/structDecodeSignal.html index e72e8c0..8c5f651 100644 --- a/docs/html/structDecodeSignal.html +++ b/docs/html/structDecodeSignal.html @@ -138,7 +138,7 @@ Public AttributesRuntime-ready signal definition.
-Definition at line 44 of file decode_database.h.
+Definition at line 45 of file decode_database.h.
Selector role and branch value.
+Selector role, parent, and raw branch ranges.
-Definition at line 45 of file decode_database.h.
+Definition at line 46 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -172,9 +172,9 @@ Public AttributesSignal name.
-Definition at line 46 of file decode_database.h.
+Definition at line 47 of file decode_database.h.
-Referenced by DbcDecodeBuilder::Build(), and DecodeDatabase::FindSignal().
+Referenced by DbcDecodeBuilder::Build(), and DecodeDatabase::FindSignal().
DBC start bit.
-Definition at line 47 of file decode_database.h.
+Definition at line 48 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -210,7 +210,7 @@ Public AttributesSignal length in bits.
-Definition at line 48 of file decode_database.h.
+Definition at line 49 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -229,7 +229,7 @@ Public AttributesIntel or Motorola.
-Definition at line 49 of file decode_database.h.
+Definition at line 50 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -248,7 +248,7 @@ Public AttributesSigned or unsigned.
-Definition at line 50 of file decode_database.h.
+Definition at line 51 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -267,7 +267,7 @@ Public AttributesScaling factor.
-Definition at line 51 of file decode_database.h.
+Definition at line 52 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -286,7 +286,7 @@ Public AttributesPhysical offset.
-Definition at line 52 of file decode_database.h.
+Definition at line 53 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -305,7 +305,7 @@ Public AttributesMinimum physical value.
-Definition at line 53 of file decode_database.h.
+Definition at line 54 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -324,7 +324,7 @@ Public AttributesMaximum physical value.
-Definition at line 54 of file decode_database.h.
+Definition at line 55 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -343,7 +343,7 @@ Public AttributesPhysical unit.
-Definition at line 55 of file decode_database.h.
+Definition at line 56 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -362,7 +362,7 @@ Public AttributesReceivers.
-Definition at line 56 of file decode_database.h.
+Definition at line 57 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -381,7 +381,7 @@ Public AttributesRaw integer state descriptions.
-Definition at line 57 of file decode_database.h.
+Definition at line 58 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -400,7 +400,7 @@ Public AttributesComment.
-Definition at line 58 of file decode_database.h.
+Definition at line 59 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
@@ -419,7 +419,7 @@ Public AttributesEffective attributes after defaults and overrides.
-Definition at line 60 of file decode_database.h.
+Definition at line 61 of file decode_database.h.
Referenced by DbcDecodeBuilder::Build().
diff --git a/docs/html/structDecodedFrameValue.html b/docs/html/structDecodedFrameValue.html index 0961705..03e2a68 100644 --- a/docs/html/structDecodedFrameValue.html +++ b/docs/html/structDecodedFrameValue.html @@ -118,7 +118,7 @@ Public AttributesFully decoded frame.
-Definition at line 73 of file dbc_decoder.h.
+Definition at line 74 of file dbc_decoder.h.
Owning immutable definition.
-Definition at line 74 of file dbc_decoder.h.
+Definition at line 75 of file dbc_decoder.h.
Matched definition key; received key if unmatched.
-Definition at line 75 of file dbc_decoder.h.
+Definition at line 76 of file dbc_decoder.h.
Decoded signal values.
-Definition at line 76 of file dbc_decoder.h.
+Definition at line 77 of file dbc_decoder.h.
true if frame was matched.
-Definition at line 77 of file dbc_decoder.h.
+Definition at line 78 of file dbc_decoder.h.
Inspect signals for individual failures.
-Definition at line 78 of file dbc_decoder.h.
+Definition at line 79 of file dbc_decoder.h.
One decoded signal value.
-Definition at line 54 of file dbc_decoder.h.
+Definition at line 55 of file dbc_decoder.h.
Lookup using the raw integer; nullptr for invalid or unmapped values.
-Definition at line 63 of file dbc_decoder.h.
+Definition at line 64 of file dbc_decoder.h.
-References definition, rawValue, and valid.
+References definition, rawValue, and valid.
Owning immutable definition.
-Definition at line 55 of file dbc_decoder.h.
+Definition at line 56 of file dbc_decoder.h.
-Referenced by GetValueDescription().
+Referenced by GetValueDescription().
Stable application identifier.
-Definition at line 56 of file dbc_decoder.h.
+Definition at line 57 of file dbc_decoder.h.
Exact raw value for Valid or PhysicalConversionFailed.
-Definition at line 57 of file dbc_decoder.h.
+Definition at line 58 of file dbc_decoder.h.
-Referenced by GetValueDescription().
+Referenced by GetValueDescription().
Conversion result, possibly NaN/Inf on failure.
-Definition at line 58 of file dbc_decoder.h.
+Definition at line 59 of file dbc_decoder.h.
true if decoding succeeded.
-Definition at line 59 of file dbc_decoder.h.
+Definition at line 60 of file dbc_decoder.h.
-Referenced by GetValueDescription().
+Referenced by GetValueDescription().
Detailed signal outcome.
-Definition at line 60 of file dbc_decoder.h.
+Definition at line 61 of file dbc_decoder.h.
Definition at line 26 of file frame_info.h.
-Referenced by DbcSignalHandler::Handle().
+Referenced by DbcSignalHandler::Handle().
@@ -168,7 +168,7 @@ Public AttributesDefinition at line 27 of file frame_info.h.
-Referenced by DbcTreeModel::data(), and DbcFrameHandler::Handle().
+Referenced by DbcTreeModel::data(), and DbcFrameHandler::Handle().
@@ -187,7 +187,7 @@ Public AttributesDefinition at line 28 of file frame_info.h.
-Referenced by DbcTreeModel::data(), and DbcFrameHandler::Handle().
+Referenced by DbcTreeModel::data(), and DbcFrameHandler::Handle().
@@ -206,7 +206,7 @@ Public AttributesDefinition at line 29 of file frame_info.h.
-Referenced by DbcFrameHandler::Handle().
+Referenced by DbcFrameHandler::Handle().
@@ -225,7 +225,7 @@ Public AttributesDefinition at line 30 of file frame_info.h.
-Referenced by DbcFrameHandler::Handle().
+Referenced by DbcFrameHandler::Handle().
@@ -244,7 +244,7 @@ Public AttributesDefinition at line 31 of file frame_info.h.
-Referenced by DbcTreeModel::data(), and DbcSignalHandler::Handle().
+Referenced by DbcTreeModel::data(), and DbcSignalHandler::Handle().
@@ -280,7 +280,7 @@ Public AttributesDefinition at line 33 of file frame_info.h.
-Referenced by DbcTreeModel::data(), and DbcParseContext::ResolveComments().
+Referenced by DbcTreeModel::data(), and DbcParseContext::ResolveComments().
diff --git a/docs/html/structMultiplexRange-members.html b/docs/html/structMultiplexRange-members.html new file mode 100644 index 0000000..ac801bf --- /dev/null +++ b/docs/html/structMultiplexRange-members.html @@ -0,0 +1,110 @@ + + + + + + + +|
+ DBC Framework
+
+ DBC parsing and CAN signal decoding framework
+ |
+
This is the complete list of members for MultiplexRange, including all inherited members.
+| maximum (defined in MultiplexRange) | MultiplexRange | |
| minimum (defined in MultiplexRange) | MultiplexRange |
|
+ DBC Framework
+
+ DBC parsing and CAN signal decoding framework
+ |
+
Inclusive raw selector range, without expanding individual values. + More...
+ +#include <multiplexing.h>
+Public Attributes | |
| std::uint64_t | minimum = 0U |
| std::uint64_t | maximum = 0U |
Inclusive raw selector range, without expanding individual values.
+ +Definition at line 18 of file multiplexing.h.
+| std::uint64_t MultiplexRange::minimum = 0U | +
Definition at line 19 of file multiplexing.h.
+ +| std::uint64_t MultiplexRange::maximum = 0U | +
Definition at line 20 of file multiplexing.h.
+ +This is the complete list of members for Multiplexing, including all inherited members.
| role | Multiplexing | |
| ranges | Multiplexing | |
| role (defined in Multiplexing) | Multiplexing | |
| selector | Multiplexing | |
| value | Multiplexing |
Basic markers and optional explicit extended multiplexing condition. + More...
+#include <multiplexing.h>
@@ -105,11 +108,15 @@ Public Attributes | |
| std::uint64_t | value = 0U |
| std::string | selector |
| std::vector< MultiplexRange > | ranges |
Basic multiplexing: one unsigned selector per frame, one raw value per branch.
+Basic markers and optional explicit extended multiplexing condition.
-Definition at line 15 of file multiplexing.h.
+Definition at line 24 of file multiplexing.h.
Signal participation in multiplexing.
-Definition at line 16 of file multiplexing.h.
+Definition at line 25 of file multiplexing.h.
Required raw selector value; used only by branches.
+mN fallback when no explicit ranges are supplied.
-Definition at line 17 of file multiplexing.h.
+Definition at line 26 of file multiplexing.h.
+ +| std::string Multiplexing::selector | +
Parent selector name within the same frame.
+ +Definition at line 27 of file multiplexing.h.
+ +| std::vector<MultiplexRange> Multiplexing::ranges | +
Alternatives for the named selector; override mN.
+ +Definition at line 28 of file multiplexing.h.
Definition at line 23 of file dbc_statement_handler.h.
-Referenced by DbcCommentHandler::Handle().
+Referenced by DbcCommentHandler::Handle().
@@ -156,7 +156,7 @@ Public AttributesDefinition at line 24 of file dbc_statement_handler.h.
-Referenced by DbcCommentHandler::Handle().
+Referenced by DbcCommentHandler::Handle().
@@ -175,7 +175,7 @@ Public AttributesDefinition at line 25 of file dbc_statement_handler.h.
-Referenced by DbcCommentHandler::Handle().
+Referenced by DbcCommentHandler::Handle().
@@ -194,7 +194,7 @@ Public AttributesDefinition at line 26 of file dbc_statement_handler.h.
-Referenced by DbcCommentHandler::Handle().
+Referenced by DbcCommentHandler::Handle().
@@ -213,7 +213,7 @@ Public AttributesDefinition at line 27 of file dbc_statement_handler.h.
-Referenced by DbcCommentHandler::Handle().
+Referenced by DbcCommentHandler::Handle().
@@ -232,7 +232,7 @@ Public AttributesDefinition at line 28 of file dbc_statement_handler.h.
-Referenced by DbcCommentHandler::Handle().
+Referenced by DbcCommentHandler::Handle().
diff --git a/docs/html/structPendingMultiplexing-members.html b/docs/html/structPendingMultiplexing-members.html new file mode 100644 index 0000000..d0a9a32 --- /dev/null +++ b/docs/html/structPendingMultiplexing-members.html @@ -0,0 +1,114 @@ + + + + + + + +|
+ DBC Framework
+
+ DBC parsing and CAN signal decoding framework
+ |
+
This is the complete list of members for PendingMultiplexing, including all inherited members.
+| canId (defined in PendingMultiplexing) | PendingMultiplexing | |
| isExtended (defined in PendingMultiplexing) | PendingMultiplexing | |
| lineNumber (defined in PendingMultiplexing) | PendingMultiplexing | |
| ranges (defined in PendingMultiplexing) | PendingMultiplexing | |
| selectorName (defined in PendingMultiplexing) | PendingMultiplexing | |
| signalName (defined in PendingMultiplexing) | PendingMultiplexing |
|
+ DBC Framework
+
+ DBC parsing and CAN signal decoding framework
+ |
+
Deferred extended multiplexing condition and source location. + More...
+ +#include <dbc_statement_handler.h>
+Public Attributes | |
| std::uint32_t | canId |
| bool | isExtended |
| std::string | signalName |
| std::string | selectorName |
| std::vector< MultiplexRange > | ranges |
| std::size_t | lineNumber |
Deferred extended multiplexing condition and source location.
+ +Definition at line 50 of file dbc_statement_handler.h.
+| std::uint32_t PendingMultiplexing::canId | +
Definition at line 51 of file dbc_statement_handler.h.
+ +| bool PendingMultiplexing::isExtended | +
Definition at line 52 of file dbc_statement_handler.h.
+ +| std::string PendingMultiplexing::signalName | +
Definition at line 53 of file dbc_statement_handler.h.
+ +| std::string PendingMultiplexing::selectorName | +
Definition at line 54 of file dbc_statement_handler.h.
+ +| std::vector<MultiplexRange> PendingMultiplexing::ranges | +
Definition at line 55 of file dbc_statement_handler.h.
+ +| std::size_t PendingMultiplexing::lineNumber | +
Definition at line 56 of file dbc_statement_handler.h.
+ +Definition at line 14 of file dbc_statement_handler.h.
-Referenced by DbcValueDescriptionHandler::Handle().
+Referenced by DbcValueDescriptionHandler::Handle().
@@ -154,7 +154,7 @@ Public AttributesDefinition at line 15 of file dbc_statement_handler.h.
-Referenced by DbcValueDescriptionHandler::Handle().
+Referenced by DbcValueDescriptionHandler::Handle().
@@ -173,7 +173,7 @@ Public AttributesDefinition at line 16 of file dbc_statement_handler.h.
-Referenced by DbcValueDescriptionHandler::Handle().
+Referenced by DbcValueDescriptionHandler::Handle().
@@ -192,7 +192,7 @@ Public AttributesDefinition at line 17 of file dbc_statement_handler.h.
-Referenced by DbcValueDescriptionHandler::Handle().
+Referenced by DbcValueDescriptionHandler::Handle().
@@ -211,7 +211,7 @@ Public AttributesDefinition at line 18 of file dbc_statement_handler.h.
-Referenced by DbcValueDescriptionHandler::Handle().
+Referenced by DbcValueDescriptionHandler::Handle().
diff --git a/docs/html/structPgnLookupResult.html b/docs/html/structPgnLookupResult.html index bc592a7..a04cdd5 100644 --- a/docs/html/structPgnLookupResult.html +++ b/docs/html/structPgnLookupResult.html @@ -109,7 +109,7 @@ Public AttributesA PGN lookup rejects multiple definitions rather than choosing by order.
-Definition at line 92 of file decode_database.h.
+Definition at line 93 of file decode_database.h.
Owning matched definition; empty if missing or ambiguous.
-Definition at line 93 of file decode_database.h.
+Definition at line 94 of file decode_database.h.
-Referenced by DbcDecoder::FindFrame(), and DecodeDatabase::FindFrameByPgn().
+Referenced by DbcDecoder::FindFrame(), and DecodeDatabase::FindFrameByPgn().
True when multiple definitions share the requested PGN.
-Definition at line 94 of file decode_database.h.
+Definition at line 95 of file decode_database.h.
-Referenced by DecodeDatabase::FindFrameByPgn().
+Referenced by DecodeDatabase::FindFrameByPgn().
Raw CAN frame used for runtime or trace decoding.
-Definition at line 24 of file dbc_decoder.h.
+Definition at line 25 of file dbc_decoder.h.
Normalized CAN ID.
-Definition at line 25 of file dbc_decoder.h.
+Definition at line 26 of file dbc_decoder.h.
Referenced by main().
@@ -148,7 +148,7 @@ Public Attributestrue for extended frame.
-Definition at line 26 of file dbc_decoder.h.
+Definition at line 27 of file dbc_decoder.h.
Referenced by main().
@@ -167,7 +167,7 @@ Public AttributesPayload bytes.
-Definition at line 27 of file dbc_decoder.h.
+Definition at line 28 of file dbc_decoder.h.
Referenced by main().
diff --git a/docs/html/structSignalInfo.html b/docs/html/structSignalInfo.html index f7cacbb..54d3a20 100644 --- a/docs/html/structSignalInfo.html +++ b/docs/html/structSignalInfo.html @@ -151,10 +151,12 @@ Public AttributesSelector role and branch value.
+Selector role, parent, and raw branch ranges.
Definition at line 26 of file signal_info.h.
+Referenced by DbcParseContext::ValidateMultiplexing().
+Definition at line 27 of file signal_info.h.
-Referenced by DbcSignalHandler::Handle().
+Referenced by DbcSignalHandler::Handle().
@@ -191,7 +193,7 @@ Public AttributesDefinition at line 28 of file signal_info.h.
-Referenced by DbcTreeModel::data(), and DbcSignalHandler::Handle().
+Referenced by DbcTreeModel::data(), and DbcSignalHandler::Handle().
@@ -210,7 +212,7 @@ Public AttributesDefinition at line 29 of file signal_info.h.
-Referenced by DbcTreeModel::data(), and DbcSignalHandler::Handle().
+Referenced by DbcTreeModel::data(), and DbcSignalHandler::Handle().
@@ -229,7 +231,7 @@ Public AttributesDefinition at line 30 of file signal_info.h.
-Referenced by DbcTreeModel::data(), and DbcSignalHandler::Handle().
+Referenced by DbcTreeModel::data(), and DbcSignalHandler::Handle().
@@ -248,7 +250,7 @@ Public AttributesDefinition at line 31 of file signal_info.h.
-Referenced by DbcTreeModel::data().
+Referenced by DbcTreeModel::data(), and DbcParseContext::ValidateMultiplexing().
@@ -371,7 +373,7 @@ Public AttributesDefinition at line 38 of file signal_info.h.
-Referenced by DbcTreeModel::data(), and DbcParseContext::ResolveValueDescriptions().
+Referenced by DbcTreeModel::data(), and DbcParseContext::ResolveValueDescriptions().
@@ -390,7 +392,7 @@ Public AttributesDefinition at line 39 of file signal_info.h.
-Referenced by DbcTreeModel::data(), and DbcParseContext::ResolveComments().
+Referenced by DbcTreeModel::data(), and DbcParseContext::ResolveComments().
diff --git a/docs/html/structSignalKey.html b/docs/html/structSignalKey.html index 50864c1..c4eed23 100644 --- a/docs/html/structSignalKey.html +++ b/docs/html/structSignalKey.html @@ -210,7 +210,7 @@ Public AttributesDefinition at line 46 of file definition_key.h.
-Referenced by DecodeDatabase::FindSignal(), SignalKeyHasher::operator()(), and operator==().
+Referenced by DecodeDatabase::FindSignal(), SignalKeyHasher::operator()(), and operator==().
@@ -229,7 +229,7 @@ Public AttributesDefinition at line 47 of file definition_key.h.
-Referenced by DecodeDatabase::FindSignal(), SignalKeyHasher::operator()(), and operator==().
+Referenced by DecodeDatabase::FindSignal(), SignalKeyHasher::operator()(), and operator==().