27 #include "esd_can/include/ntcan.h" 28 #include "gflags/gflags.h" 29 #include "modules/common/proto/error_code.pb.h" 32 #include "modules/drivers/canbus/proto/can_card_parameter.pb.h" 54 bool Init(
const CANCardParameter ¶meter)
override;
66 apollo::common::ErrorCode
Start()
override;
80 apollo::common::ErrorCode
Send(
const std::vector<CanFrame> &frames,
81 int32_t *
const frame_num)
override;
90 apollo::common::ErrorCode
Receive(std::vector<CanFrame> *
const frames,
91 int32_t *
const frame_num)
override;
100 NTCAN_HANDLE dev_handler_;
101 CANCardParameter::CANChannelId port_;
const int32_t MAX_CAN_RECV_FRAME_LEN
Definition: canbus_consts.h:35
bool Init(const CANCardParameter ¶meter) override
Initialize the ESD CAN client by specified CAN card parameters.
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
The class which defines an ESD CAN client which inherits CanClient.
Definition: esd_can_client.h:47
Defines the CanFrame struct and CanClient interface.
The class which defines the CAN client to send and receive message.
Definition: can_client.h:92
std::string GetErrorString(const int32_t status) override
Get the error string.
apollo::common::ErrorCode Send(const std::vector< CanFrame > &frames, int32_t *const frame_num) override
Send messages.
const int32_t MAX_CAN_SEND_FRAME_LEN
Definition: canbus_consts.h:34
apollo::common::ErrorCode Start() override
Start the ESD CAN client.
virtual ~EsdCanClient()
Destructor.
apollo::common::ErrorCode Receive(std::vector< CanFrame > *const frames, int32_t *const frame_num) override
Receive messages.
void Stop() override
Stop the ESD CAN client.