Wirepas SDK
waddr.h File Reference

Detailed Description

Address mapping between internal and external addresses

Note
Size of w_addr_t is defined in waps_frames.
Waddr has valid ranges of: 0x0000 0000 (legacy any sink address, avoid using this) 0x0000 0001 - 0x7FFF FFFF (unicast address) 0x8000 0000 - 0x80FF FFFD (multicast address) 0x8100 0000 - 0xFFFF FFFD (unicast address) 0xFFFF FFFE (any sink address) 0xFFFF FFFF (broadcast address)

Definition in file waddr.h.

Go to the source code of this file.

Functions

app_addr_t Waddr_to_Addr (w_addr_t waddr)
 Convert address from WAPS to APP domain. More...
 
w_addr_t Addr_to_Waddr (app_addr_t app_addr)
 Convert address from APP to WAPS domain. More...
 

Macros

#define WADDR_BCAST   (w_addr_t)(-1)
 
#define WADDR_ANYSINK   (w_addr_t)(-2)
 
#define WADDR_UCAST_MAX   (w_addr_t)(-3)
 
#define WADDR_MULTICAST   (w_addr_t)(0x80000000)
 

Function Documentation

◆ Addr_to_Waddr()

w_addr_t Addr_to_Waddr ( app_addr_t  app_addr)

Convert address from APP to WAPS domain.

Parameters
app_addrApplication address to convert
Returns
Converted address value

◆ Waddr_to_Addr()

app_addr_t Waddr_to_Addr ( w_addr_t  waddr)

Convert address from WAPS to APP domain.

Parameters
waddrWaps address to convert
Returns
Converted address value

Macro Definition Documentation

◆ WADDR_ANYSINK

#define WADDR_ANYSINK   (w_addr_t)(-2)

Any sink symbol

Definition at line 31 of file waddr.h.

◆ WADDR_BCAST

#define WADDR_BCAST   (w_addr_t)(-1)

Broadcast address symbol

Definition at line 28 of file waddr.h.

◆ WADDR_MULTICAST

#define WADDR_MULTICAST   (w_addr_t)(0x80000000)

Multicast bit for address

Definition at line 37 of file waddr.h.

◆ WADDR_UCAST_MAX

#define WADDR_UCAST_MAX   (w_addr_t)(-3)

Highest valid unicast node address for a device

Definition at line 34 of file waddr.h.