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

Interface against a DBC network configuration.

#include <network.h>

Public Member Functions

std::string Name () const
 Network name.
 
void Filename (const std::string &filename)
 Sets the file name.
 
std::string Filename () const
 Returns the file name.
 
void Protocol (ProtocolType type)
 Sets the protocol type. Should be included in the file but sometimes is missing.
 
ProtocolType Protocol () const
 Returns what type of protocol the bus is using.
 
std::string ProtocolAsString () const
 Returns the network protocol as text.
 
void Bus (BusType type)
 Sets the type of bus.
 
BusType Bus () const
 Returns the type of bus.
 
std::string BusAsString () const
 Returns the type of bus as text.
 
void Version (const std::string &version)
 Sets the DBC (file) version.
 
const std::string & Version () const
 Returns the DBC file version.
 
void Comment (const std::string &comment)
 Sets the descriptive text for the DBC file.
 
const std::string & Comment () const
 Returns the desciptive text.
 
NodeGetNode (const std::string &name)
 Returns the node by its name.
 
const NodeGetNode (const std::string &name) const
 Returns the node by its name.
 
const NodeGetNodeBySource (uint8_t source) const
 Returns the node by its source number.
 
void J1939 (bool j1939)
 Set to true if this is a J1939 bus.
 
bool J1939 () const
 Returns true if this is a J1939 bus.
 
MessageGetMessage (uint64_t message_id)
 Returns a message object by its message ID.
 
const MessageGetMessage (uint64_t message_id) const
 Returns a message object by its message ID.
 
MessageGetMessageByCanId (uint64_t can_id)
 Returns a message object by its CAN ID.
 
const MessageGetMessageByCanId (uint64_t can_id) const
 Returns a message object by its CAN ID.
 
const MessageGetMessageByName (const std::string &name) const
 Returns a message object by its name.
 
MessageGetMessageByPgn (uint32_t pgn)
 Returns a message object by its PGN.
 
MessageGetMessageByPgnAndSource (uint32_t pgn, uint8_t source)
 Returns a message object by its PGN and source number.
 
SignalGetSignal (uint64_t message_id, const std::string &signal_name)
 Returns a signal by its message ID and signal name.
 
const SignalGetSignal (uint64_t message_id, const std::string &signal_name) const
 Returns a signal by its message ID and signal name.
 
const SignalGetSignalByCanId (uint64_t can_id, const std::string &signal_name) const
 Returns a signal by its CAN ID and signal name.
 
const SignalGetSignalByName (const std::string &signal_name) const
 Returns a signal by its name.
 
const SignalGroupGetSignalGroup (uint64_t message_id, const std::string &name) const
 Returns a signal group by its message ID and group name.
 
const SignalGroupGetSignalGroupByName (const std::string &name) const
 Returns a signal group by its group name.
 
const std::map< std::string, EnvVar > & EnvVars () const
 Returns the list of environment variables.
 
const MessageListMessages () const
 Returns the list of messages.
 
const std::map< std::string, Node > & Nodes () const
 Returns the list of Nodes.
 
const std::vector< SignalGroup > & SignalGroups () const
 Returns the list of signal groups.
 
const std::map< std::string, EnumMap > & Enums () const
 Returns the list of enumerates.
 
const std::vector< Attribute > & Attributes () const
 Returns the list of attributes.
 
AttributeGetAttribute (const std::string &name)
 Returns an attribute by its name.
 
const AttributeGetAttribute (const std::string &name) const
 Returns an attribute by its name.
 
void AddValueTable (const std::string &name, const EnumMap &list)
 Adds a enumerate.
 
void AddSignalGroup (const SignalGroup &group)
 Adds a signal group.
 
EnvVarGetEnvVar (const std::string &name)
 Parser function that gets/creates an environment variable.
 
NodeCreateNode (const std::string &name)
 Parser function that creates a node.
 
AttributeCreateDefinition (const std::string &name)
 Parser function that creates a definition.
 
AttributeCreateAttribute (const Attribute &definition)
 Parser function that creates an attribute.
 
MessageCreateMessage (uint64_t message_id)
 Parser function that creates a message.
 
MessageLastMessage ()
 Returns the last message.
 

Member Function Documentation

◆ Protocol()

void dbc::Network::Protocol ( ProtocolType  type)
Parameters
typeType of protocol.

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