切换网络sensor/collector

if(devInfoBlock.panID == JDLLC_INVALID_PAN)
                        {
                            /* Device can join any network , associate with
                             * first coordinator from which beacon is received */
                            devInfoBlock.panID = pData->panDesc.coordPanId;
                            panIdMatch = true;
                        }
                        /* Check the incoming PAN ID to see if it's a valid coordinator */
                        else if (devInfoBlock.panID == pData->panDesc.coordPanId)
                        {
                            panIdMatch = true;
                        } 
 devInfoBlock.channel = pData->panDesc.logicalChannel;
                        devInfoBlock.coordShortAddr = pData->panDesc
                                        .coordAddress.addr.shortAddr;
                        if(APIMAC_SFS_BEACON_ORDER( pData->panDesc.superframeSpec)
                                        != JDLLC_BEACON_ORDER_NON_BEACON)
                        {
                            devInfoBlock.beaconOrder = APIMAC_SFS_BEACON_ORDER(
                                            pData->panDesc.superframeSpec);
                            devInfoBlock.superframeOrder =
                                APIMAC_SFS_SUPERFRAME_ORDER(
                                                pData->panDesc.superframeSpec);
                        }

                        if(devInfoBlock.beaconOrder == JDLLC_BEACON_ORDER_NON_BEACON)
                        {
                            parentFound = true;
#ifdef FREQ_2_4G
                            ApiMac_srcMatchEnable();
#endif
                            Ssf_stopScanBackoffClock();
                        }
在非信标中,入网回调中例子有这样一段代码,这判断了panid为空和相同网络,如果我是在所有信道中扫描,回调回来的是某个网络panid=123,但是我的devInfoBlock.panid确是234,根据例子执行代码,已经把信道和地址都写入进devInfoBlock中,如果我要回调某个指定网络,应该修改的地方是?

8 个回复