Apollo  6.0
Open source self driving car software
Public Member Functions | List of all members
apollo::drivers::canbus::can::HermesCanClient Class Reference

The class which defines a BCAN client which inherits CanClient. More...

#include <hermes_can_client.h>

Inheritance diagram for apollo::drivers::canbus::can::HermesCanClient:
Inheritance graph
Collaboration diagram for apollo::drivers::canbus::can::HermesCanClient:
Collaboration graph

Public Member Functions

virtual ~HermesCanClient ()
 Initialize the BCAN client by specified CAN card parameters. More...
 
bool Init (const CANCardParameter &parameter) override
 Start the ESD CAN client. More...
 
apollo::common::ErrorCode Start () override
 Start the ESD CAN client. More...
 
virtual void Stop ()
 Stop the ESD CAN client. More...
 
virtual apollo::common::ErrorCode Send (const std::vector< CanFrame > &frames, int32_t *const frame_num)
 Send messages. More...
 
virtual apollo::common::ErrorCode Receive (std::vector< CanFrame > *const frames, int32_t *const frame_num)
 Receive messages. More...
 
virtual std::string GetErrorString (const int32_t status)
 Get the error string. More...
 
void SetInited (bool init)
 Set inited status. More...
 
- Public Member Functions inherited from apollo::drivers::canbus::CanClient
 CanClient ()=default
 Constructor. More...
 
virtual ~CanClient ()=default
 Destructor. More...
 
virtual apollo::common::ErrorCode SendSingleFrame (const std::vector< CanFrame > &frames)
 Send a single message. More...
 

Additional Inherited Members

- Protected Attributes inherited from apollo::drivers::canbus::CanClient
bool is_started_ = false
 The CAN client is started. More...
 

Detailed Description

The class which defines a BCAN client which inherits CanClient.

Constructor & Destructor Documentation

◆ ~HermesCanClient()

virtual apollo::drivers::canbus::can::HermesCanClient::~HermesCanClient ( )
virtual

Initialize the BCAN client by specified CAN card parameters.

Parameters
parameterCAN card parameters to initialize the CAN client. Destructor

Member Function Documentation

◆ GetErrorString()

virtual std::string apollo::drivers::canbus::can::HermesCanClient::GetErrorString ( const int32_t  status)
virtual

Get the error string.

Parameters
statusThe status to get the error string.

Implements apollo::drivers::canbus::CanClient.

◆ Init()

bool apollo::drivers::canbus::can::HermesCanClient::Init ( const CANCardParameter &  parameter)
overridevirtual

Start the ESD CAN client.

Returns
The status of the start action which is defined by apollo::common::ErrorCode.

Implements apollo::drivers::canbus::CanClient.

◆ Receive()

virtual apollo::common::ErrorCode apollo::drivers::canbus::can::HermesCanClient::Receive ( std::vector< CanFrame > *const  frames,
int32_t *const  frame_num 
)
virtual

Receive messages.

Parameters
framesThe messages to receive.
frame_numThe 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()

virtual apollo::common::ErrorCode apollo::drivers::canbus::can::HermesCanClient::Send ( const std::vector< CanFrame > &  frames,
int32_t *const  frame_num 
)
virtual

Send messages.

Parameters
framesThe messages to send.
frame_numThe amount of messages to send.
Returns
The status of the sending action which is defined by apollo::common::ErrorCode.

Implements apollo::drivers::canbus::CanClient.

◆ SetInited()

void apollo::drivers::canbus::can::HermesCanClient::SetInited ( bool  init)

Set inited status.

Parameters
ifstatus is inited.

◆ Start()

apollo::common::ErrorCode apollo::drivers::canbus::can::HermesCanClient::Start ( )
overridevirtual

Start the ESD CAN client.

Returns
The status of the start action which is defined by apollo::common::ErrorCode.

Implements apollo::drivers::canbus::CanClient.

◆ Stop()

virtual void apollo::drivers::canbus::can::HermesCanClient::Stop ( )
virtual

Stop the ESD CAN client.

Implements apollo::drivers::canbus::CanClient.


The documentation for this class was generated from the following file: