One Motor 0.5.1
RoboMaster全平台一站式电机驱动库
载入中...
搜索中...
未找到
OneMotor::Motor::DJI::M3508RawStatusFrame结构体 参考

M3508电机原始状态反馈的CAN帧的直接映射。 更多...

#include <M3508Frames.hpp>

Public 成员函数

 operator Can::CanFrame () const
 将此结构体转换为通用的 Can::CanFrame
 
 M3508RawStatusFrame (Can::CanFrame frame)
 从通用的 Can::CanFrame 构造此结构体。
 
std::string format () const
 将帧内容格式化为可读字符串。
 

Public 属性

uint16_t canId
 CAN ID
 
uint16_t ecd
 编码器原始值 (0~8191)
 
int16_t rpm
 转速 (RPM)
 
int16_t current
 电机实际电流 (mA)
 
uint8_t temperature
 电机温度 (°C)
 

详细描述

M3508电机原始状态反馈的CAN帧的直接映射。

此结构体用于解析从M3508电机接收到的CAN报文,或构建要发送到电机的CAN报文。 它提供了与 Can::CanFrame 相互转换的功能。

构造及析构函数说明

◆ M3508RawStatusFrame()

OneMotor::Motor::DJI::M3508RawStatusFrame::M3508RawStatusFrame ( Can::CanFrame frame)
explicit

从通用的 Can::CanFrame 构造此结构体。

参数
frame从CAN总线接收到的原始帧。

成员函数说明

◆ format()

std::string OneMotor::Motor::DJI::M3508RawStatusFrame::format ( ) const
inlinenodiscard

将帧内容格式化为可读字符串。

返回
包含帧所有字段信息的字符串。

该结构体的文档由以下文件生成: