如果你看到文件“at .h”,你可以找到这个内容
我想使用ATT_DECL_INCLUDE
我尝试声明包括服务属性。< / p > < p >//-------------------------------------------------------------------------------------------------------------< br / >, const struct attm_desc sample128_att_db [SAMPLE128_IDX_NB] = < br / > {< br / > / /服务此话< br / > [SAMPLE128_IDX_SVC] = {ATT_DECL_PRIMARY_SERVICE,烫(RD,启用),sizeof (sample128_svc), < br / > sizeof (sample128_svc),
// DISS Service Declaration
[SAMPLE128_IDX_INCL_DISS_SVC] = {ATT_DECL_INCLUDE, PERM(RD, ENABLE),sizeof(struct att_incl_desc), 0, NULL},
…
status = attm_svc_create_db(&sample128_env. env);sample128_shdl, (uint8_t *)&cfg_flag, SAMPLE128_IDX_NB, &sample128_env。att_tbl [0], dest_id, sample128_att_db [0]); < br / >…< br /> //------------------------------------------------------------------------------------------------------------- p > < p >但我不知道如何填DB“struct att_incl_desc”< / p > < p >我可以看看示例使用包括服务属性吗? < / p > < p >(在示例需要信息)< br / > 1。当
send msg REQ_DB_CREATE
2。
func req_db_create_hendler
3。 how
get diss_service_start_handle
get diss_service_end_handle
//-----------------------------------------------------
/// include service entry element
struct att_incl_desc
{
/// start handle value of included service
uint16_t start_hdl;
/// end handle value of included service
uint16_t end_hdl;
/// attribute value UUID
uint16_t uuid;
};
//-------------------------------------------------------
thank you.