结构图:
对应代码:
typedef struct
{uint16_t handle;
uint8_t uuid_len;
uint8_t uuid[16];
}desprip_t;
typedef struct
{
uint16_t handle;
uint8_t uuid_len;
uint8_t uuid[16];
}include_t;
typedef struct
{
uint16_t dhandle;
uint16_t vhandle;
uint8_t property;
uint8_t uuid_len;
uint8_t uuid[16];
uint8_t nod;
desprip_t * d;
}charact_t;
typedef struct
{
uint16_t start;//服务定义中第一个Attribute的Handle
uint16_t end;//服务定义中最后一个Attribute的Handle
uint8_t uuid_len;
uint8_t uuid[16];
uint8_t noi;
include_t * i;
uint8_t noc;
charact_t * c;
}service_t;
typedef struct
{
uint8_t nos;//服务的数量
service_t * s;
}server_t;
server_t server;