mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
The following fixups were added during the squash/merge: Fix formatting in EthPhyMessage and EthPhyRegPacket Device: Use std::make_shared when creating the EthPHYControl filter Network: Create NetID String for EthPHYControl EthPhyRegPacket: Constants in PascalCase
35 lines
867 B
C++
35 lines
867 B
C++
#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 <queue>
|
|
#include <vector>
|
|
#include <memory>
|
|
|
|
namespace icsneo {
|
|
|
|
class Encoder {
|
|
public:
|
|
Encoder(device_eventhandler_t report) : report(report) {}
|
|
bool encode(const Packetizer& packetizer, std::vector<uint8_t>& result, const std::shared_ptr<Message>& message);
|
|
bool encode(const Packetizer& packetizer, std::vector<uint8_t>& result, Command cmd, std::vector<uint8_t> arguments = {});
|
|
|
|
bool supportCANFD = false;
|
|
bool supportEthPhy = false;
|
|
|
|
private:
|
|
device_eventhandler_t report;
|
|
};
|
|
|
|
}
|
|
|
|
#endif // __cplusplus
|
|
|
|
#endif |