Multicast group management implementation.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "sysConfig.h"
Macros | |
#define | NWK_GROUP_FREE 0xffff |
Functions | |
bool | NWK_GroupAdd (uint16_t group) |
Adds node to the group. More... | |
bool | NWK_GroupIsMember (uint16_t group) |
Verifies if node is a member of the group. More... | |
bool | NWK_GroupRemove (uint16_t group) |
Removes node from the group. More... | |
void | nwkGroupInit (void) |
Initializes the Group module. More... | |
static bool | nwkGroupSwitch (uint16_t from, uint16_t to) |
Switches records with IDs from and to in the the group table. More... | |
Variables | |
static uint16_t | nwkGroups [NWK_GROUPS_AMOUNT] |
#define NWK_GROUP_FREE 0xffff |
Referenced by NWK_GroupAdd(), NWK_GroupRemove(), and nwkGroupInit().
bool NWK_GroupAdd | ( | uint16_t | group | ) |
Adds node to the group.
[in] | group | Group ID |
true
in case of success and false
otherwise References NWK_GROUP_FREE, and nwkGroupSwitch().
Referenced by appCommandReceived().
bool NWK_GroupIsMember | ( | uint16_t | group | ) |
Verifies if node is a member of the group.
[in] | group | Group ID |
true
if node is a member of the group and false
otherwise References NWK_GROUPS_AMOUNT, and nwkGroups.
Referenced by nwkRouteDiscoveryRequestReceived(), nwkRoutePrepareTx(), and nwkRxHandleReceivedFrame().
bool NWK_GroupRemove | ( | uint16_t | group | ) |
Removes node from the group.
[in] | group | Group ID |
true
in case of success and false
otherwise References NWK_GROUP_FREE, and nwkGroupSwitch().
Referenced by appCommandReceived().
void nwkGroupInit | ( | void | ) |
Initializes the Group module.
References NWK_GROUP_FREE, NWK_GROUPS_AMOUNT, and nwkGroups.
Referenced by NWK_Init().
|
static |
Switches records with IDs from and to in the the group table.
[in] | from | Source group ID |
[in] | to | Destination group ID |
true
if from entry was found and false
otherwise References NWK_GROUPS_AMOUNT, and nwkGroups.
Referenced by NWK_GroupAdd(), and NWK_GroupRemove().
|
static |
Referenced by NWK_GroupIsMember(), nwkGroupInit(), and nwkGroupSwitch().