• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

fliuzzi02 / nmealib / 24080499673

07 Apr 2026 12:08PM UTC coverage: 91.86% (+0.1%) from 91.728%
24080499673

push

github

web-flow
Feature/n2k headers (#98)

* [ADD] Refactor Message2000 to use a vector for CAN ID and improve normalization of raw CAN frame strings

* Enhance verbose output formatting for NMEA2000 PGN tests

- Updated expected verbose strings in test cases for PGN 127250, 129025, 129026, and 130306 to include additional fields such as Priority, Data Page, PDU Format, Destination, and Source Address.
- Improved readability of the output by aligning field labels and values.

* Refactor Message2000 to use getCanId() and getCanFrame() for improved consistency and encapsulation

* [ADD] serialization tests for PGN messages with round-trip validation

* [FIX] rename reserved field getter to clarify purpose in PGN129026

82 of 89 new or added lines in 3 files covered. (92.13%)

4 existing lines in 2 files now uncovered.

2923 of 3182 relevant lines covered (91.86%)

26.15 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

42.86
/src/message.cpp
1
#include "nmealib/message.h"
2

3
namespace nmealib {
4

5
std::string Message::typeToString(Type t) {
59✔
6
    switch (t) {
59✔
7
        case Type::Unknown: return "Unknown";
×
8
        case Type::NMEA0183: return "NMEA0183";
35✔
9
        case Type::NMEA2000: return "NMEA2000";
24✔
10
        default: return "InvalidType";
×
11
    }
12
}
13

14
Message::Message() = default;
×
15

16
Message::Message(std::string raw, Type type, TimePoint ts) noexcept
385✔
17
    : rawData_(std::move(raw)), type_(type), timestamp_(ts) {}
385✔
18

19
Message::~Message() = default;
867✔
20

21
Message::Type Message::getType() const noexcept {
35✔
22
    return type_;
35✔
23
}
24

UNCOV
25
const std::string& Message::getRawData() const noexcept {
×
UNCOV
26
    return rawData_;
×
27
}
28

29
Message::TimePoint Message::getTimestamp() const noexcept {
×
30
    return timestamp_;
×
31
}
32

33
bool Message::operator==(const Message& other) const noexcept {
21✔
34
    return type_ == other.type_ &&
21✔
35
           rawData_ == other.rawData_;
21✔
36
}
37

38
void Message::setType(Type t) noexcept {
×
39
    type_ = t;
×
40
}
×
41

42
void Message::setRaw(std::string r) noexcept {
×
43
    rawData_ = std::move(r);
×
44
}
×
45

46
void Message::setTimestamp(TimePoint ts) noexcept {
×
47
    timestamp_ = ts;
×
48
}
×
49

50
} // namespace nmealib
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc