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.

[参考译文] Z-Stack (或 TI-RTOS)是否为 Semaphore_pend()保留了事件? 检测到周期性事件0x8000。

Guru**** 3001220 points

Other Parts Discussed in Thread: Z-STACK

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/zigbee-thread-group/zigbee-and-thread/f/zigbee-thread-forum/1042713/does-z-stack-or-ti-rtos-have-reserved-events-for-semaphore_pend-periodical-event-0x8000-is-detected

Thread 中讨论的其他器件:Z-stack

我在项目中使用 Z-Stack 示例之一,并在 zcl_samplesw.c 函数 zclSampleSw_process_loop()中看到应用程序未生成的奇怪周期性事件0x8000。 看起来事件参数"appServiceTaskEvents" 0x8000由 TI-RTOS 在内部更改并触发循环过程。 我找不到它的来源。

如果有任何其他已注册事件、则事件0x8000意味着什么?

/*******************************************************************************
 * @fn      zclSampleSw_process_loop
 *
 * @brief   Application task processing start.
 *
 * @param   none
 *
 * @return  void
 */
static void zclSampleSw_process_loop(void)
{
    /* Forever loop */
    for(;;)
    {
        zstackmsg_genericReq_t *pMsg = NULL;
        bool msgProcessed = FALSE;

            /* Wait for response message */
        if(Semaphore_pend(appSemHandle, BIOS_WAIT_FOREVER ))
        {
            /* Retrieve the response message */
            if( (pMsg = (zstackmsg_genericReq_t*) OsalPort_msgReceive( appServiceTaskId )) != NULL)
            {
                /* Process the message from the stack */
                zclSampleSw_processZStackMsgs(pMsg);

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Alex:

    示例项目预先确定了其头文件中的几个应用程序事件(例如, zcl_samplelight.c),通常为 SYS_EVENT_MSG保留0x8000。 因此、只应使用0x10000及以上的可定制应用事件(最多32个内部事件)。    Z-Stack 用户指南对此进行了说明。   

    此致、
    Ryan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    谢谢!