Adding MC-NIB support
[ric-app/mc.git] / mc-core / mc / local / dc_release.h
1 #ifndef _DC_RELEASE_H__INCLUDED_
2 #define _DC_RELEASE_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 _dc_release {
27         gs_uint64_t timestamp_ms;
28         gs_sp_t gnb_id;
29         gs_uint32_t id_Old_eNB_UE_X2AP_ID_Extension;
30         gs_int64_t id_New_eNB_UE_X2AP_ID;
31         gs_uint32_t id_SgNB_UE_X2AP_ID;
32         gs_uint32_t id_New_eNB_UE_X2AP_ID_Extension;
33         gs_int64_t id_Old_eNB_UE_X2AP_ID;
34 };
35
36 static inline void init__dc_release(struct _dc_release *m){
37 }
38
39 static inline gs_retval_t get_dc_release__timestamp_ms(struct packet *p, gs_uint64_t *t){
40         *t = ((struct _dc_release *)(p->record.packed.values))->timestamp_ms;
41         return 0;
42 }
43
44 static inline gs_retval_t get_dc_release__gnb_id(struct packet *p, struct gs_string *t){
45 t->data = ((struct _dc_release *)(p->record.packed.values))->gnb_id;
46         t->length = strlen(t->data);
47         t->owner=0;
48         return 0;
49 }
50
51 static inline gs_retval_t get_dc_release__id_Old_eNB_UE_X2AP_ID_Extension(struct packet *p, gs_uint32_t *t){
52         *t = ((struct _dc_release *)(p->record.packed.values))->id_Old_eNB_UE_X2AP_ID_Extension;
53         return 0;
54 }
55
56 static inline gs_retval_t get_dc_release__id_New_eNB_UE_X2AP_ID(struct packet *p, gs_int64_t *t){
57         *t = ((struct _dc_release *)(p->record.packed.values))->id_New_eNB_UE_X2AP_ID;
58         return 0;
59 }
60
61 static inline gs_retval_t get_dc_release__id_SgNB_UE_X2AP_ID(struct packet *p, gs_uint32_t *t){
62         *t = ((struct _dc_release *)(p->record.packed.values))->id_SgNB_UE_X2AP_ID;
63         return 0;
64 }
65
66 static inline gs_retval_t get_dc_release__id_New_eNB_UE_X2AP_ID_Extension(struct packet *p, gs_uint32_t *t){
67         *t = ((struct _dc_release *)(p->record.packed.values))->id_New_eNB_UE_X2AP_ID_Extension;
68         return 0;
69 }
70
71 static inline gs_retval_t get_dc_release__id_Old_eNB_UE_X2AP_ID(struct packet *p, gs_int64_t *t){
72         *t = ((struct _dc_release *)(p->record.packed.values))->id_Old_eNB_UE_X2AP_ID;
73         return 0;
74 }
75
76 #endif