DevInfo.hpp
1 //
2 // Created by xiong on 2022/6/10.
3 //
4 
5 #ifndef EMX_DevInfo_HPP
6 #define EMX_DevInfo_HPP
7 
8 #include "EmxCore.hpp"
9 
10 namespace Emx {
16  class DevInfo {
17  public:
18  DevInfo() {
19  memset(&m_inner, 0, sizeof(Info));
20  memset(&m_outer, 0, sizeof(Info));
21  }
22 
23  static const int MaxTypeSize = 64;
24  static const int MaxVersionSize = 64;
25 
27  struct Info {
30  };
31 
37 
42  Info *GetInner() { return &m_inner; }
43 
48  Info *GetOuter() { return &m_outer; }
49 
54  Info *GetHardware() { return &m_hardware; }
55 
56  private:
57  Info m_inner;
58  Info m_outer;
59  Info m_hardware;
60  };
62 }
63 
64 #endif //EMX_DevInfo_HPP
提供获取设备类型版本信息等相关的接口
Definition: DevInfo.hpp:16
static const int MaxTypeSize
类型字符串最大大小
Definition: DevInfo.hpp:23
static const int MaxVersionSize
版本字符串最大大小
Definition: DevInfo.hpp:24
ErrCodeE Load()
从flash中加载参数
DevInfo()
Definition: DevInfo.hpp:18
Info * GetHardware()
获取硬件版本号
Definition: DevInfo.hpp:54
Info * GetInner()
获取内部使用信息
Definition: DevInfo.hpp:42
Info * GetOuter()
获取外部使用信息
Definition: DevInfo.hpp:48
ErrCodeE
错误码定义
Definition: EmxTypeDef.hpp:29
Definition: EmxGpio.hpp:10
类型版本信息
Definition: DevInfo.hpp:27
char type[MaxTypeSize]
类型
Definition: DevInfo.hpp:28
char version[MaxVersionSize]
版本
Definition: DevInfo.hpp:29