yadavkapildev4 / xbee-arduino

Automatically exported from code.google.com/p/xbee-arduino
GNU General Public License v3.0
0 stars 0 forks source link

Comparing operator== for XBeeAddress64 #42

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I need to compare the local address to another XBee address I am receiving. 
It's not a big deal to include, maybe somebody else needs this.

What you can do now is:

XBeeAddress64 addr1, addr2;
[...]
if (addr1 == addr2){ ... }

----- XBee.h (Line 304-305) -----

bool operator==(XBeeAddress64 addr);
bool operator!=(XBeeAddress64 addr);

-----XBee.cpp (Line 1048-1054) -----

bool XBeeAddress64::operator==(XBeeAddress64 addr) {
    return ((_lsb == addr.getLsb()) && (_msb == addr.getMsb()));
}

bool XBeeAddress64::operator!=(XBeeAddress64 addr) {
            return !(*this == addr);
}

Original issue reported on code.google.com by repat...@googlemail.com on 19 Dec 2013 at 3:02

GoogleCodeExporter commented 9 years ago
Thanks for the suggestion. I put in the code. Currently commented out since I 
didn't have time to test

Original comment by andrew.rapp@gmail.com on 2 Feb 2014 at 6:48