The RCM C++ library provides functions for performance testing featuring:
- output power test
- packet error rate (PER) measurement
Output power test.
The output power test is provided to easily measure the amount of power the radio module is configured to deliver.
In order to enable output power test, the device needs to be configured as a network coordinator and it needs to join (in this case - establish) the network. Once this is done, the application code can call rcm::Connection::startContinuousTX method, which causes the module to continuously output a radio signal.
BEWARE: Enabling continuous radio signal can jam other radio devices in range. This mode must be used with caution and only for evaluation purposes.
The following example illustrates the usage of output power test:
Packet error rate (PER) measurement.
The packet error rate measurement is useful for characterizing a single radio link. Two devices are required to conduct a PER measurement. One device is configured as a network coordinator, the other one as a router. Once the router joins the network established by the coordinator, the PER test can start. During the test, the router sends a number of packets to the coordinator. When this is done, the router can request the PER test results from the coordinator. Each test is identified by a 32-bit unique identifier, that is chosen randomly.
During the PER test, a router is the source of packets. it thus needs to be configured to start the test. The rcm::Connection::startPERTest method starts the PER test and causes the router to send packets to the coordinator. The rcm::Connection::waitForPERTestEnd method can block the calling thread, until the test is finished . The rcm::Connection::getPERTestResultFromRemoteNode method can be used by the router to retrieve PER test results from the coordinator. In addition, the rcm::Connection::setPERTestHandler method allows to register an user-defined object, that will handle every incoming PER test progress information, that is reported from the radio module. It can be used to monitor the progress of the test.
The following example illustrates the usage of PER test on the router:
In case of the coordinator, which is a PER test receiver, no additional configuration or setup is necessary for the PER test to run. One optional thing is the use of rcm::Connection::setPERTestHandler, which the same as in the case of the router allows to register a handler that will be called every time the PER test progress information is reported from the radio module.
The following example illustrates the usage of PER test on the coordinator:
Generated on Thu Feb 22 2018 13:14:54 for RCM API C++ Library by 184.108.40.206