nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
helpers.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef HELPERS_H__
8#define HELPERS_H__
9
10#include <string.h>
11#include <stdio.h>
12#include <zephyr/kernel.h>
13#include <zephyr/types.h>
14#include <modem/at_parser.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20/* Converts integer as string to integer type. */
21int string_to_int(const char *str_buf, int base, int *output);
22
23/* Converts integer on string format to integer type. */
24int string_param_to_int(struct at_parser *parser, size_t idx, int *output, int base);
25
26/* Converts PLMN string to integer type MCC and MNC. */
27int plmn_param_string_to_mcc_mnc(struct at_parser *parser, size_t idx, int *mcc, int *mnc);
28
29#ifdef __cplusplus
30}
31#endif
32
33#endif /* HELPERS_H__ */
int string_to_int(const char *str_buf, int base, int *output)
int string_param_to_int(struct at_parser *parser, size_t idx, int *output, int base)
int plmn_param_string_to_mcc_mnc(struct at_parser *parser, size_t idx, int *mcc, int *mnc)
AT parser.
Definition at_parser.h:45
Set of parser variables needed for parser framework to operate.
Definition parser.h:55