陀螺仪数据
更多...
#include <rmvl/core/dataio.hpp>
|
| static bool | write (const std::string &path, uint32_t idx, const GyroData &data) noexcept |
| | 将陀螺仪数据写入 YAML 文件中 更多...
|
| |
| static bool | read (const std::string &path, uint32_t idx, GyroData &data) noexcept |
| | 从指定 YAML 文件中读取陀螺仪数据 更多...
|
| |
◆ read()
| static bool rm::GyroData::read |
( |
const std::string & |
path, |
|
|
uint32_t |
idx, |
|
|
GyroData & |
data |
|
) |
| |
|
staticnoexcept |
从指定 YAML 文件中读取陀螺仪数据
- 注解
- 访问指定下标的数据结构体
gyro_data_<?>,<?> 表示结构体标号,即参数 idx
- 参数
-
| [in] | path | 读取的文件路径 |
| [in] | idx | 结构体标号 |
| [out] | data | 读取出的陀螺仪数据,读取失败则不对 data 做任何操作 |
- 返回
- 是否读取成功
◆ write()
| static bool rm::GyroData::write |
( |
const std::string & |
path, |
|
|
uint32_t |
idx, |
|
|
const GyroData & |
data |
|
) |
| |
|
staticnoexcept |
将陀螺仪数据写入 YAML 文件中
- 注解
- 默认以
APPEND 模式进行写入到结构体 gyro_data_<?> 中,<?> 表示写入的结构体标号,即参数 idx
- 参数
-
| [in] | path | 写入的文件路径 |
| [in] | idx | 写入的结构体标号 |
| [in] | data | 待写入的陀螺仪数据 |
- 返回
- 是否写入成功
◆ rotation
◆ translation
该结构体的文档由以下文件生成: