The Internet Power Line Adapter - University of Queensland
The Internet Power Line Adapter - University of Queensland
The Internet Power Line Adapter - University of Queensland
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Home Automation, <strong>Power</strong> <strong>Line</strong>s and the <strong>Internet</strong> Quenten Alick<br />
* TRANSMITTER DEVICE and test in<br />
process:<br />
*<br />
* validate "loop back" packet and set<br />
counter accordingly<br />
*/<br />
if<br />
LOOPBACK_PKT) {<br />
(rxLPDU.LSDU[0] ==<br />
responseTimerRunning =<br />
FALSE; /* kill wait timer */<br />
/*<br />
* compare received to transmitted<br />
*/<br />
validCompare = TRUE;<br />
if (( (rxLPDU.LPDUheader &<br />
~SEQUENCE_NO) ==<br />
(txLPDU.LPDUheader<br />
~SEQUENCE_NO) ) &&<br />
(rxLPDU.SA.LSB == 0x02) &&<br />
(rxLPDU.SA.MSB == 0x00) &&<br />
&<br />
(rxLPDU.SHC.LSB<br />
config.systemAddr.LSB) &&<br />
==<br />
(rxLPDU.SHC.MSB<br />
config.systemAddr.MSB) &&<br />
==<br />
(rxLPDU.LPDUlength<br />
txLPDU.LPDUlength) ) {<br />
==<br />
for(i=1;i