deCONZ C++ API v2.6.1
Loading...
Searching...
No Matches
deCONZ::Address Class Reference

Convenience class to work with network, extended and group addresses. More...

#include <aps.h>

Public Member Functions

 Address ()=default
 Constructor.
 
 Address (const Address &other)
 Copy constructor.
 
Addressoperator= (const Address &other)
 Copy assignment constructor.
 
 ~Address ()=default
 Deconstructor.
 
bool isNwkUnicast () const
 Returns true if network address is a unicast address.
 
bool isNwkBroadcast () const
 Returns true if network address is a broadcast address.
 
bool hasNwk () const
 Returns true if network address is set.
 
bool hasExt () const
 Returns true if the extended IEEE aka MAC address is set.
 
bool hasGroup () const
 Returns true if the group address is set.
 
uint16_t nwk () const
 Returns the 16-bit network address.
 
uint64_t ext () const
 Returns 64-bit extended IEEE aka MAC address.
 
uint16_t group () const
 Returns 16-bit group address.
 
void setNwk (uint16_t addr)
 Sets the 16-bit network address which might be a unicast or broadcast address.
 
void setExt (uint64_t addr)
 Sets the 64-bit extended IEEE aka MAC address.
 
void setGroup (uint16_t addr)
 Sets the 16-bit group address.
 
void clear ()
 Clears all address values to 0.
 
API_DEPRECATED QString toStringExt () const
 Returns the exended IEEE address as string in form or 0x001122334455667788.
 
API_DEPRECATED QString toStringNwk () const
 Returns the network address as string in form or 0x0011.
 
API_DEPRECATED QString toStringGroup () const
 Returns the groups address as string in form or 0x0011.
 
API_DEPRECATED bool fromStringExt (const QString &str)
 Returns true if str could be parsed and was set as extended IEEE address.
 
API_DEPRECATED bool fromStringNwk (const QString &str)
 Returns true if str could be parsed and was set as network address.
 
bool operator== (const Address &other) const
 Returns true if nwk(), ext() and group() addresses are equal.
 
bool operator!= (const Address &other) const
 Returns true if nwk(), ext() and group() addresses are not equal.
 

Detailed Description

Convenience class to work with network, extended and group addresses.

Member Function Documentation

◆ fromStringExt()

bool deCONZ::Address::fromStringExt ( const QString &  str)

Returns true if str could be parsed and was set as extended IEEE address.

Parameters
stra string holding a hexadecimal address

◆ fromStringNwk()

bool deCONZ::Address::fromStringNwk ( const QString &  str)

Returns true if str could be parsed and was set as network address.

Parameters
stra string holding a hexadecimal address

◆ operator!=()

bool deCONZ::Address::operator!= ( const Address other) const

Returns true if nwk(), ext() and group() addresses are not equal.

Parameters
otherthe address to compare against

◆ operator==()

bool deCONZ::Address::operator== ( const Address other) const

Returns true if nwk(), ext() and group() addresses are equal.

Parameters
otherthe address to compare against

◆ setExt()

void deCONZ::Address::setExt ( uint64_t  addr)

Sets the 64-bit extended IEEE aka MAC address.

Parameters
addrthe extended IEEE address

◆ setGroup()

void deCONZ::Address::setGroup ( uint16_t  addr)

Sets the 16-bit group address.

Parameters
addrthe group address

◆ setNwk()

void deCONZ::Address::setNwk ( uint16_t  addr)

Sets the 16-bit network address which might be a unicast or broadcast address.

Parameters
addrthe network address

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