Joining and leaving the network.
Once the RCM radio module is configured, what we want to do is to allow it to connect to a network, or establish a new network in case of a coordinator device. To do that we simply call rcm::Connection::startNetworking method. The returned value will tell us, whether we have joined (or established) the network successfully or not.
Complementary, in order to disconnect from the network, we can call rcm::Connection::stopNetworking method.
We can always call the rcm::Connection::getNetworkState method to determine the actual networking state.
The following example illustrates how to establish the network:
Addressing network nodes.
The remote nodes can be addressed using 64-bit unique ID (UID) or 16-bit short network address. Sometimes it is feasible to convert one address to another, which generally requires communication with the node using one address and asking it for the other, unless such information is already cached in the RCM stack. To perform such action two functions are provided: rcm::Connection::getUIDFromNwkShortAddress and rcm::Connection::getNwkShortAddressFromUID.
The following example illustrates such usage:
Generated on Thu Feb 22 2018 13:14:54 for RCM API C++ Library by 184.108.40.206