2b856f2b4c3095cc046153ac2963f9e8dcb13727
[ric-app/mc.git] / mc-core / mc / local / SgNB_ack_for_ue_beam_ssb.h
1 #ifndef _SGNB_ACK_FOR_UE_BEAM_SSB_H__INCLUDED_
2 #define _SGNB_ACK_FOR_UE_BEAM_SSB_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_ack_for_ue_beam_ssb {
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         gs_uint32_t id_MeNB_UE_X2AP_ID_Extension;
32         gs_uint32_t ssbFrequency;
33         gs_int8_t ssbFrequency_exists;
34         gs_uint32_t refFreqCSI_RS;
35         gs_int8_t refFreqCSI_RS_exists;
36         gs_uint32_t physCellId;
37         gs_int8_t physCellId_exists;
38         gs_int64_t ssb_Index;
39         gs_uint32_t rsrq;
40         gs_int8_t rsrq_exists;
41         gs_uint32_t rsrp;
42         gs_int8_t rsrp_exists;
43         gs_uint32_t sinr;
44         gs_int8_t sinr_exists;
45 };
46
47 static inline void init__SgNB_ack_for_ue_beam_ssb(struct _SgNB_ack_for_ue_beam_ssb *m){
48         m->ssbFrequency_exists=0;
49         m->refFreqCSI_RS_exists=0;
50         m->physCellId_exists=0;
51         m->rsrq_exists=0;
52         m->rsrp_exists=0;
53         m->sinr_exists=0;
54 }
55
56 static inline gs_retval_t get_SgNB_ack_for_ue_beam_ssb__timestamp_ms(struct packet *p, gs_uint64_t *t){
57         *t = ((struct _SgNB_ack_for_ue_beam_ssb *)(p->record.packed.values))->timestamp_ms;
58         return 0;
59 }
60
61 static inline gs_retval_t get_SgNB_ack_for_ue_beam_ssb__gnb_id(struct packet *p, struct gs_string *t){
62 t->data = ((struct _SgNB_ack_for_ue_beam_ssb *)(p->record.packed.values))->gnb_id;
63         t->length = strlen(t->data);
64         t->owner=0;
65         return 0;
66 }
67
68 static inline gs_retval_t get_SgNB_ack_for_ue_beam_ssb__id_MeNB_UE_X2AP_ID(struct packet *p, gs_int64_t *t){
69         *t = ((struct _SgNB_ack_for_ue_beam_ssb *)(p->record.packed.values))->id_MeNB_UE_X2AP_ID;
70         return 0;
71 }
72
73 static inline gs_retval_t get_SgNB_ack_for_ue_beam_ssb__id_SgNB_UE_X2AP_ID(struct packet *p, gs_int64_t *t){
74         *t = ((struct _SgNB_ack_for_ue_beam_ssb *)(p->record.packed.values))->id_SgNB_UE_X2AP_ID;
75         return 0;
76 }
77
78 static inline gs_retval_t get_SgNB_ack_for_ue_beam_ssb__id_MeNB_UE_X2AP_ID_Extension(struct packet *p, gs_uint32_t *t){
79         *t = ((struct _SgNB_ack_for_ue_beam_ssb *)(p->record.packed.values))->id_MeNB_UE_X2AP_ID_Extension;
80         return 0;
81 }
82
83 static inline gs_retval_t get_SgNB_ack_for_ue_beam_ssb__ssbFrequency(struct packet *p, gs_uint32_t *t){
84         *t = ((struct _SgNB_ack_for_ue_beam_ssb *)(p->record.packed.values))->ssbFrequency;
85         return (((struct _SgNB_ack_for_ue_beam_ssb *)(p->record.packed.values))->ssbFrequency==0);
86 }
87
88 static inline gs_retval_t get_SgNB_ack_for_ue_beam_ssb__refFreqCSI_RS(struct packet *p, gs_uint32_t *t){
89         *t = ((struct _SgNB_ack_for_ue_beam_ssb *)(p->record.packed.values))->refFreqCSI_RS;
90         return (((struct _SgNB_ack_for_ue_beam_ssb *)(p->record.packed.values))->refFreqCSI_RS==0);
91 }
92
93 static inline gs_retval_t get_SgNB_ack_for_ue_beam_ssb__physCellId(struct packet *p, gs_uint32_t *t){
94         *t = ((struct _SgNB_ack_for_ue_beam_ssb *)(p->record.packed.values))->physCellId;
95         return (((struct _SgNB_ack_for_ue_beam_ssb *)(p->record.packed.values))->physCellId==0);
96 }
97
98 static inline gs_retval_t get_SgNB_ack_for_ue_beam_ssb__ssb_Index(struct packet *p, gs_int64_t *t){
99         *t = ((struct _SgNB_ack_for_ue_beam_ssb *)(p->record.packed.values))->ssb_Index;
100         return 0;
101 }
102
103 static inline gs_retval_t get_SgNB_ack_for_ue_beam_ssb__rsrq(struct packet *p, gs_uint32_t *t){
104         *t = ((struct _SgNB_ack_for_ue_beam_ssb *)(p->record.packed.values))->rsrq;
105         return (((struct _SgNB_ack_for_ue_beam_ssb *)(p->record.packed.values))->rsrq==0);
106 }
107
108 static inline gs_retval_t get_SgNB_ack_for_ue_beam_ssb__rsrp(struct packet *p, gs_uint32_t *t){
109         *t = ((struct _SgNB_ack_for_ue_beam_ssb *)(p->record.packed.values))->rsrp;
110         return (((struct _SgNB_ack_for_ue_beam_ssb *)(p->record.packed.values))->rsrp==0);
111 }
112
113 static inline gs_retval_t get_SgNB_ack_for_ue_beam_ssb__sinr(struct packet *p, gs_uint32_t *t){
114         *t = ((struct _SgNB_ack_for_ue_beam_ssb *)(p->record.packed.values))->sinr;
115         return (((struct _SgNB_ack_for_ue_beam_ssb *)(p->record.packed.values))->sinr==0);
116 }
117
118 #endif