Initial commit of mc-core part of mc xApp codebase
[ric-app/mc.git] / mc-core / mc / local / sgnb_mod_conf.h
1 #ifndef _SGNB_MOD_CONF_H__INCLUDED_
2 #define _SGNB_MOD_CONF_H__INCLUDED_
3
4 /*
5 ==============================================================================
6
7         Copyright (c) 2018-2019 AT&T Intellectual Property.
8
9    Licensed under the Apache License, Version 2.0 (the "License");
10    you may not use this file except in compliance with the License.
11    You may obtain a copy of the License at
12
13        http://www.apache.org/licenses/LICENSE-2.0
14
15    Unless required by applicable law or agreed to in writing, software
16    distributed under the License is distributed on an "AS IS" BASIS,
17    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18    See the License for the specific language governing permissions and
19    limitations under the License.
20 =============================================================================
21 */
22
23
24 #include "packet.h"
25
26 struct _sgnb_mod_conf {
27         gs_uint64_t timestamp_ms;
28         gs_sp_t gnb_id;
29         gs_int64_t id_MeNB_UE_X2AP_ID;
30         gs_int64_t id_SgNB_UE_X2AP_ID;
31 };
32
33 static inline void init__sgnb_mod_conf(struct _sgnb_mod_conf *m){
34 }
35
36 static inline gs_retval_t get_sgnb_mod_conf__timestamp_ms(struct packet *p, gs_uint64_t *t){
37         *t = ((struct _sgnb_mod_conf *)(p->record.packed.values))->timestamp_ms;
38         return 0;
39 }
40
41 static inline gs_retval_t get_sgnb_mod_conf__gnb_id(struct packet *p, struct gs_string *t){
42 t->data = ((struct _sgnb_mod_conf *)(p->record.packed.values))->gnb_id;
43         t->length = strlen(t->data);
44         t->owner=0;
45         return 0;
46 }
47
48 static inline gs_retval_t get_sgnb_mod_conf__id_MeNB_UE_X2AP_ID(struct packet *p, gs_int64_t *t){
49         *t = ((struct _sgnb_mod_conf *)(p->record.packed.values))->id_MeNB_UE_X2AP_ID;
50         return 0;
51 }
52
53 static inline gs_retval_t get_sgnb_mod_conf__id_SgNB_UE_X2AP_ID(struct packet *p, gs_int64_t *t){
54         *t = ((struct _sgnb_mod_conf *)(p->record.packed.values))->id_SgNB_UE_X2AP_ID;
55         return 0;
56 }
57
58 #endif