File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ namespace libdbc {
45
45
46
46
47
47
std::ostream& operator << (std::ostream &out, const Message& msg);
48
+ std::ostream& operator << (std::ostream &out, const Signal& sig);
48
49
49
50
50
51
class Parser {
Original file line number Diff line number Diff line change @@ -35,6 +35,21 @@ namespace libdbc {
35
35
}
36
36
37
37
38
+ std::ostream& operator << (std::ostream &out, const Signal& sig) {
39
+ out << " Signal {name: " << sig.name << " , " ;
40
+ out << " Multiplexed: " << (sig.is_multiplexed ? " True" : " False" ) << " , " ;
41
+ out << " Start bit: " << sig.start_bit << " , " ;
42
+ out << " Size: " << sig.size << " , " ;
43
+ out << " Endianness: " << (sig.is_bigendian ? " Big endian" : " Little endian" ) << " , " ;
44
+ out << " Value Type: " << (sig.is_signed ? " Signed" : " Unsigned" ) << " , " ;
45
+ out << " Min: " << sig.min << " , Max: " << sig.max << " , " ;
46
+ out << " Unit: (" << sig.unit << " ), " ;
47
+ out << " receivers: " ;
48
+ for (const auto &r : sig.receivers )
49
+ out << r;
50
+ return out << " }" ;
51
+ }
52
+
38
53
39
54
DbcParser::DbcParser () : version(" " ), nodes(),
40
55
version_re (" ^(VERSION)\\ s\" (.*)\" " ), bit_timing_re(" ^(BS_:)" ),
You can’t perform that action at this time.
0 commit comments