Added error checking to functions called from Communication

This commit is contained in:
EricLiu2000
2019-06-13 16:01:35 -04:00
parent a16f2843d8
commit 519e64fb17
12 changed files with 77 additions and 28 deletions
@@ -2,6 +2,7 @@
#define __CANPACKET_H__
#include "icsneo/communication/message/canmessage.h"
#include "icsneo/api/errormanager.h"
#include <cstdint>
#include <memory>
@@ -11,7 +12,7 @@ typedef uint16_t icscm_bitfield;
struct HardwareCANPacket {
static std::shared_ptr<CANMessage> DecodeToMessage(const std::vector<uint8_t>& bytestream);
static bool EncodeFromMessage(const CANMessage& message, std::vector<uint8_t>& bytestream);
static bool EncodeFromMessage(const CANMessage& message, std::vector<uint8_t>& bytestream, const device_errorhandler_t& err);
struct {
icscm_bitfield IDE : 1;