Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
Blacklisting functions

Blacklisting functions for filtering out confirms and indications relating to blocked devices. More...

Collaboration diagram for Blacklisting functions:

Functions

ca_error BLACKLIST_Add (struct MacAddr *pAddress, struct ca821x_dev *pDeviceRef)
 Add an address to the blacklist. More...
 
void BLACKLIST_Clear (struct ca821x_dev *pDeviceRef)
 Clear the entire blacklist. More...
 

Detailed Description

Blacklisting functions for filtering out confirms and indications relating to blocked devices.

Function Documentation

◆ BLACKLIST_Add()

ca_error BLACKLIST_Add ( struct MacAddr pAddress,
struct ca821x_dev pDeviceRef 
)

Add an address to the blacklist.

Indications from this address. will be filtered out by the API.

The blacklist works with both short and extended addresses. CASCODA_MAC_BLACKLIST must be set within the CMake config for this to have any effect. If it is 0, this function will return CA_ERROR_FAIL without blacklisting anything.

The filtering occurs above the MAC layer, and it does not affect ACK processing. Consequently, requests sent by a blacklisted device will appear successful, which is not what would happen if the devices were out of range of each other.

Parameters
pAddressPointer to the address that will be added to the blacklist. AddressMode must be MAC_MODE_SHORT_ADDR or MAC_MODE_LONG_ADDR. The PanId field is ignored.
pDeviceRefPointer to the device that will blacklist the given address
Returns
ca_error One of the following values of the Cascoda error type
Return values
CA_ERROR_SUCCESSif the address was successfully added
CA_ERROR_NO_BUFFERif there is no more room in the blacklist
CA_ERROR_INVALID_ARGSif AddressMode contains an invalid value
CA_ERROR_FAILif blacklisting is disabled within the CMake configuration

◆ BLACKLIST_Clear()

void BLACKLIST_Clear ( struct ca821x_dev pDeviceRef)

Clear the entire blacklist.

When called, this function deletes every entry within the blacklist. If CASCODA_MAC_BLACKLIST is set to 0, this function will have no effect, as the API is already not filtering any indications.

Parameters
pDeviceRefPointer to the device that will clear its blacklist.