Initial commit of KPIMON xAPP for Bronze Release Enhancement.
[scp/ric-app/kpimon.git] / e2sm / lib / E2SM-KPM-IndicationHeader-Format1.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "E2SM-KPM-IEs"
4  *      found in "e2sm-kpm-v01.02.asn"
5  *      `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example`
6  */
7
8 #include "E2SM-KPM-IndicationHeader-Format1.h"
9
10 #include "GlobalKPMnode-ID.h"
11 #include "NRCGI.h"
12 #include "SNSSAI.h"
13 #include "GNB-Name.h"
14 #include "GlobalgNB-ID.h"
15 static int
16 memb_fiveQI_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
17                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
18         long value;
19         
20         if(!sptr) {
21                 ASN__CTFAIL(app_key, td, sptr,
22                         "%s: value not given (%s:%d)",
23                         td->name, __FILE__, __LINE__);
24                 return -1;
25         }
26         
27         value = *(const long *)sptr;
28         
29         if((value >= 0 && value <= 255)) {
30                 /* Constraint check succeeded */
31                 return 0;
32         } else {
33                 ASN__CTFAIL(app_key, td, sptr,
34                         "%s: constraint failed (%s:%d)",
35                         td->name, __FILE__, __LINE__);
36                 return -1;
37         }
38 }
39
40 static int
41 memb_qci_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
42                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
43         long value;
44         
45         if(!sptr) {
46                 ASN__CTFAIL(app_key, td, sptr,
47                         "%s: value not given (%s:%d)",
48                         td->name, __FILE__, __LINE__);
49                 return -1;
50         }
51         
52         value = *(const long *)sptr;
53         
54         if((value >= 0 && value <= 255)) {
55                 /* Constraint check succeeded */
56                 return 0;
57         } else {
58                 ASN__CTFAIL(app_key, td, sptr,
59                         "%s: constraint failed (%s:%d)",
60                         td->name, __FILE__, __LINE__);
61                 return -1;
62         }
63 }
64
65 static asn_oer_constraints_t asn_OER_memb_fiveQI_constr_6 CC_NOTUSED = {
66         { 1, 1 }        /* (0..255) */,
67         -1};
68 static asn_per_constraints_t asn_PER_memb_fiveQI_constr_6 CC_NOTUSED = {
69         { APC_CONSTRAINED,       8,  8,  0,  255 }      /* (0..255) */,
70         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
71         0, 0    /* No PER value map */
72 };
73 static asn_oer_constraints_t asn_OER_memb_qci_constr_7 CC_NOTUSED = {
74         { 1, 1 }        /* (0..255) */,
75         -1};
76 static asn_per_constraints_t asn_PER_memb_qci_constr_7 CC_NOTUSED = {
77         { APC_CONSTRAINED,       8,  8,  0,  255 }      /* (0..255) */,
78         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
79         0, 0    /* No PER value map */
80 };
81 asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_Format1_1[] = {
82         { ATF_POINTER, 10, offsetof(struct E2SM_KPM_IndicationHeader_Format1, id_GlobalKPMnode_ID),
83                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
84                 +1,     /* EXPLICIT tag at current level */
85                 &asn_DEF_GlobalKPMnode_ID,
86                 0,
87                 { 0, 0, 0 },
88                 0, 0, /* No default value */
89                 "id-GlobalKPMnode-ID"
90                 },
91         { ATF_POINTER, 9, offsetof(struct E2SM_KPM_IndicationHeader_Format1, nRCGI),
92                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
93                 -1,     /* IMPLICIT tag at current level */
94                 &asn_DEF_NRCGI,
95                 0,
96                 { 0, 0, 0 },
97                 0, 0, /* No default value */
98                 "nRCGI"
99                 },
100         { ATF_POINTER, 8, offsetof(struct E2SM_KPM_IndicationHeader_Format1, pLMN_Identity),
101                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
102                 -1,     /* IMPLICIT tag at current level */
103                 &asn_DEF_PLMN_Identity,
104                 0,
105                 { 0, 0, 0 },
106                 0, 0, /* No default value */
107                 "pLMN-Identity"
108                 },
109         { ATF_POINTER, 7, offsetof(struct E2SM_KPM_IndicationHeader_Format1, sliceID),
110                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
111                 -1,     /* IMPLICIT tag at current level */
112                 &asn_DEF_SNSSAI,
113                 0,
114                 { 0, 0, 0 },
115                 0, 0, /* No default value */
116                 "sliceID"
117                 },
118         { ATF_POINTER, 6, offsetof(struct E2SM_KPM_IndicationHeader_Format1, fiveQI),
119                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
120                 -1,     /* IMPLICIT tag at current level */
121                 &asn_DEF_NativeInteger,
122                 0,
123                 { &asn_OER_memb_fiveQI_constr_6, &asn_PER_memb_fiveQI_constr_6,  memb_fiveQI_constraint_1 },
124                 0, 0, /* No default value */
125                 "fiveQI"
126                 },
127         { ATF_POINTER, 5, offsetof(struct E2SM_KPM_IndicationHeader_Format1, qci),
128                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
129                 -1,     /* IMPLICIT tag at current level */
130                 &asn_DEF_NativeInteger,
131                 0,
132                 { &asn_OER_memb_qci_constr_7, &asn_PER_memb_qci_constr_7,  memb_qci_constraint_1 },
133                 0, 0, /* No default value */
134                 "qci"
135                 },
136         { ATF_POINTER, 4, offsetof(struct E2SM_KPM_IndicationHeader_Format1, message_Type),
137                 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
138                 -1,     /* IMPLICIT tag at current level */
139                 &asn_DEF_UE_Report_Type,
140                 0,
141                 { 0, 0, 0 },
142                 0, 0, /* No default value */
143                 "message-Type"
144                 },
145         { ATF_POINTER, 3, offsetof(struct E2SM_KPM_IndicationHeader_Format1, gNB_DU_ID),
146                 (ASN_TAG_CLASS_CONTEXT | (7 << 2)),
147                 -1,     /* IMPLICIT tag at current level */
148                 &asn_DEF_GNB_DU_ID,
149                 0,
150                 { 0, 0, 0 },
151                 0, 0, /* No default value */
152                 "gNB-DU-ID"
153                 },
154         { ATF_POINTER, 2, offsetof(struct E2SM_KPM_IndicationHeader_Format1, gNB_Name),
155                 (ASN_TAG_CLASS_CONTEXT | (8 << 2)),
156                 +1,     /* EXPLICIT tag at current level */
157                 &asn_DEF_GNB_Name,
158                 0,
159                 { 0, 0, 0 },
160                 0, 0, /* No default value */
161                 "gNB-Name"
162                 },
163         { ATF_POINTER, 1, offsetof(struct E2SM_KPM_IndicationHeader_Format1, global_GNB_ID),
164                 (ASN_TAG_CLASS_CONTEXT | (9 << 2)),
165                 -1,     /* IMPLICIT tag at current level */
166                 &asn_DEF_GlobalgNB_ID,
167                 0,
168                 { 0, 0, 0 },
169                 0, 0, /* No default value */
170                 "global-GNB-ID"
171                 },
172 };
173 static const int asn_MAP_E2SM_KPM_IndicationHeader_Format1_oms_1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
174 static const ber_tlv_tag_t asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1[] = {
175         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
176 };
177 static const asn_TYPE_tag2member_t asn_MAP_E2SM_KPM_IndicationHeader_Format1_tag2el_1[] = {
178     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id-GlobalKPMnode-ID */
179     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* nRCGI */
180     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* pLMN-Identity */
181     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* sliceID */
182     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* fiveQI */
183     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* qci */
184     { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* message-Type */
185     { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* gNB-DU-ID */
186     { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* gNB-Name */
187     { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 } /* global-GNB-ID */
188 };
189 asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_IndicationHeader_Format1_specs_1 = {
190         sizeof(struct E2SM_KPM_IndicationHeader_Format1),
191         offsetof(struct E2SM_KPM_IndicationHeader_Format1, _asn_ctx),
192         asn_MAP_E2SM_KPM_IndicationHeader_Format1_tag2el_1,
193         10,     /* Count of tags in the map */
194         asn_MAP_E2SM_KPM_IndicationHeader_Format1_oms_1,        /* Optional members */
195         10, 0,  /* Root/Additions */
196         10,     /* First extension addition */
197 };
198 asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationHeader_Format1 = {
199         "E2SM-KPM-IndicationHeader-Format1",
200         "E2SM-KPM-IndicationHeader-Format1",
201         &asn_OP_SEQUENCE,
202         asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1,
203         sizeof(asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1)
204                 /sizeof(asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1[0]), /* 1 */
205         asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1,       /* Same as above */
206         sizeof(asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1)
207                 /sizeof(asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1[0]), /* 1 */
208         { 0, 0, SEQUENCE_constraint },
209         asn_MBR_E2SM_KPM_IndicationHeader_Format1_1,
210         10,     /* Elements count */
211         &asn_SPC_E2SM_KPM_IndicationHeader_Format1_specs_1      /* Additional specs */
212 };
213