一个窗帘的程序中,想在控制器向终端发送动作命令,终端收到后动作,并向控制器发送一个它的响应,这个响应如何实现呢?在命令回调中有对应的命令回调
typedef struct
{
zclClosures_DoorLock_t pfnDoorLock; // Door Lock cluster commands
zclClosures_DoorLockRes_t pfnDoorLockRes; // Door Lock cluster response
zclClosures_WindowCoveringSimple_t pfnWindowCoveringUpOpen;
zclClosures_WindowCoveringSimple_t pfnWindowCoveringDownClose;
zclClosures_WindowCoveringSimple_t pfnWindowCoveringStop;
zclClosures_WindowCoveringGotoSetpoint_t pfnWindowCoveringGotoLiftSetpoint;
zclClosures_WindowCoveringGotoValue_t pfnWindowCoveringGotoLiftValue;
zclClosures_WindowCoveringGotoPercentage_t pfnWindowCoveringGotoLiftPercentage;
zclClosures_WindowCoveringGotoSetpoint_t pfnWindowCoveringGotoTiltSetpoint;
zclClosures_WindowCoveringGotoValue_t pfnWindowCoveringGotoTiltValue;
zclClosures_WindowCoveringGotoPercentage_t pfnWindowCoveringGotoTiltPercentage; zclClosures_WindowCoveringProgramSetpoint_t pfnWindowCoveringProgramSetpoint;
} zclClosures_AppCallbacks_t;
那这个响应如何实现呢?
Ming Yu3:
应该是得设置attribute中
#define ZCL_SEND_ATTR_REPORTS 0x00吧,具体怎么用呢?
gancheng:
回复 Ming Yu3:
在回调函数里面REPORT ATTRIBUTE就可以了
Ming Yu3:
回复 gancheng:
那在控制端应该做什么呢?在哪里接收这个返回值呢?