DbcLib 1.0
CAN DBC C++ library.
Loading...
Searching...
No Matches
signalgroup.h
Go to the documentation of this file.
1/*
2 * Copyright 2022 Ingemar Hedvall
3 * SPDX-License-Identifier: MIT
4 */
8#pragma once
9#include <cstdint>
10#include <string>
11#include <vector>
12namespace dbc {
13
16 public:
18 void MessageId(uint64_t message_id) { message_id_ = message_id; }
20 [[nodiscard]] uint64_t MessageId() const { return message_id_; }
21
22 void Name( const std::string& name) { name_ = name; }
23 [[nodiscard]] const std::string& Name() const { return name_; }
24
25 void Repetition(size_t rep) { repetition_ = rep; }
26 [[nodiscard]] size_t Repetition() const {return repetition_;}
27
29 void Signals(const std::vector<std::string>& signals );
31 [[nodiscard]] const std::vector<std::string>& Signals() const;
32
33 private:
34 uint64_t message_id_ = 0;
35 std::string name_;
36 size_t repetition_ = 1;
37 std::vector<std::string> signal_list_;
38};
39
40} // namespace dbc
Interface against a signal group.
Definition: signalgroup.h:15
uint64_t MessageId() const
Returns the message ID.
Definition: signalgroup.h:20
void Signals(const std::vector< std::string > &signals)
Returns a list of signal names.
const std::vector< std::string > & Signals() const
Returns a list of signal names.
const std::string & Name() const
Name.
Definition: signalgroup.h:23
void Name(const std::string &name)
Sets the name.
Definition: signalgroup.h:22
void Repetition(size_t rep)
Sets the repetition.
Definition: signalgroup.h:25
void MessageId(uint64_t message_id)
Sets the message ID.
Definition: signalgroup.h:18
size_t Repetition() const
Repetition.
Definition: signalgroup.h:26
Main namespace for the DBC library.
Definition: attribute.h:13