libxr 1.0
Want to be the best embedded framework
|
CAN通信接口,定义标准CAN通信结构,支持不同类型的消息 (CAN communication interface that defines a standard CAN structure supporting different message types). More...
#include <can.hpp>
Public Types | |
enum class | Type : uint8_t { STANDARD = 0 , EXTENDED = 1 , REMOTE_STANDARD = 2 , REMOTE_EXTENDED = 3 } |
CAN 消息类型 (Enumeration of CAN message types). More... | |
Public Member Functions | |
CAN (const char *name_tp="can", Topic::Domain *domain=nullptr) | |
构造 CAN 对象,可指定主题名称和通信域 (Constructs a CAN object with an optional topic name and domain). | |
struct | __attribute__ ((packed)) |
经典 CAN 消息结构 (Structure representing a classic CAN message). | |
virtual ErrorCode | AddMessage (const ClassicPack &pack)=0 |
添加 CAN 消息到系统 (Adds a CAN message to the system). | |
Data Fields | |
ClassicPack | |
Topic | classic_tp_ |
经典 CAN 消息的主题 (Topic for classic CAN messages). | |
CAN通信接口,定义标准CAN通信结构,支持不同类型的消息 (CAN communication interface that defines a standard CAN structure supporting different message types).
|
strong |
CAN 消息类型 (Enumeration of CAN message types).
Enumerator | |
---|---|
STANDARD | |
EXTENDED | |
REMOTE_STANDARD | |
REMOTE_EXTENDED |
|
inline |
构造 CAN 对象,可指定主题名称和通信域 (Constructs a CAN object with an optional topic name and domain).
name_tp | CAN 消息的主题名称 (Topic name for CAN messages). |
domain | 可选的通信域 (Optional domain for message communication). |
Definition at line 33 of file can.hpp.
添加 CAN 消息到系统 (Adds a CAN message to the system).
Implemented in LibXR::STM32CAN, LibXR::STM32CANFD, and LibXR::FDCAN.
Topic LibXR::CAN::classic_tp_ |