ZCL library  4.3
ZCL library to manage a Zigbee network
ZIEEEAddress Class Reference

This class defines the IEEE address. More...

#include <ZIEEEAddress.h>

List of all members.

Public Member Functions

 ZIEEEAddress ()
 Constructor.
 ZIEEEAddress (byte addr[IEEE_ADDR_LEN])
 Constructor from an array of bytes.
 ZIEEEAddress (const byte addr[IEEE_ADDR_LEN])
 Constructor from an array of bytes.
 ZIEEEAddress (const std::string &ieeeAddr)
 Constructor from a String.
 ZIEEEAddress (const ZIEEEAddress &other)
 Redefinition of the copy-Constructor.
virtual ~ZIEEEAddress ()
 Destructor.
ZIEEEAddressoperator= (const ZIEEEAddress &other)
 Redefinition of the affectation Operator.
bool isValid () const
 Return true if this IEEE address is valid (i.e.
bool equals (const ZIEEEAddress &addr) const
 Return true if the IEEE address passed as parameter is equal to this one.
const byte * toBytes () const
 Return this IEEE address as an array of bytes.
std::string toSmallString () const
 Return this IEEE address as a String AABBCCDDEEFFGGHH.
std::string toString () const
 Return this IEEE address as a String AA-BB-CC-DD-EE-FF-GG-HH.

Static Public Attributes

static byte NULL_ADDR [IEEE_ADDR_LEN]
 Constant to define a Null IEEE address = 00-00-00-00-00-00-00-00.
static byte INVALID_ADDR [IEEE_ADDR_LEN]
 Constant to define an Unknown IEEE address = FF-FF-FF-FF-FF-FF-FF-FF.

Related Functions

(Note that these are not member functions.)

#define IEEE_ADDR_LEN   8

Detailed Description

This class defines the IEEE address.


Constructor & Destructor Documentation

ZIEEEAddress::ZIEEEAddress ( byte  addr[IEEE_ADDR_LEN])

Constructor from an array of bytes.

Parameters:
addrthe IEEE address as array of bytes.
ZIEEEAddress::ZIEEEAddress ( const byte  addr[IEEE_ADDR_LEN])

Constructor from an array of bytes.

Parameters:
addrthe IEEE address as array of bytes.
ZIEEEAddress::ZIEEEAddress ( const std::string &  ieeeAddr) [explicit]

Constructor from a String.

String format of IEEE address is either 10-00-00-50-C2-36-6B-11 or 10000050C2366B11

Parameters:
ieeeAddrthe IEEE address as String.

Member Function Documentation

bool ZIEEEAddress::equals ( const ZIEEEAddress addr) const

Return true if the IEEE address passed as parameter is equal to this one.

Parameters:
addrthe IEEE address to be compared.
Returns:
true if equal, otherwise false.
bool ZIEEEAddress::isValid ( ) const

Return true if this IEEE address is valid (i.e.

not equals to NULL_ADDR or INVALID_ADDR).

Returns:
true if this IEEE address is valid.
const byte* ZIEEEAddress::toBytes ( ) const

Return this IEEE address as an array of bytes.

Returns:
the array of bytes.
std::string ZIEEEAddress::toSmallString ( ) const

Return this IEEE address as a String AABBCCDDEEFFGGHH.

Returns:
the IEEE address as a String AABBCCDDEEFFGGHH.
std::string ZIEEEAddress::toString ( ) const

Return this IEEE address as a String AA-BB-CC-DD-EE-FF-GG-HH.

Returns:
the IEEE address as a String AA-BB-CC-DD-EE-FF-GG-HH.

Friends And Related Function Documentation

#define IEEE_ADDR_LEN   8 [related]

the size in bytes of IEEE address.


The documentation for this class was generated from the following file: