Download - All IT eBooks

Transcript
234
INSPIRE
conPrintROMString("Max Rejoins
failed, trying to join \n"};
rfdState = RFD STATE JOIN NETWORK;
}
else
{
//else, wait to try again
conPrintROMString("Network
Rejoin FAILED!
Waiting, then trying again\n");
//most apps probably
// do not need to
//wait before retrying
//rejoin, this is included
// just for visibility
//purposes in reading the output
my timer = halGetMACTimer();
//wait for 2 seconds
while( (halMACTimerNowDelta(my timer))
< MSECS TO MACTICKS(2 * 1000) );
rfdState = RFD STATE REJOIN NETWORK;
}
}
break;
#endif
default:
rfdState = RFD STATE JOIN NETWORK;
}
}
#else
aplFormNetwork();
//wait for finish
while( apsBusy() )
{
apsFSM();
}
conPrintROMString("Network formed,
waiting for RX\n");
EVB LED1 NO;
//coordinator or router just runs the stack
while( 1 )
{
apsFSM();
}
#endif
}