Merge "VES PM data for slicing use case. [Issue-Id: ODUHIGH-384]"
[o-du/l2.git] / src / o1 / ConfigInterface.h
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2020] [HCL Technologies Ltd.]                               #
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 /* This file contains C interface for ODU and stubs to get startup
20    configuration
21 */
22
23 #ifndef __CONFIG_INTERFACE_H__
24 #define __CONFIG_INTERFACE_H__
25
26 #include <stdint.h>
27 #include <CommonMessages.h>
28
29 #define IPV4_LEN 16
30 #define PORT_LEN 10
31
32 #ifdef __cplusplus
33 extern "C"
34 {
35 #endif
36
37 typedef struct
38 {
39    char DU_IPV4_Addr[IPV4_LEN];
40    char CU_IPV4_Addr[IPV4_LEN];
41    char RIC_IPV4_Addr[IPV4_LEN];
42    uint16_t CU_Port;
43    uint16_t DU_Port;
44    uint16_t RIC_Port;
45 }StartupConfig;
46
47 typedef enum {
48    INACTIVE,
49    ACTIVE,
50    IDLE
51 }CellState;
52
53 typedef enum {
54    DISABLED,
55    ENABLED
56 }OpState;
57
58
59 uint8_t getStartupConfig(StartupConfig *cfg);
60 uint8_t getStartupConfigForStub(StartupConfig *cfg);
61 bool setCellOpState(uint16_t cellId, OpState opState, \
62                              CellState cellState);
63
64 #ifndef ODU_TEST_STUB
65 //Defined in odu high
66 bool bringCellUp(uint16_t cellId);
67 bool bringCellDown(uint16_t cellId);
68 #endif //ODU_TEST_STUB
69 #ifdef __cplusplus
70 }
71 #endif
72
73 #endif
74
75 /**********************************************************************
76          End of file
77 **********************************************************************/