Add dlcOnWire to CAN

This commit is contained in:
Paul Hollinsky
2018-10-22 11:13:07 -04:00
parent 0f703f494f
commit 12451def11
4 changed files with 9 additions and 1 deletions
@@ -8,6 +8,7 @@ namespace icsneo {
class CANMessage : public Message {
public:
uint32_t arbid;
uint8_t dlcOnWire;
bool isRemote = false;
bool isExtended = false;
bool isCANFD = false;
+2 -1
View File
@@ -112,7 +112,8 @@ typedef struct {
uint32_t arbid;
uint16_t netid;
uint8_t type;
char reserved[9];
uint8_t dlcOnWire;
char reserved[8];
} neomessage_can_t;
#pragma pack(pop)
+1
View File
@@ -19,6 +19,7 @@ neomessage_t icsneo::CreateNeoMessage(const std::shared_ptr<Message> message) {
neomessage_can_t& can = *(neomessage_can_t*)&neomsg;
auto canmsg = std::static_pointer_cast<CANMessage>(message);
can.arbid = canmsg->arbid;
can.dlcOnWire = canmsg->dlcOnWire;
can.status.extendedFrame = canmsg->isExtended;
can.status.remoteFrame = canmsg->isRemote;
can.status.canfdRTR = canmsg->isRemote;