nRF Connect SDK API 2.8.99
|
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.
[in] | parser | AT parser. |
[in] | index | Index in the current AT command line configured in parser . |
[out] | str_ptr | Pointer to the address of the string. |
[out] | len | Length of the string. |
0 | If the operation was successful. Otherwise, a (negative) error code is returned. |
-EINVAL | One or more of the supplied parameters are invalid. |
-EPERM | parser has not been initialized. |
-EOPNOTSUPP | Operation not supported for the subparameter type at the given index. |
-EBADMSG | The AT command string is malformed. |
-EAGAIN | Parsing 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. |
-EIO | There 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. |