22 #include "gflags/gflags.h" 24 #include "modules/common/proto/error_code.pb.h" 25 #include "modules/drivers/canbus/proto/can_card_parameter.pb.h" 64 bool Init(
const CANCardParameter ¶meter)
override;
71 apollo::common::ErrorCode
Start()
override;
86 virtual apollo::common::ErrorCode
Send(
const std::vector<CanFrame> &frames,
87 int32_t *
const frame_num);
96 virtual apollo::common::ErrorCode
Receive(std::vector<CanFrame> *
const frames,
97 int32_t *
const frame_num);
110 bool is_init_ =
false;
112 CANCardParameter::CANChannelId port_;
const int32_t MAX_CAN_RECV_FRAME_LEN
Definition: canbus_consts.h:35
bool Init(const CANCardParameter ¶meter) override
Start the ESD CAN client.
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Defines the CanFrame struct and CanClient interface.
The class which defines the CAN client to send and receive message.
Definition: can_client.h:92
void SetInited(bool init)
Set inited status.
virtual void Stop()
Stop the ESD CAN client.
apollo::common::ErrorCode Start() override
Start the ESD CAN client.
virtual apollo::common::ErrorCode Send(const std::vector< CanFrame > &frames, int32_t *const frame_num)
Send messages.
virtual apollo::common::ErrorCode Receive(std::vector< CanFrame > *const frames, int32_t *const frame_num)
Receive messages.
uint64_t bcan_hdl_t
Definition: bcan.h:48
The class which defines a BCAN client which inherits CanClient.
Definition: hermes_can_client.h:46
const int32_t MAX_CAN_SEND_FRAME_LEN
Definition: canbus_consts.h:34
Definition: bcan_defs.h:28
virtual std::string GetErrorString(const int32_t status)
Get the error string.
virtual ~HermesCanClient()
Initialize the BCAN client by specified CAN card parameters.