|
本帖最后由 roga2958 于 2011-3-10 17:12 编辑
对上文我有点不懂,这个地方:
在Cyril3AppCoordManage_ProcessEvent函数中,我们添加如下代码:
if ( events & SYS_EVENT_MSG )
{
afIncomingMSGPacket_t *MSGpkt;
MSGpkt = (afIncomingMSGPacket_t *)osal_msg_receive( Cyril3AppManage_TaskID );
while ( MSGpkt )
{
switch ( MSGpkt->hdr.event )
{
case ZDO_STATE_CHANGE:
Cyril3AppCoordManage_NwkState = (devStates_t)MSGpkt->hdr.status;
if ( Cyril3AppCoordManage_NwkState == DEV_ZB_COORD ) {
HalLedSet( HAL_LED_1, HAL_LED_MODE_ON );
HalLedSet ( HAL_LED_2, HAL_LED_MODE_OFF );
HalLedSet ( HAL_LED_3, HAL_LED_MODE_OFF );
Cyril3AppCoordManage_ProcessZDOStateChange(
(devStates_t)MSGpkt->hdr.status);
}
break;
default:
break;
}
osal_msg_deallocate( (uint8 *)MSGpkt );
MSGpkt = (afIncomingMSGPacket_t *)osal_msg_receive( Cyril3AppManage_TaskID );
}
return (events ^ SYS_EVENT_MSG);
}
其中有这样的一条语句:Cyril3AppCoordManage_NwkState == DEV_ZB_COORD ,我想问下Cyril3AppCoordManage_NwkState什么时候被赋的值呢?谢谢! |
|