Throughput Library#
Throughput Library Commands#
Command | Command Description | Name | Type | Description |
---|---|---|---|---|
plugin throughput start | Start the throughput test | - | - | - |
plugin throughput stop | Abort the test while running | - | - | - |
plugin throughput print-result | Show the results of the last test | - | - | - |
plugin throughput set-destination | Set the destination nodeId | nodeId | INT16U | Destination nodeId |
plugin throughput set-interval | Set the interval | interval | INT16U | Interval in ms |
plugin throughput set-timeout | Set the test timeout | timeout | INT32U | Timeout in ms |
plugin throughput set-count | Set the number of packets to send | count | INT16U | Packets to send |
plugin throughput set-inflight | Set the number of packets in flight during the test | inflight_count | INT8U | Packets in flight |
plugin throughput set-packet-size | Set the packet length | packet | INT8U | Packet length in bytes |
plugin throughput set-all | Set the NodeID | nodeId | INT16U | Destination nodeId |
plugin throughput set-all | Set the Count | count | INT16U | Packets to send |
plugin throughput set-all | Set the Interval | interval | INT16U | Interval in ms |
plugin throughput set-all | Set the Packet Length | packet | INT8U | Packet length in bytes |
plugin throughput set-all | Set the Max In-Flight | inflight_count | INT8U | Packets in flight |
plugin throughput set-all | Set the APS Options | apsOptions | INT16U | APS Options |
plugin throughput set-all | Set the Test Timeout | timeout | INT32U | Timeout in ms |
plugin throughput set-aps-ack-off | Turn off APS acks | - | - | - |
plugin throughput set-aps-ack-on | Turn on APS acks | - | - | - |
plugin throughput print-parameters | Print all the test parameters | - | - | - |
plugin throughput print-counters | Print the stack counters | - | - | - |
plugin throughput clear-counters | Clear all the stack counters | - | - | - |
Using the Throughput Library#
To begin using the throughput library, the required parameters must be defined. The simplest way to achieve this is by using the command plugin throughput set-all <parameters>. Details regarding the command and order of parameters can be found in Throughput Library Commands.
A sample command is plugin throughput set-all \<0xNodeID\> 10 0 127 1 0 100000
, where NodeID
must be defined as the nodeID of the receiving node, typed as a hex number. Note that, to achieve maximum throughput, set the interval field to 0.
To print the parameters currently set, use the command plugin throughput print-parameters. This returns the parameters currently defined, in the following format:
TEST PARAMETERS
Destination nodeID: 0x1234
Packets to send: 10
Transmit interval: 0 ms
Payload size: 77B
Packet size: 127B
Packets in flight: 1
APS Options = 0x0000
Timeout: 100000 ms
To start the throughput process, use the command plugin throughput start
. This starts sending packets to the other device. To stop the test during the run, use the command plugin throughput stop
. Once the test is complete, you can print the results using plugin throughput print-result
. This produces the results of the most recent run, in the following format:
THROUGHPUT RESULTS
Total time 96 ms
Success messages: 10 out of 10
Payload Throughput: 64166 bits/s
Phy Throughput: 105833 bits/s
Min packet send time: 6 ms
Max packet send time: 8 ms
Avg packet send time: 6 ms
STD packet send time: 2 ms
The throughput is calculated by dividing the total number of bits sent by the total time.
For Phy Throughput:
For Payload Throughput:
The throughput component/plugin also tracks some counters to provide visibility and help with debugging purposes. Use plugin throughput print-counters
. The results are produced in the following format:
COUNTERS
CCA Failures: 0
Mac Tx Ucast: 10
Mac Tx Ucast Retry: 0
Mac Tx Ucast Fail: 0
APS Tx Ucast Success: 10
APS Tx Ucast Retry: 0
APS Tx Ucast Fail: 0
Details regarding the MAC and APS stack counters can be found in Zigbee and OpenThread Coexistence with Wi-Fi and are also documented in the stack API documentation.