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.

[参考译文] CC2652P:不同端点具有相同的回调函数

Guru**** 2455560 points
Other Parts Discussed in Thread: CC1354P10, CC2652P

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

https://e2e.ti.com/support/wireless-connectivity/zigbee-thread-group/zigbee-and-thread/f/zigbee-thread-forum/1491871/cc2652p-same-callback-functions-for-different-endpoints

器件型号:CC2652P
主题中讨论的其他器件:CC1354P10

工具与软件:

我的器件具有多个端点、它们都具有相同的开/关功能。 从 zed_lights 示例开始、我已经完成:

zCLCDC-CCallbacks( General_Register ONIC_VALVULES_ENDPOINT1,&zclHydronschirabs Controller_Cmd );
zCLCmdCallbacks( General_Register hydronic_VALVULES_ENDPOINT2,&zclHydronoccircoccocCallbacks2, Controller_Cmd backs2 );
static zclGeneral_AppCallbacks_t zclHydronicController_CmdCallbacks =
{
  zclHydronicController_BasicResetCB,            // Basic Cluster Reset command
  NULL,                                   // Identfiy cmd
  NULL,                                   // Identify Query command
  zclHydronicController_IdentifyQueryRspCB,      // Identify Query Response command
  NULL,                                   // Identify Trigger Effect command
#ifdef ZCL_ON_OFF
  zclHydronicValvules1_OnOffCB,                 // On/Off cluster commands
  NULL,                                   // On/Off cluster enhanced command Off with Effect
  NULL,                                   // On/Off cluster enhanced command On with Recall Global Scene
  NULL,                                   // On/Off cluster enhanced command On with Timed Off
#endif
#ifdef ZCL_LEVEL_CTRL
  zclHydronicController_LevelControlMoveToLevelCB,             // Level Control Move to Level command
  zclHydronicController_LevelControlMoveCB,                    // Level Control Move command
  zclHydronicController_LevelControlStepCB,                    // Level Control Step command
  zclHydronicController_LevelControlStopCB,                    // Level Control Stop command
  zclHydronicController_LevelControlMoveToClosestFrequencyCB,  // Level Control Stop command
#endif
#ifdef ZCL_GROUPS
  NULL,                                   // Group Response commands
#endif
#ifdef ZCL_SCENES
  zclHydronicController_SceneStoreCB,           // Scene Store Request command
  zclHydronicController_SceneRecallCB,          // Scene Recall Request command
  NULL,                                  // Scene Response command
#endif
#ifdef ZCL_ALARMS
  NULL,                                  // Alarm (Response) commands
#endif
#ifdef SE_UK_EXT
  NULL,                                  // Get Event Log command
  NULL,                                  // Publish Event Log command
#endif
  NULL,                                  // RSSI Location command
  NULL                                   // RSSI Location Response command
};
但是、即使端点2被调用、也始终会调用为第一个端点注册的函数。
有人知道为什么会发生这种情况吗? 即使这样可以正常工作、将端点作为回调函数的参数进行传递是否有更巧妙的方法、这样我就不需要 重复函数?
谢谢、此致
Peter
PS:该模块实际上是 CC1354P10、而不是 CC2652P、但在选择正确的模块时、我无法在 ZigBee 论坛中发帖...
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

     zclHydronskircu Controller_Cmd backs2 是什么样子的?

    您是否在  zclHydronschiar Controller_Cmd backs2中使用了不同的函数名 ? (例如、 etzclHydronskirica Controller_Basic cb_2)

    谢谢!
    Toby