28 #include "modules/common/proto/error_code.pb.h" 52 bool Init(
const CANCardParameter ¶m)
override;
64 apollo::common::ErrorCode
Start()
override;
78 apollo::common::ErrorCode
Send(
const std::vector<CanFrame> &frames,
79 int32_t *
const frame_num)
override;
88 apollo::common::ErrorCode
Receive(std::vector<CanFrame> *frames,
89 int32_t *
const frame_num)
override;
98 int32_t send_counter_ = 0;
99 int32_t recv_counter_ = 0;
100 std::stringstream frame_info_;
apollo::common::ErrorCode Receive(std::vector< CanFrame > *frames, int32_t *const frame_num) override
Receive messages.
The class which defines a fake CAN client which inherits CanClient. This fake CAN client is used for ...
Definition: fake_can_client.h:45
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.
apollo::common::ErrorCode Start() override
Start the fake CAN client.
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.
bool Init(const CANCardParameter ¶m) override
Initialize the fake CAN client by specified CAN card parameters.
apollo::common::ErrorCode Send(const std::vector< CanFrame > &frames, int32_t *const frame_num) override
Send messages.
virtual ~FakeCanClient()=default
Destructor.
void Stop() override
Stop the fake CAN client.