|
DBC Framework
DBC parsing and CAN signal decoding framework
|
#include <dbc_statement_handler.h>
Public Member Functions | |
| void | ValidateMultiplexing (const std::string &filePath) const |
| Validate selectors, branch ranges, and signal overlap. | |
| void | ResolveComments (const std::string &filePath) |
| Resolve deferred comments after all definitions are known. | |
| void | ResolveAttributes (const std::string &filePath, std::vector< DbcDiagnostic > &diagnostics) |
| Resolve definitions, defaults, then assignments; append format warnings. | |
| void | ResolveValueDescriptions (const std::string &filePath) |
| Resolve deferred raw descriptions against unique targets. | |
Public Attributes | |
| DbcDatabase & | database |
| FrameInfo * | currentFrame = nullptr |
| bool | enableJ1939 = false |
| std::size_t | lineNumber = 0U |
| std::vector< PendingValueDescriptions > | pendingValues = {} |
| std::vector< std::vector< std::size_t > > | signalLines = {} |
| std::vector< PendingComment > | pendingComments = {} |
| std::vector< PendingAttribute > | pendingAttributes = {} |
Mutable state belonging to one file parse. Handlers do not retain it.
Definition at line 50 of file dbc_statement_handler.h.
| void DbcParseContext::ValidateMultiplexing | ( | const std::string & | filePath | ) | const |
Validate selectors, branch ranges, and signal overlap.
Definition at line 512 of file dbc_statement_handler.cpp.
References database, DbcDatabase::frames, and signalLines.
| void DbcParseContext::ResolveComments | ( | const std::string & | filePath | ) |
Resolve deferred comments after all definitions are known.
Definition at line 352 of file dbc_statement_handler.cpp.
References FrameInfo::comment, SignalInfo::comment, database, and pendingComments.
| void DbcParseContext::ResolveAttributes | ( | const std::string & | filePath, |
| std::vector< DbcDiagnostic > & | diagnostics | ||
| ) |
Resolve definitions, defaults, then assignments; append format warnings.
Definition at line 255 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.
| void DbcParseContext::ResolveValueDescriptions | ( | const std::string & | filePath | ) |
Resolve deferred raw descriptions against unique targets.
Definition at line 435 of file dbc_statement_handler.cpp.
References database, pendingValues, and SignalInfo::valueDescriptions.
| DbcDatabase& DbcParseContext::database |
Parsed metadata under construction.
Definition at line 51 of file dbc_statement_handler.h.
Referenced by DbcFrameHandler::Handle(), ResolveAttributes(), ResolveComments(), ResolveValueDescriptions(), and ValidateMultiplexing().
| FrameInfo* DbcParseContext::currentFrame = nullptr |
Current frame for following signal definitions.
Definition at line 52 of file dbc_statement_handler.h.
Referenced by DbcFrameHandler::Handle(), and DbcSignalHandler::Handle().
| bool DbcParseContext::enableJ1939 = false |
Explicit interpretation option for extended frames.
Definition at line 53 of file dbc_statement_handler.h.
Referenced by DbcFrameHandler::Handle().
| std::size_t DbcParseContext::lineNumber = 0U |
Physical line of the current statement.
Definition at line 54 of file dbc_statement_handler.h.
Referenced by DbcSignalHandler::Handle(), DbcCommentHandler::Handle(), DbcAttributeHandler::Handle(), and DbcValueDescriptionHandler::Handle().
| std::vector<PendingValueDescriptions> DbcParseContext::pendingValues = {} |
Unresolved raw value descriptions.
Definition at line 55 of file dbc_statement_handler.h.
Referenced by DbcValueDescriptionHandler::Handle(), and ResolveValueDescriptions().
| std::vector<std::vector<std::size_t> > DbcParseContext::signalLines = {} |
Signal definition lines grouped by frame.
Definition at line 57 of file dbc_statement_handler.h.
Referenced by DbcFrameHandler::Handle(), DbcSignalHandler::Handle(), and ValidateMultiplexing().
| std::vector<PendingComment> DbcParseContext::pendingComments = {} |
Unresolved comments in source order.
Definition at line 61 of file dbc_statement_handler.h.
Referenced by DbcCommentHandler::Handle(), and ResolveComments().
| std::vector<PendingAttribute> DbcParseContext::pendingAttributes = {} |
Unresolved attributes in source order.
Definition at line 65 of file dbc_statement_handler.h.
Referenced by DbcAttributeHandler::Handle(), and ResolveAttributes().