Files
Bionic_sphere/Bionic_Core/ToolsClass/ToolsClass.h
T
Misaki a47e20cb64 1. 优化了cpp_json的内容,使其更modern
2. 稍微优化了一下系统配置类
3. 增加了系统版本号,便于区分系统版本,方便OTA
4. 重写OTA的逻辑,完成了Cpp的OTA封装,测试通过
2025-09-24 04:01:23 +08:00

48 lines
960 B
C++

//
// Created by misaki on 2025/9/2.
//
#pragma once
#include <string>
/**
* 本模块提供各种杂项工具类,基本都来源于对底层驱动的封装
*
*
*/
class ToolsClass {
public:
/**
* 获取当前时间
* @return 当前时间
*/
static std::string getCurrentTime();
/**
* 获取esp32s3的芯片序列号
* @return 芯片序列号
*/
static std::string getChipSerialNumber();
/**
* 获取esp32s3的MAC地址
* @return MAC地址
*/
static std::string getChipMAC();
/**
* 生成SN码
* @param mac mac地址
* @param chipID 芯片ID
* @return 生成的SN码
*/
static std::string GenerateSN(const std::string& mac, const std::string& chipID);
/**
* 获取设备版本
* @return 设备版本
*/
static std::string getDeviceVersion();
static std::string device_version; // 设备版本
};