You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.5 KiB
C++
56 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#if defined(__GNUC__) && __GNUC__ >= 5
|
|
#pragma GCC diagnostic ignored "-Wunused-result"
|
|
#endif
|
|
|
|
#include <stdint.h>
|
|
#include <string.h>
|
|
#include <algorithm>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <map>
|
|
#include <mutex>
|
|
|
|
#if defined(__GNUC__) && __GNUC__ < 5
|
|
#define nullptr NULL
|
|
#endif
|
|
|
|
#ifndef arraysize
|
|
#define arraysize(a) (sizeof(a)/sizeof(a[0]))
|
|
#endif
|
|
|
|
#ifndef OT_NAMESPACE_BEGIN
|
|
# define OT_NAMESPACE_BEGIN namespace ot {
|
|
# define OT_NAMESPACE_END }
|
|
#endif
|
|
|
|
//数据库操作命令
|
|
#define Command_AddObject 1 //增加对象
|
|
#define Command_DeleteObject 2 //删除对象
|
|
#define Command_SyncObject 3 //同步对象
|
|
#define Command_VerifyObject 4 //校验对象
|
|
#define Command_OrderObject 5 //订购对象
|
|
#define Command_CancelOrderObject 6 //取消订购对象
|
|
#define Command_GetObject 7 //获取对象
|
|
#define Command_SetObject 8 //设置对象
|
|
#define Command_GetObjectIDList 9 //获取所有对象编号列表
|
|
#define Command_GetObjectList 10 //获取对象列表
|
|
#define Command_AddProperty 11 //增加属性
|
|
#define Command_DeleteProperty 12 //设置对象
|
|
#define Command_EditProperty 13 //修改属性
|
|
#define Command_GetPropertyList 14 //获取属性列表
|
|
|
|
OT_NAMESPACE_BEGIN
|
|
|
|
//设备类型
|
|
enum DeviceType
|
|
{
|
|
DT_Normal = 1, // 普通设备
|
|
DT_Network // 网络设备
|
|
};
|
|
|
|
typedef std::vector<uint8_t> ByteArray;
|
|
|
|
OT_NAMESPACE_END
|