19 void Name(
const std::string& name) { name_ = name; }
21 [[nodiscard]]
const std::string&
Name()
const {
26 void Source(uint8_t source) {source_ = source;};
28 [[nodiscard]] uint8_t
Source()
const;
31 void Comment(
const std::string& comment) { comment_ = comment; }
33 [[nodiscard]]
const std::string&
Comment()
const {
return comment_; }
36 [[nodiscard]]
const std::vector<Attribute>&
Attributes()
const {
37 return attribute_list_;
47 std::vector<Attribute> attribute_list_;
48 uint8_t source_ = 254;
All DBC network objects may have attributes attached to them.
Support class for handling attributes of network objects.
Definition: attribute.h:49
Interface against a DBC node which normally is an ECU.
Definition: node.h:16
const std::vector< Attribute > & Attributes() const
Returns the attribute list.
Definition: node.h:36
const std::string & Comment() const
Returns the descriptive text.
Definition: node.h:33
Attribute & CreateAttribute(const Attribute &definition)
Creates an attribute. Parser function.
void Comment(const std::string &comment)
Sets the descriptive text.
Definition: node.h:31
const std::string & Name() const
Returns the name.
Definition: node.h:21
const Attribute * GetAttribute(const std::string &name) const
Returns an attribute by its name.
void Source(uint8_t source)
Source number is used in J1939 and is included in the CAN ID.
Definition: node.h:26
uint8_t Source() const
Source number (J1939).
void Name(const std::string &name)
Sets the name.
Definition: node.h:19
Main namespace for the DBC library.
Definition: attribute.h:13