DBC Framework
DBC parsing and CAN signal decoding framework
Loading...
Searching...
No Matches
DbcParseContext Struct Reference

#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 = {}
 

Detailed Description

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

Definition at line 50 of file dbc_statement_handler.h.

Member Function Documentation

◆ ValidateMultiplexing()

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.

◆ ResolveComments()

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.

◆ ResolveAttributes()

void DbcParseContext::ResolveAttributes ( const std::string &  filePath,
std::vector< DbcDiagnostic > &  diagnostics 
)

◆ ResolveValueDescriptions()

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.

Member Data Documentation

◆ database

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().

◆ currentFrame

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().

◆ enableJ1939

bool DbcParseContext::enableJ1939 = false

Explicit interpretation option for extended frames.

Definition at line 53 of file dbc_statement_handler.h.

Referenced by DbcFrameHandler::Handle().

◆ lineNumber

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().

◆ pendingValues

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().

◆ signalLines

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().

◆ pendingComments

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().

◆ pendingAttributes

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().


The documentation for this struct was generated from the following files: