-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsignal.hpp
More file actions
54 lines (45 loc) · 1.03 KB
/
signal.hpp
File metadata and controls
54 lines (45 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef SIGNAL_HPP
#define SIGNAL_HPP
#include <cstdint>
#include <iostream>
#include <string>
#include <vector>
namespace Libdbc {
struct Signal {
struct ValueDescription {
uint32_t value;
std::string description;
};
std::string name;
bool is_multiplexed;
uint32_t start_bit;
uint32_t size;
bool is_bigendian;
bool is_signed;
double factor;
double offset;
double min;
double max;
std::string unit;
std::vector<std::string> receivers;
std::vector<ValueDescription> value_descriptions;
Signal() = delete;
virtual ~Signal() = default;
explicit Signal(const std::string& name,
bool is_multiplexed,
uint32_t start_bit,
uint32_t size,
bool is_bigendian,
bool is_signed,
double factor,
double offset,
double min,
double max,
const std::string& unit,
const std::vector<std::string>& receivers);
virtual bool operator==(const Signal& rhs) const;
bool operator<(const Signal& rhs) const;
};
std::ostream& operator<<(std::ostream& out, const Signal& sig);
}
#endif // SIGNAL_HPP