* INTC Contribution to the O-RAN F Release for O-DU Low
[o-du/phy.git] / fhi_lib / app / src / aux_cline.h
1 /******************************************************************************
2 *
3 *   Copyright (c) 2020 Intel.
4 *
5 *   Licensed under the Apache License, Version 2.0 (the "License");
6 *   you may not use this file except in compliance with the License.
7 *   You may obtain a copy of the License at
8 *
9 *       http://www.apache.org/licenses/LICENSE-2.0
10 *
11 *   Unless required by applicable law or agreed to in writing, software
12 *   distributed under the License is distributed on an "AS IS" BASIS,
13 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 *   See the License for the specific language governing permissions and
15 *   limitations under the License.
16 *
17 *******************************************************************************/
18
19 /**
20  * @brief This file has utilities to parse the parameters passed in through the command
21  *        line and configure the application based on these parameters
22  * @file aux_cline.h
23  * @ingroup xran
24  * @author Intel Corporation
25  **/
26
27 #ifndef _AUX_CLINE_H_
28 #define _AUX_CLINE_H_
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #include <stdint.h>
35
36 #define AUX_SUCCESS 0
37 #define AUX_FAILURE 1
38
39 int         cline_init (void);
40 uint32_t    cline_set_int(const char *name, int *value, int deflt);
41 uint32_t    cline_set_uint64(const char *name, uint64_t *value, uint64_t deflt);
42 uint32_t    cline_covert_hex_2_dec(char *pStr, uint64_t *pDst);
43 uint32_t    cline_set_thread_info(const char *name, uint64_t *core, int *priority, int *sched);
44 uint32_t    cline_set_int_array(const char *name, int maxLen, int *dataOut, int *outLen);
45 uint32_t    cline_set_str(const char *name, char *value, const char *deflt);
46 int         cline_parse_line(char *pString);
47 void        cline_print_info(void);
48 uint32_t    cline_get_string(int argc, char *argv[], char* pString, char *pDest);
49
50 #ifdef __cplusplus
51 }
52 #endif
53
54 #endif /*_AUX_CLINE_H_*/
55