Modules#
throughput_peripheral_characteristic_t
throughput_peripheral_characteristic_found_t
Throughput Test Transmitter (Peripheral) Role API#
Throughput Test Transmitter (Peripheral) Role API acts as a server and accepts connection from Throughput Test Receivers (Central) Role clients. It sends out data via notifications or indications to a registered Central node. Throughput parameters can be managed using the API calls or via CLI. The API provides interface for configuring, starting and stopping transmission. Status and result callbacks can be also registered using the API.
Functions#
Macros#
Function Documentation#
throughput_peripheral_enable#
void throughput_peripheral_enable (void )
N/A |
Enables the transmission.
70
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_disable#
sl_status_t throughput_peripheral_disable (void )
N/A |
Disables the transmission.
75
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_set_mode#
sl_status_t throughput_peripheral_set_mode (throughput_mode_t mode, uint32_t amount)
[in] | mode | the transmission mode is either of:
|
[in] | amount | the time in ms or data in bytes to transfer |
Sets the the transmission mode. Returns
status of the operation
86
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_set_data_size#
sl_status_t throughput_peripheral_set_data_size (uint8_t mtu, uint8_t ind_data, uint8_t not_data)
[in] | mtu | MTU size in bytes |
[in] | ind_data | indication data size (1-MTU-3) |
[in] | not_data | notification data size (1-MTU-3) |
Sets the the transmission sizes. Returns
status of the operation
96
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_set_tx_power#
sl_status_t throughput_peripheral_set_tx_power (throughput_tx_power_t tx_power, bool power_control, bool deep_sleep)
[in] | tx_power | requested TX power in dBm |
[in] | power_control | enable adaptive power control |
[in] | deep_sleep | enable deep sleep during test |
Sets the transmission power. Returns
status of the operation
107
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_start#
sl_status_t throughput_peripheral_start (throughput_notification_t type)
[in] | type | type of the test (notification or indication) |
Starts the the transmission. Returns
status of the operation
116
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_stop#
sl_status_t throughput_peripheral_stop (void )
N/A |
Stops the transmission. Returns
status of the operation
122
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_on_bt_event#
void throughput_peripheral_on_bt_event (sl_bt_msg_t * evt)
[in] | evt | Event coming from the Bluetooth stack. |
Bluetooth stack event handler.
128
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_step#
void throughput_peripheral_step (void )
N/A |
Process step for throughput peripheral.
133
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_sleep_on_isr_exit#
sl_power_manager_on_isr_exit_t throughput_peripheral_sleep_on_isr_exit (void )
N/A |
Routine for power manager handler Returns
SL_POWER_MANAGER_WAKEUP if the test has been started
139
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_is_ok_to_sleep#
bool throughput_peripheral_is_ok_to_sleep (void )
N/A |
Checks if it is ok to sleep now Returns
false if the test has been started
145
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_on_role_set#
void throughput_peripheral_on_role_set (throughput_role_t role)
[in] | role | the role can be only THROUGHPUT_ROLE_PERIPHERAL |
Callback to handle role settings. Note
To be implemented in user code.
156
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_on_state_change#
void throughput_peripheral_on_state_change (throughput_state_t state)
[in] | state | current state |
Callback to handle state change. Note
To be implemented in user code.
163
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_on_mode_change#
void throughput_peripheral_on_mode_change (throughput_mode_t mode)
[in] | mode | current mode |
Callback to handle mode change. Note
To be implemented in user code.
170
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_on_start#
void throughput_peripheral_on_start (void )
N/A |
Callback to handle transmission start event. Note
To be implemented in user code.
176
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_on_finish#
void throughput_peripheral_on_finish (throughput_value_t throughput, throughput_count_t count)
[in] | throughput | throughput value in bits/second (bps) |
[in] | count | data volume transmitted, in bytes |
Callback to handle transmission finished event. Note
To be implemented in user code.
184
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_on_finish_reception#
void throughput_peripheral_on_finish_reception (throughput_value_t throughput, throughput_count_t count, throughput_count_t lost, throughput_count_t error, throughput_time_t time)
[in] | throughput | throughput value in bits/second (bps) |
[in] | count | data volume received, in bytes |
[in] | lost | number of packets lost |
[in] | error | number of wrong packets |
[in] | time | total measurement time |
Callback to handle reception finished event. Note
To be implemented in user code.
196
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_on_power_change#
void throughput_peripheral_on_power_change (throughput_tx_power_t power)
[in] | power | TX power in dBm |
Callback to handle TX power changed event. Note
To be implemented in user code.
207
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_on_rssi_change#
void throughput_peripheral_on_rssi_change (throughput_rssi_t rssi)
[in] | rssi | RSSI value |
Callback to handle RSSI changed event. Note
To be implemented in user code.
214
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_on_phy_change#
void throughput_peripheral_on_phy_change (throughput_phy_t phy)
[in] | phy | PHY that is in use |
Callback to handle phy changed event. Note
To be implemented in user code.
221
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_on_connection_settings_change#
void throughput_peripheral_on_connection_settings_change (throughput_time_t interval, throughput_pdu_size_t pdu, throughput_mtu_size_t mtu, throughput_data_size_t data)
[in] | interval | connection interval |
[in] | pdu | PDU size in bytes |
[in] | mtu | MTU size in bytes |
[in] | data | data size in bytes |
Callback to handle connection settings changes. Note
To be implemented in user code.
231
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_on_notification_change#
void throughput_peripheral_on_notification_change (throughput_notification_t notification)
[in] | notification | notification status |
Callback to handle notification changed event. Note
To be implemented in user code.
241
of file common/throughput_peripheral/throughput_peripheral.h
throughput_peripheral_on_indication_change#
void throughput_peripheral_on_indication_change (throughput_notification_t indication)
[in] | indication | indication status |
Callback to handle indication changed event. Note
To be implemented in user code.
248
of file common/throughput_peripheral/throughput_peripheral.h
Macro Definition Documentation#
THROUGHPUT_PERIPHERAL_MODE_DEFAULT#
#define THROUGHPUT_PERIPHERAL_MODE_DEFAULTValue:
THROUGHPUT_MODE_CONTINUOUS
20
of file common/throughput_peripheral/config/throughput_peripheral_config.h
THROUGHPUT_PERIPHERAL_FIXED_DATA_SIZE#
#define THROUGHPUT_PERIPHERAL_FIXED_DATA_SIZEValue:
100000
24
of file common/throughput_peripheral/config/throughput_peripheral_config.h
THROUGHPUT_PERIPHERAL_FIXED_TIME#
#define THROUGHPUT_PERIPHERAL_FIXED_TIMEValue:
10000
28
of file common/throughput_peripheral/config/throughput_peripheral_config.h
THROUGHPUT_PERIPHERAL_TX_POWER#
#define THROUGHPUT_PERIPHERAL_TX_POWERValue:
10
36
of file common/throughput_peripheral/config/throughput_peripheral_config.h
THROUGHPUT_PERIPHERAL_TX_POWER_CONTROL_ENABLE#
#define THROUGHPUT_PERIPHERAL_TX_POWER_CONTROL_ENABLEValue:
0
40
of file common/throughput_peripheral/config/throughput_peripheral_config.h
THROUGHPUT_PERIPHERAL_TX_SLEEP_ENABLE#
#define THROUGHPUT_PERIPHERAL_TX_SLEEP_ENABLEValue:
0
44
of file common/throughput_peripheral/config/throughput_peripheral_config.h
THROUGHPUT_PERIPHERAL_MTU_SIZE#
#define THROUGHPUT_PERIPHERAL_MTU_SIZEValue:
247
52
of file common/throughput_peripheral/config/throughput_peripheral_config.h
THROUGHPUT_PERIPHERAL_DATA_TRANSFER_SIZE_INDICATIONS#
#define THROUGHPUT_PERIPHERAL_DATA_TRANSFER_SIZE_INDICATIONSValue:
0
57
of file common/throughput_peripheral/config/throughput_peripheral_config.h
THROUGHPUT_PERIPHERAL_DATA_TRANSFER_SIZE_NOTIFICATIONS#
#define THROUGHPUT_PERIPHERAL_DATA_TRANSFER_SIZE_NOTIFICATIONSValue:
0
61
of file common/throughput_peripheral/config/throughput_peripheral_config.h
THROUGHPUT_PERIPHERAL_CHARACTERISTICS_ALL#
#define THROUGHPUT_PERIPHERAL_CHARACTERISTICS_ALLValue:
0x07
44
of file common/throughput_peripheral/throughput_peripheral.h