DbcLib 1.0
CAN DBC C++ library.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dbc::DbcFile Class Reference

Main user object that is an interface against a DBC file. More...

#include <dbcfile.h>

Public Member Functions

void Filename (const std::string &filename)
 Sets the file name. Full path required.
 
const std::string & Filename () const
 Returns the file name with full path.
 
std::string Name () const
 Returns the File name without path and extension.
 
const std::string & LastError () const
 Returns the last (parser) error text.
 
NetworkGetNetwork ()
 Returns the network object.
 
const NetworkGetNetwork () const
 Returns the network object.
 
bool ParseFile ()
 Parses the DBC file. Returns true on success.
 
void BaseTime (uint64_t ns1970)
 Start time of messages.
 
uint64_t BaseTime () const
 Returns the base (start) time of first message.
 
void SetMessageSize (size_t nof_messages)
 Sets the maximum message queue size.
 
void AddMessage (size_t index, const DbcMessage &message)
 Adds q message to the message queue.
 
bool ParseMessage (const DbcMessage &message)
 Parses the message into signal values.
 
void ResetSampleCounter () const
 Resets the sample counter for all signals.
 
void ReparseMessageList ()
 Reparse the message queue.
 

Detailed Description

The DBC file is the only object the user shall create. It handle the parsing of the file. A DBC file defines nodes, messages and signals for one CAN network.

Member Function Documentation

◆ BaseTime()

void dbc::DbcFile::BaseTime ( uint64_t  ns1970)
inline

The base time is the time of the first message. If not set, the AddMessage will set it to the first DBCMessage.

Parameters
ns1970Nano-seconds since 1970.

◆ ReparseMessageList()

void dbc::DbcFile::ReparseMessageList ( )

This function is used to reparse the message queue. This function is used when the first parse message round just count number of samples while the next round, the user selects signals (SignalObserver) and reparse the message queue.


The documentation for this class was generated from the following file: