nrfxlib API 2.7.99
Loading...
Searching...
No Matches

◆ nrf_modem_trace_get()

int nrf_modem_trace_get ( struct nrf_modem_trace_data **  frags,
size_t *  n_frags,
int  timeout 
)

#include <nrf_modem/include/nrf_modem_trace.h>

Get trace data.

The application may call this function to receive trace data from the modem. The trace fragments must be processed in order from the start of the array. Processed data must be freed by calling nrf_modem_trace_processed.

Parameters
[out]fragsOn success, *frags is an array of trace data fragments.
[out]n_fragsOn success, *n_frags is the number of fragments in the *frags array.
[in]timeoutTime to wait in milliseconds for trace data to become available or one of the special values NRF_MODEM_OS_FOREVER or NRF_MODEM_OS_NO_WAIT.
Return values
0on success.
-NRF_EFAULTIf frags or nfrags is NULL.
-NRF_EINPROGRESSTrace is already being processed by the application.
-NRF_ENODATANo more trace data is available until the modem is restarted.
-NRF_ESHUTDOWNModem was shut down.
-NRF_EAGAINIf the request timed out.
-NRF_ENOTSUPModem is not configured for trace output.