This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于感知 zcl_sendRead() 的疑问

Expert 1850 points

           当设备A(发送者) 使用zcl_sendRead() 去读取  设备B(接收者)的attribute,
           在设备B 中接收到(被读取)的动作 时,zstack 对应的代码段具体是在哪里? 
           设备B 如果不想被读取,应该在zstack 中如何发,发什么   给设备A,设备A 才知道改写没成功?


我跟踪到zcl.C 中的这函数,结果每次都返回 软件错误。。。。,,,请问这是什么逻辑???

static ZStatus_t zclReadAttrDataUsingCB( uint8 endpoint, uint16 clusterId, uint16 attrId,
                                         uint8 *pAttrData, uint16 *pDataLen )
{
  zclReadWriteCB_t pfnReadWriteCB = zclGetReadWriteCB( endpoint );

  if ( pDataLen != NULL )
  {
    *pDataLen = 0; // Always initialize it to 0
  }

  if ( pfnReadWriteCB != NULL )
  {
    // Read the attribute value and its length
    return ( (*pfnReadWriteCB)( clusterId, attrId, ZCL_OPER_READ, pAttrData, pDataLen ) );
  }

  return ( ZCL_STATUS_SOFTWARE_FAILURE );
}