nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ at_parser_string_ptr_get()

int at_parser_string_ptr_get ( struct at_parser parser,
size_t  index,
const char **  str_ptr,
size_t *  len 
)

#include <include/modem/at_parser.h>

Get a pointer to a string value.

The data type must be a string (quoted or non-quoted), an AT command prefix, or an array, otherwise an error is returned.

Parameters
[in]parserAT parser.
[in]indexIndex in the current AT command line configured in parser.
[out]str_ptrPointer to the address of the string.
[out]lenLength of the string.
Return values
0If the operation was successful. Otherwise, a (negative) error code is returned.
-EINVALOne or more of the supplied parameters are invalid.
-EPERMparser has not been initialized.
-EOPNOTSUPPOperation not supported for the subparameter type at the given index.
-EBADMSGThe AT command string is malformed.
-EAGAINParsing of the current AT command line is terminated and a subsequent line is available. Returned when index is greater than the maximum index for the current AT command line.
-EIOThere is nothing more to parse in the AT command string configured in parser. Returned when index is greater than the maximum index for the current AT command line.