28#include <sys/socket.h>
32#include <linux/can/raw.h>
40#include "modules/common_msgs/basic_msgs/error_code.pb.h"
41#include "modules/common_msgs/drivers_msgs/can_card_parameter.pb.h"
43#include "gflags/gflags.h"
94 int32_t *
const frame_num)
override;
104 int32_t *
const frame_num)
override;
113 int dev_handler_ = 0;
Defines the CanFrame struct and CanClient interface.
The class which defines the CAN client to send and receive message.
The class which defines an ESD CAN client which inherites CanClient.
void Stop() override
Stop the ESD CAN client.
apollo::common::ErrorCode Send(const std::vector< CanFrame > &frames, int32_t *const frame_num) override
Send messages
apollo::common::ErrorCode Start() override
Start the ESD CAN client.
apollo::common::ErrorCode Receive(std::vector< CanFrame > *const frames, int32_t *const frame_num) override
Receive messages
virtual ~SocketCanClientRaw()
Destructor
bool Init(const CANCardParameter ¶meter) override
Initialize the ESD CAN client by specified CAN card parameters.
std::string GetErrorString(const int32_t status) override
Get the error string.
const int32_t MAX_CAN_RECV_FRAME_LEN
const int32_t MAX_CAN_SEND_FRAME_LEN