Apollo 10.0
自动驾驶开放平台
|
The class which defines the CAN client to send and receive message. 更多...
#include <can_client.h>
Public 成员函数 | |
CanClient ()=default | |
Constructor | |
virtual | ~CanClient ()=default |
Destructor | |
virtual bool | Init (const CANCardParameter ¶meter)=0 |
Initialize the CAN client by specified CAN card parameters. | |
virtual apollo::common::ErrorCode | Start ()=0 |
Start the CAN client. | |
virtual void | Stop ()=0 |
Stop the CAN client. | |
virtual apollo::common::ErrorCode | Send (const std::vector< CanFrame > &frames, int32_t *const frame_num)=0 |
Send messages | |
virtual apollo::common::ErrorCode | SendSingleFrame (const std::vector< CanFrame > &frames) |
Send a single message. | |
virtual apollo::common::ErrorCode | Receive (std::vector< CanFrame > *const frames, int32_t *const frame_num)=0 |
Receive messages | |
virtual std::string | GetErrorString (const int32_t status)=0 |
Get the error string. | |
Protected 属性 | |
bool | is_started_ = false |
The CAN client is started. | |
The class which defines the CAN client to send and receive message.
在文件 can_client.h 第 92 行定义.
|
default |
Constructor
|
virtualdefault |
Destructor
|
pure virtual |
Get the error string.
status | The status to get the error string. |
在 apollo::drivers::canbus::can::HermesCanClient, apollo::drivers::canbus::can::EsdCanClient, apollo::drivers::canbus::can::FakeCanClient , 以及 apollo::drivers::canbus::can::SocketCanClientRaw 内被实现.
|
pure virtual |
Initialize the CAN client by specified CAN card parameters.
parameter | CAN card parameters to initialize the CAN client. |
在 apollo::drivers::canbus::can::FakeCanClient, apollo::drivers::canbus::can::EsdCanClient, apollo::drivers::canbus::can::HermesCanClient , 以及 apollo::drivers::canbus::can::SocketCanClientRaw 内被实现.
|
pure virtual |
Receive messages
frames | The messages to receive. |
frame_num | The amount of messages to receive. |
在 apollo::drivers::canbus::can::HermesCanClient, apollo::drivers::canbus::can::EsdCanClient, apollo::drivers::canbus::can::SocketCanClientRaw , 以及 apollo::drivers::canbus::can::FakeCanClient 内被实现.
|
pure virtual |
Send messages
frames | The messages to send. |
frame_num | The amount of messages to send. |
在 apollo::drivers::canbus::can::HermesCanClient, apollo::drivers::canbus::can::EsdCanClient, apollo::drivers::canbus::can::FakeCanClient , 以及 apollo::drivers::canbus::can::SocketCanClientRaw 内被实现.
|
inlinevirtual |
Send a single message.
frames | A single-element vector containing only one message. |
在文件 can_client.h 第 139 行定义.
|
pure virtual |
Start the CAN client.
在 apollo::drivers::canbus::can::EsdCanClient, apollo::drivers::canbus::can::FakeCanClient, apollo::drivers::canbus::can::HermesCanClient , 以及 apollo::drivers::canbus::can::SocketCanClientRaw 内被实现.
|
pure virtual |
|
protected |
The CAN client is started.
在文件 can_client.h 第 165 行定义.