TI中文支持网
TI专业的中文技术问题搜集分享网站

关于特征值表的问题

请问一下:
在这个特征值表中:
static gattAttribute_t simpleProfileAttrTbl[SERVAPP_NUM_ATTR_SUPPORTED] ={
  // Simple Profile Service
  {    { ATT_BT_UUID_SIZE, primaryServiceUUID }, /* type */ 
    GATT_PERMIT_READ,                         /* permissions */
    0,                                        /* handle */
    (uint8 *)&simpleProfileService   //0xFFF0         /* pValue */
  },
// Characteristic 1 Declaration 
    {      { ATT_BT_UUID_SIZE, characterUUID },
      GATT_PERMIT_READ,      0,
      &simpleProfileChar1Props    },
  // Characteristic Value 1
     {        { ATT_BT_UUID_SIZE, simpleProfilechar1UUID },//0XFFF1
        GATT_PERMIT_READ | GATT_PERMIT_WRITE,
        0,        &simpleProfileChar1      },
  // Characteristic 1 User Description 
     {        { ATT_BT_UUID_SIZE, charUserDescUUID },//0X2901
        GATT_PERMIT_READ,        0,        simpleProfileChar1UserDesp      },   
           
    // Characteristic 2 Declaration
    {      { ATT_BT_UUID_SIZE, characterUUID },//0X2803
      GATT_PERMIT_READ,      0,
      &simpleProfileChar2Props    },
      // Characteristic Value 2
      {        { ATT_BT_UUID_SIZE, simpleProfilechar2UUID },
        GATT_PERMIT_READ,        0,        &simpleProfileChar2      },
      // Characteristic 2 User Description
      {        { ATT_BT_UUID_SIZE, charUserDescUUID },
        GATT_PERMIT_READ,        0,        simpleProfileChar2UserDesp      },                   // Characteristic 3 Declaration
    {      { ATT_BT_UUID_SIZE, characterUUID },
      GATT_PERMIT_READ,      0,
      &simpleProfileChar3Props    },
      // Characteristic Value 3
      {        { ATT_BT_UUID_SIZE, simpleProfilechar3UUID },
        GATT_PERMIT_WRITE,        0,        &simpleProfileChar3      },
      // Characteristic 3 User Description
      {        { ATT_BT_UUID_SIZE, charUserDescUUID },
        GATT_PERMIT_READ,        0,        simpleProfileChar3UserDesp      },
    // Characteristic 4 Declaration
    {      { ATT_BT_UUID_SIZE, characterUUID },
      GATT_PERMIT_READ,      0,
      &simpleProfileChar4Props    },
      // Characteristic Value 4
      {        { ATT_BT_UUID_SIZE, simpleProfilechar4UUID },
        0,        0,        &simpleProfileChar4      },
      // Characteristic 4 configuration
      {        { ATT_BT_UUID_SIZE, clientCharCfgUUID },
        GATT_PERMIT_READ | GATT_PERMIT_WRITE,        0,        (uint8 *)simpleProfileChar4Config      },
           // Characteristic 4 User Description
      {        { ATT_BT_UUID_SIZE, charUserDescUUID },
        GATT_PERMIT_READ,        0,        simpleProfileChar4UserDesp      },
         // Characteristic 5 Declaration
    {      { ATT_BT_UUID_SIZE, characterUUID },
      GATT_PERMIT_READ,      0,
      &simpleProfileChar5Props    },
      // Characteristic Value 5
      {        { ATT_BT_UUID_SIZE, simpleProfilechar5UUID },
        GATT_PERMIT_AUTHEN_READ,        0,        simpleProfileChar5      },
      // Characteristic 5 User Description
      {        { ATT_BT_UUID_SIZE, charUserDescUUID },
        GATT_PERMIT_READ,        0,        simpleProfileChar5UserDesp      },
   }
在特征值表中定义的顺序都是   声明、值、(结构)、用户描述
1、请问一下所有蓝牙的协议都都必须是这种顺序吗?
2、这个特征值表有关于定义的说明吗?
3、我把特征值1的顺序改掉了,改成了值、用户描述、声明的这种顺序,也读到了特征值1的句柄和UUID,但是它们的顺序也跟着改变了。那么我在主机中如何
     判断特征值的顺序是错误的呢?
 
an xie:

回复 Viki Shi:

谢谢各位的回答,基本已经理解了

赞(0)
未经允许不得转载:TI中文支持网 » 关于特征值表的问题
分享到: 更多 (0)