Adding SourceMatchController class. (#1559)

This commit adds a new class `SourceMatchController` which
contains all (existing) logic to maintain the source match table
and control when/how to enable or disable the source matching
feature.

It also updates `Child` class by changing the access level of
member variables related to the source matching feature (e.g.,
number of indirect queued messages) to private to ensure that
they are only modified by the new `SourceMatchController` class
while providing simple getter methods for use by other classes.

The changes in this commit also address two corner-case issues
related to source address matching feature:

- First issue where we could possibly enable the source address
  matching after successfully adding a short address while still
  having remaining pending entries.

- Second issue where an entry would not be added properly from a
  `SetSrcMatchAsShort()` call for a child, if there were more
  than one message queued for the child.
This commit is contained in:
Abtin Keshavarzian
2017-04-07 10:45:36 -07:00
committed by Jonathan Hui
parent 2b40187d3e
commit fbdb812f6a
14 changed files with 530 additions and 290 deletions
+1
View File
@@ -95,6 +95,7 @@ extern "C" {
* @defgroup core-mac MAC
* @defgroup core-mesh-forwarding Mesh Forwarding
* @defgroup core-data-poll-manager Data Poll Manager
* @defgroup core-source-match-controller Source Address Match Controller
* @defgroup core-message Message
* @defgroup core-mle MLE
* @defgroup core-netdata Network Data