Many times it is required to know what nodes are in the network - not only in the nearest neighborhood but in the entire reachable network. To provide this information RCM radio modules periodically send to the coordinator a list of all nearest neighbors that they know about. This mechanism is called neighbor indication.
It is possible to control the neighborhood indication interval as well as to disable it completely. The rcm::Connection::setNeighborhoodIndicationInterval method serves this purpose. The complementary method rcm::Connection::getNeighborhoodIndicationInterval allows to retrieve the currently set value of indication interval.
Once the neighborhood interval was configured, the node starts to send neighborhood indication messages to the coordinator. Based on this information, the coordinator maintains a complete network map. This map is available through a call to rcm::Connection::getNetworkMapSnapshot method, which produces a snapshot of the current network state and provides it by returning a reference to the internally managed rcm::NetworkMap object.
The rcm::NetworkMap object holds a list of rcm::NetworkNeighbor objects. Each rcm::NetworkNode object represents a single node in the network. The rcm::NetworkMap::getNodeCount returns the total number of nodes that the map is aware of. The rcm::NetworkMap::getNode allows to access a single node. In addition Each rcm::NetworkNode object holds a list of his neighbors, that can be accessed using rcm::NetworkNode::getNeighborCount and rcm::NetworkNode::getNeighbor.
The following example illustrates how to use the network map:
Generated on Thu Feb 22 2018 13:14:54 for RCM API C++ Library by 126.96.36.199