#ifndef __ENCODER_H_ #define __ENCODER_H_ #ifdef __cplusplus #include "icsneo/communication/message/message.h" #include "icsneo/communication/message/canmessage.h" #include "icsneo/communication/packet.h" #include "icsneo/communication/command.h" #include "icsneo/communication/network.h" #include "icsneo/communication/packetizer.h" #include #include #include namespace icsneo { class Encoder { public: Encoder(device_eventhandler_t report) : report(report) {} bool encode(const Packetizer& packetizer, std::vector& result, const std::shared_ptr& message); bool encode(const Packetizer& packetizer, std::vector& result, Command cmd, std::vector arguments = {}); bool supportCANFD = false; bool supportEthPhy = false; private: device_eventhandler_t report; }; } #endif // __cplusplus #endif