mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Message: Create a type system so non-frame data can be represented
This change breaks existing code, hence the version bump, but it's going to be much less error prone going forward.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#ifndef __CANERRORCOUNTMESSAGE_H_
|
||||
#define __CANERRORCOUNTMESSAGE_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "icsneo/communication/message/message.h"
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
class CANErrorCountMessage : public Message {
|
||||
public:
|
||||
CANErrorCountMessage(uint8_t tec, uint8_t rec, bool busOffFlag)
|
||||
: Message(Message::Type::CANErrorCount), transmitErrorCount(tec), receiveErrorCount(rec), busOff(busOffFlag){}
|
||||
|
||||
Network network;
|
||||
uint8_t transmitErrorCount;
|
||||
uint8_t receiveErrorCount;
|
||||
bool busOff;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user