Support for additional NR metrics
[ric-app/mc.git] / mc-core / mc / local / sgnb_mod_refuse.h
1 #ifndef _SGNB_MOD_REFUSE_H__INCLUDED_
2 #define _SGNB_MOD_REFUSE_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
27 #include "/usr/local/include/protobuf-c/protobuf-c.h"
28
29 struct _sgnb_mod_refuse {
30         gs_uint64_t timestamp_ms;
31         gs_sp_t gnb_id;
32         gs_int64_t id_MeNB_UE_X2AP_ID;
33         gs_int64_t id_SgNB_UE_X2AP_ID;
34         gs_int64_t cause_radio_network;
35         gs_int64_t cause_transport;
36         gs_int64_t cause_protocol;
37         gs_int64_t cause_misc;
38 };
39
40 static inline void init__sgnb_mod_refuse(struct _sgnb_mod_refuse *m){
41 }
42
43 static inline gs_retval_t get_sgnb_mod_refuse__timestamp_ms(struct packet *p, gs_uint64_t *t){
44         *t = ((struct _sgnb_mod_refuse *)(p->record.packed.values))->timestamp_ms;
45         return 0;
46 }
47
48 static inline gs_retval_t get_sgnb_mod_refuse__gnb_id(struct packet *p, struct gs_string *t){
49         t->owner=0;
50         t->data = ((struct _sgnb_mod_refuse *)(p->record.packed.values))->gnb_id;
51         if( t->data == NULL){
52                 t->length=0;
53                 return 0;
54         }
55         t->length = strlen(t->data);
56 }
57
58 static inline gs_retval_t get_sgnb_mod_refuse__id_MeNB_UE_X2AP_ID(struct packet *p, gs_int64_t *t){
59         *t = ((struct _sgnb_mod_refuse *)(p->record.packed.values))->id_MeNB_UE_X2AP_ID;
60         return 0;
61 }
62
63 static inline gs_retval_t get_sgnb_mod_refuse__id_SgNB_UE_X2AP_ID(struct packet *p, gs_int64_t *t){
64         *t = ((struct _sgnb_mod_refuse *)(p->record.packed.values))->id_SgNB_UE_X2AP_ID;
65         return 0;
66 }
67
68 static inline gs_retval_t get_sgnb_mod_refuse__cause_radio_network(struct packet *p, gs_int64_t *t){
69         *t = ((struct _sgnb_mod_refuse *)(p->record.packed.values))->cause_radio_network;
70         return 0;
71 }
72
73 static inline gs_retval_t get_sgnb_mod_refuse__cause_transport(struct packet *p, gs_int64_t *t){
74         *t = ((struct _sgnb_mod_refuse *)(p->record.packed.values))->cause_transport;
75         return 0;
76 }
77
78 static inline gs_retval_t get_sgnb_mod_refuse__cause_protocol(struct packet *p, gs_int64_t *t){
79         *t = ((struct _sgnb_mod_refuse *)(p->record.packed.values))->cause_protocol;
80         return 0;
81 }
82
83 static inline gs_retval_t get_sgnb_mod_refuse__cause_misc(struct packet *p, gs_int64_t *t){
84         *t = ((struct _sgnb_mod_refuse *)(p->record.packed.values))->cause_misc;
85         return 0;
86 }
87
88 #endif