The class which defines a fake CAN client which inherits CanClient. This fake CAN client is used for testing.
More...
#include <fake_can_client.h>
The class which defines a fake CAN client which inherits CanClient. This fake CAN client is used for testing.
◆ ~FakeCanClient()
virtual apollo::drivers::canbus::can::FakeCanClient::~FakeCanClient |
( |
| ) |
|
|
virtualdefault |
◆ GetErrorString()
std::string apollo::drivers::canbus::can::FakeCanClient::GetErrorString |
( |
const int32_t |
status | ) |
|
|
overridevirtual |
◆ Init()
bool apollo::drivers::canbus::can::FakeCanClient::Init |
( |
const CANCardParameter & |
param | ) |
|
|
overridevirtual |
Initialize the fake CAN client by specified CAN card parameters.
- Parameters
-
parameter | CAN card parameters to initialize the CAN client. |
- Returns
- If the initialization is successful.
Implements apollo::drivers::canbus::CanClient.
◆ Receive()
apollo::common::ErrorCode apollo::drivers::canbus::can::FakeCanClient::Receive |
( |
std::vector< CanFrame > * |
frames, |
|
|
int32_t *const |
frame_num |
|
) |
| |
|
overridevirtual |
Receive messages.
- Parameters
-
frames | The messages to receive. |
frame_num | The amount of messages to receive. |
- Returns
- The status of the receiving action which is defined by apollo::common::ErrorCode.
Implements apollo::drivers::canbus::CanClient.
◆ Send()
apollo::common::ErrorCode apollo::drivers::canbus::can::FakeCanClient::Send |
( |
const std::vector< CanFrame > & |
frames, |
|
|
int32_t *const |
frame_num |
|
) |
| |
|
overridevirtual |
Send messages.
- Parameters
-
frames | The messages to send. |
frame_num | The amount of messages to send. |
- Returns
- The status of the sending action which is defined by apollo::common::ErrorCode.
Implements apollo::drivers::canbus::CanClient.
◆ Start()
apollo::common::ErrorCode apollo::drivers::canbus::can::FakeCanClient::Start |
( |
| ) |
|
|
overridevirtual |
◆ Stop()
void apollo::drivers::canbus::can::FakeCanClient::Stop |
( |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file: