Moving in e2sim originally from it/test/simulators
[sim/e2-interface.git] / e2sim / ASN1c / E-RABs-SubjectToSgNBCounterCheck-Item.c
1 /*****************************************************************************
2 #                                                                            *
3 # Copyright 2019 AT&T Intellectual Property                                  *
4 #                                                                            *
5 # Licensed under the Apache License, Version 2.0 (the "License");            *
6 # you may not use this file except in compliance with the License.           *
7 # You may obtain a copy of the License at                                    *
8 #                                                                            *
9 #      http://www.apache.org/licenses/LICENSE-2.0                            *
10 #                                                                            *
11 # Unless required by applicable law or agreed to in writing, software        *
12 # distributed under the License is distributed on an "AS IS" BASIS,          *
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
14 # See the License for the specific language governing permissions and        *
15 # limitations under the License.                                             *
16 #                                                                            *
17 ******************************************************************************/
18
19 /*
20  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
21  * From ASN.1 module "X2AP-PDU-Contents"
22  *      found in "../../asnFiles/X2AP-PDU-Contents.asn"
23  *      `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
24  */
25
26 #include "E-RABs-SubjectToSgNBCounterCheck-Item.h"
27
28 #include "ProtocolExtensionContainer.h"
29 static int
30 uL_Count_3_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
31                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
32         
33         if(!sptr) {
34                 ASN__CTFAIL(app_key, td, sptr,
35                         "%s: value not given (%s:%d)",
36                         td->name, __FILE__, __LINE__);
37                 return -1;
38         }
39         
40         
41         /* Constraint check succeeded */
42         return 0;
43 }
44
45 /*
46  * This type is implemented using NativeInteger,
47  * so here we adjust the DEF accordingly.
48  */
49 static int
50 dL_Count_4_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
51                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
52         
53         if(!sptr) {
54                 ASN__CTFAIL(app_key, td, sptr,
55                         "%s: value not given (%s:%d)",
56                         td->name, __FILE__, __LINE__);
57                 return -1;
58         }
59         
60         
61         /* Constraint check succeeded */
62         return 0;
63 }
64
65 /*
66  * This type is implemented using NativeInteger,
67  * so here we adjust the DEF accordingly.
68  */
69 static int
70 memb_uL_Count_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
71                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
72         
73         if(!sptr) {
74                 ASN__CTFAIL(app_key, td, sptr,
75                         "%s: value not given (%s:%d)",
76                         td->name, __FILE__, __LINE__);
77                 return -1;
78         }
79         
80         
81         /* Constraint check succeeded */
82         return 0;
83 }
84
85 static int
86 memb_dL_Count_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
87                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
88         
89         if(!sptr) {
90                 ASN__CTFAIL(app_key, td, sptr,
91                         "%s: value not given (%s:%d)",
92                         td->name, __FILE__, __LINE__);
93                 return -1;
94         }
95         
96         
97         /* Constraint check succeeded */
98         return 0;
99 }
100
101 static asn_per_constraints_t asn_PER_type_uL_Count_constr_3 CC_NOTUSED = {
102         { APC_CONSTRAINED,       32, -1,  0,  4294967295 }      /* (0..4294967295) */,
103         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
104         0, 0    /* No PER value map */
105 };
106 static asn_per_constraints_t asn_PER_type_dL_Count_constr_4 CC_NOTUSED = {
107         { APC_CONSTRAINED,       32, -1,  0,  4294967295 }      /* (0..4294967295) */,
108         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
109         0, 0    /* No PER value map */
110 };
111 static asn_per_constraints_t asn_PER_memb_uL_Count_constr_3 CC_NOTUSED = {
112         { APC_CONSTRAINED,       32, -1,  0,  4294967295 }      /* (0..4294967295) */,
113         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
114         0, 0    /* No PER value map */
115 };
116 static asn_per_constraints_t asn_PER_memb_dL_Count_constr_4 CC_NOTUSED = {
117         { APC_CONSTRAINED,       32, -1,  0,  4294967295 }      /* (0..4294967295) */,
118         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
119         0, 0    /* No PER value map */
120 };
121 static const asn_INTEGER_specifics_t asn_SPC_uL_Count_specs_3 = {
122         0,      0,      0,      0,      0,
123         0,      /* Native long size */
124         1       /* Unsigned representation */
125 };
126 static const ber_tlv_tag_t asn_DEF_uL_Count_tags_3[] = {
127         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
128         (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
129 };
130 static /* Use -fall-defs-global to expose */
131 asn_TYPE_descriptor_t asn_DEF_uL_Count_3 = {
132         "uL-Count",
133         "uL-Count",
134         &asn_OP_NativeInteger,
135         asn_DEF_uL_Count_tags_3,
136         sizeof(asn_DEF_uL_Count_tags_3)
137                 /sizeof(asn_DEF_uL_Count_tags_3[0]) - 1, /* 1 */
138         asn_DEF_uL_Count_tags_3,        /* Same as above */
139         sizeof(asn_DEF_uL_Count_tags_3)
140                 /sizeof(asn_DEF_uL_Count_tags_3[0]), /* 2 */
141         { 0, &asn_PER_type_uL_Count_constr_3, uL_Count_3_constraint },
142         0, 0,   /* No members */
143         &asn_SPC_uL_Count_specs_3       /* Additional specs */
144 };
145
146 static const asn_INTEGER_specifics_t asn_SPC_dL_Count_specs_4 = {
147         0,      0,      0,      0,      0,
148         0,      /* Native long size */
149         1       /* Unsigned representation */
150 };
151 static const ber_tlv_tag_t asn_DEF_dL_Count_tags_4[] = {
152         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
153         (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
154 };
155 static /* Use -fall-defs-global to expose */
156 asn_TYPE_descriptor_t asn_DEF_dL_Count_4 = {
157         "dL-Count",
158         "dL-Count",
159         &asn_OP_NativeInteger,
160         asn_DEF_dL_Count_tags_4,
161         sizeof(asn_DEF_dL_Count_tags_4)
162                 /sizeof(asn_DEF_dL_Count_tags_4[0]) - 1, /* 1 */
163         asn_DEF_dL_Count_tags_4,        /* Same as above */
164         sizeof(asn_DEF_dL_Count_tags_4)
165                 /sizeof(asn_DEF_dL_Count_tags_4[0]), /* 2 */
166         { 0, &asn_PER_type_dL_Count_constr_4, dL_Count_4_constraint },
167         0, 0,   /* No members */
168         &asn_SPC_dL_Count_specs_4       /* Additional specs */
169 };
170
171 static asn_TYPE_member_t asn_MBR_E_RABs_SubjectToSgNBCounterCheck_Item_1[] = {
172         { ATF_NOFLAGS, 0, offsetof(struct E_RABs_SubjectToSgNBCounterCheck_Item, e_RAB_ID),
173                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
174                 -1,     /* IMPLICIT tag at current level */
175                 &asn_DEF_E_RAB_ID,
176                 0,
177                 { 0, 0, 0 },
178                 0, 0, /* No default value */
179                 "e-RAB-ID"
180                 },
181         { ATF_NOFLAGS, 0, offsetof(struct E_RABs_SubjectToSgNBCounterCheck_Item, uL_Count),
182                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
183                 -1,     /* IMPLICIT tag at current level */
184                 &asn_DEF_uL_Count_3,
185                 0,
186                 { 0, &asn_PER_memb_uL_Count_constr_3,  memb_uL_Count_constraint_1 },
187                 0, 0, /* No default value */
188                 "uL-Count"
189                 },
190         { ATF_NOFLAGS, 0, offsetof(struct E_RABs_SubjectToSgNBCounterCheck_Item, dL_Count),
191                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
192                 -1,     /* IMPLICIT tag at current level */
193                 &asn_DEF_dL_Count_4,
194                 0,
195                 { 0, &asn_PER_memb_dL_Count_constr_4,  memb_dL_Count_constraint_1 },
196                 0, 0, /* No default value */
197                 "dL-Count"
198                 },
199         { ATF_POINTER, 1, offsetof(struct E_RABs_SubjectToSgNBCounterCheck_Item, iE_Extensions),
200                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
201                 -1,     /* IMPLICIT tag at current level */
202                 &asn_DEF_ProtocolExtensionContainer_170P86,
203                 0,
204                 { 0, 0, 0 },
205                 0, 0, /* No default value */
206                 "iE-Extensions"
207                 },
208 };
209 static const int asn_MAP_E_RABs_SubjectToSgNBCounterCheck_Item_oms_1[] = { 3 };
210 static const ber_tlv_tag_t asn_DEF_E_RABs_SubjectToSgNBCounterCheck_Item_tags_1[] = {
211         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
212 };
213 static const asn_TYPE_tag2member_t asn_MAP_E_RABs_SubjectToSgNBCounterCheck_Item_tag2el_1[] = {
214     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */
215     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* uL-Count */
216     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* dL-Count */
217     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */
218 };
219 static asn_SEQUENCE_specifics_t asn_SPC_E_RABs_SubjectToSgNBCounterCheck_Item_specs_1 = {
220         sizeof(struct E_RABs_SubjectToSgNBCounterCheck_Item),
221         offsetof(struct E_RABs_SubjectToSgNBCounterCheck_Item, _asn_ctx),
222         asn_MAP_E_RABs_SubjectToSgNBCounterCheck_Item_tag2el_1,
223         4,      /* Count of tags in the map */
224         asn_MAP_E_RABs_SubjectToSgNBCounterCheck_Item_oms_1,    /* Optional members */
225         1, 0,   /* Root/Additions */
226         4,      /* First extension addition */
227 };
228 asn_TYPE_descriptor_t asn_DEF_E_RABs_SubjectToSgNBCounterCheck_Item = {
229         "E-RABs-SubjectToSgNBCounterCheck-Item",
230         "E-RABs-SubjectToSgNBCounterCheck-Item",
231         &asn_OP_SEQUENCE,
232         asn_DEF_E_RABs_SubjectToSgNBCounterCheck_Item_tags_1,
233         sizeof(asn_DEF_E_RABs_SubjectToSgNBCounterCheck_Item_tags_1)
234                 /sizeof(asn_DEF_E_RABs_SubjectToSgNBCounterCheck_Item_tags_1[0]), /* 1 */
235         asn_DEF_E_RABs_SubjectToSgNBCounterCheck_Item_tags_1,   /* Same as above */
236         sizeof(asn_DEF_E_RABs_SubjectToSgNBCounterCheck_Item_tags_1)
237                 /sizeof(asn_DEF_E_RABs_SubjectToSgNBCounterCheck_Item_tags_1[0]), /* 1 */
238         { 0, 0, SEQUENCE_constraint },
239         asn_MBR_E_RABs_SubjectToSgNBCounterCheck_Item_1,
240         4,      /* Elements count */
241         &asn_SPC_E_RABs_SubjectToSgNBCounterCheck_Item_specs_1  /* Additional specs */
242 };
243