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 {
4545
4646
4747 std::ostream& operator << (std::ostream &out, const Message& msg);
48+ std::ostream& operator << (std::ostream &out, const Signal& sig);
4849
4950
5051 class Parser {
Original file line number Diff line number Diff line change @@ -35,6 +35,21 @@ namespace libdbc {
3535 }
3636
3737
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+
3853
3954 DbcParser::DbcParser () : version(" " ), nodes(),
4055 version_re (" ^(VERSION)\\ s\" (.*)\" " ), bit_timing_re(" ^(BS_:)" ),
You can’t perform that action at this time.
0 commit comments