Apollo  6.0
Open source self driving car software
Public Member Functions | List of all members
apollo::drivers::canbus::CanReceiver< SensorType > Class Template Reference

CAN receiver. More...

#include <can_receiver.h>

Collaboration diagram for apollo::drivers::canbus::CanReceiver< SensorType >:
Collaboration graph

Public Member Functions

 CanReceiver ()=default
 Constructor. More...
 
virtual ~CanReceiver ()=default
 Destructor. More...
 
common::ErrorCode Init (CanClient *can_client, MessageManager< SensorType > *pt_manager, bool enable_log)
 Initialize by a CAN client, message manager. More...
 
bool IsRunning () const
 Get the working status of this CAN receiver. To check if it is running. More...
 
::apollo::common::ErrorCode Start ()
 Start the CAN receiver. More...
 
void Stop ()
 Stop the CAN receiver. More...
 

Detailed Description

template<typename SensorType>
class apollo::drivers::canbus::CanReceiver< SensorType >

CAN receiver.

Constructor & Destructor Documentation

◆ CanReceiver()

template<typename SensorType>
apollo::drivers::canbus::CanReceiver< SensorType >::CanReceiver ( )
default

Constructor.

◆ ~CanReceiver()

template<typename SensorType>
virtual apollo::drivers::canbus::CanReceiver< SensorType >::~CanReceiver ( )
virtualdefault

Destructor.

Member Function Documentation

◆ Init()

template<typename SensorType>
apollo::common::ErrorCode apollo::drivers::canbus::CanReceiver< SensorType >::Init ( CanClient can_client,
MessageManager< SensorType > *  pt_manager,
bool  enable_log 
)

Initialize by a CAN client, message manager.

Parameters
can_clientThe CAN client to use for receiving messages.
pt_managerThe message manager which can parse and get protocol data by message id.
enable_logIf log the essential information during running.
Returns
An error code indicating the status of this initialization.

◆ IsRunning()

template<typename SensorType >
bool apollo::drivers::canbus::CanReceiver< SensorType >::IsRunning ( ) const

Get the working status of this CAN receiver. To check if it is running.

Returns
If this CAN receiver is running.

◆ Start()

template<typename SensorType >
apollo::common::ErrorCode apollo::drivers::canbus::CanReceiver< SensorType >::Start ( )

Start the CAN receiver.

Returns
The error code indicating the status of this action.

◆ Stop()

template<typename SensorType >
void apollo::drivers::canbus::CanReceiver< SensorType >::Stop ( void  )

Stop the CAN receiver.


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