EmxTypeDef.hpp
1 //
2 // Created by xiong on 2021/7/19.
3 //
4 
5 #ifndef EMX_EmxTypeDef_HPP
6 #define EMX_EmxTypeDef_HPP
7 
8 #include <cstdint>
9 #include <memory>
10 #include <string>
11 #include <unistd.h>
12 
13 #define EMX_MAX_PATH_SIZE 256
14 
15 #define ph_1 std::placeholders::_1
16 #define ph_2 std::placeholders::_2
17 #define ph_3 std::placeholders::_3
18 #define ph_4 std::placeholders::_4
19 #define ph_5 std::placeholders::_5
20 #define ph_6 std::placeholders::_6
21 #define ph_7 std::placeholders::_7
22 #define ph_8 std::placeholders::_8
23 
24 namespace Emx {
29  enum class ErrCodeE : int32_t {
30  Success = 0,
31  Failure = -1,
32  IllegalParam = -2,
33  MallocFailed = -3,
34  NetworkError = -4,
35  BufferOverflow = -5,
36  BufferOverride = -6,
37  Timeout = -7,
38  FrameError = -8,
39  ResNotAvailable = -9,
40  ResInUsing = -10,
41  ResNotExist = -11,
42  OpenFailed = -12,
43  ParseFailed = -13,
44  OperationNotSupport = -14,
45  PskShorterThan8 = -15,
46  ReachTheEof = -16,
47  Canceled = -17,
48  Destroyed = -18,
49  VerifyFailed = -19,
50  };
51 
52  struct EmxData {
53  void *data;
54  int size;
55  };
57 }
58 #endif //EMX_EmxTypeDef_HPP
59 
ErrCodeE
错误码定义
Definition: EmxTypeDef.hpp:29
@ ResNotAvailable
资源当前不可用
@ Canceled
被取消
@ ParseFailed
解析失败
@ OperationNotSupport
操作不支持
@ NetworkError
网络相关错误
@ Success
成功
@ BufferOverflow
缓存益处
@ MallocFailed
内存分配失败
@ VerifyFailed
校验失败
@ BufferOverride
缓存数据被覆盖
@ FrameError
帧错误
@ IllegalParam
非法参数
@ Destroyed
被销毁
@ OpenFailed
打开失败
@ Timeout
超时
@ PskShorterThan8
WiFi密码长度过短
@ ReachTheEof
达到文件尾
@ ResInUsing
资源被占用
@ Failure
失败
@ ResNotExist
资源不存在
Definition: EmxGpio.hpp:10
Definition: EmxTypeDef.hpp:52
int size
Definition: EmxTypeDef.hpp:54
void * data
Definition: EmxTypeDef.hpp:53