几种入网模式有什么区别?
MODE_JOIN,
MODE_RESUME,
//MODE_SOFT, // Not supported yet
MODE_HARD,
MODE_REJOIN
这几种入网模式有什么区别?特别是 MODE_RESUME和 MODE_REJOIN
这几个模式的意思我已经了解,那么下面摘取的函数中貌似并不是恢复原先的网络,而是以孤立节点的方式入网?
else if ( startMode == MODE_RESUME )
{
if ( logicalType == NODETYPE_ROUTER )
{
ZMacScanCnf_t scanCnf;
devState = DEV_NWK_ORPHAN;
/* if router and nvram is available, fake successful orphan scan */
scanCnf.hdr.Status = ZSUCCESS;
scanCnf.ScanType = ZMAC_ORPHAN_SCAN;
scanCnf.UnscannedChannels = 0;
scanCnf.ResultListSize = 0;
nwk_ScanJoiningOrphan(&scanCnf);
ret = ZSuccess;
}
else
{
devState = DEV_NWK_ORPHAN;
ret = NLME_OrphanJoinRequest( zgDefaultChannelList,
zgDefaultStartingScanDuration );
}
}
论坛有类似问题,解答请看这边: http://www.deyisupport.com/question_answer/wireless_connectivity/zigbee/f/104/t/69324.aspx