Communication: Add missing CAN error types

This commit is contained in:
Jonathan Schwartz
2025-02-04 15:15:44 +00:00
committed by Kyle Schwarz
parent a22791c9e0
commit c5ba2d8d32
17 changed files with 126 additions and 69 deletions
@@ -267,7 +267,7 @@ void printMessage(const std::shared_ptr<icsneo::Message>& message) {
} // end of icsneo::Message::Type::Frame
case icsneo::Message::Type::CANErrorCount: {
// A message of type CANErrorCount is guaranteed to be a CANErrorCount, so we can static cast safely
auto cec = std::static_pointer_cast<icsneo::CANErrorCountMessage>(message);
auto cec = std::static_pointer_cast<icsneo::CANErrorMessage>(message);
std::cout << "\t\t" << cec->network << " error counts changed, REC=" << cec->receiveErrorCount
<< " TEC=" << cec->transmitErrorCount << " (" << (cec->busOff ? "" : "Not ") << "Bus Off)" << std::endl;
break;
+1 -1
View File
@@ -252,7 +252,7 @@ int main() {
} // end of icsneo::Message::Type::Frame
case icsneo::Message::Type::CANErrorCount: {
// A message of type CANErrorCount is guaranteed to be a CANErrorCount, so we can static cast safely
auto cec = std::static_pointer_cast<icsneo::CANErrorCountMessage>(message);
auto cec = std::static_pointer_cast<icsneo::CANErrorMessage>(message);
// Print the error counts
std::cout << "\t\t" << cec->network << " error counts changed, REC=" << std::to_string(cec->receiveErrorCount)