Adding new comments for Oran in all files with licenses
[ric-plt/e2.git] / RIC-E2-TERMINATION / 3rdparty / asn1cFiles / ProtectedEUTRAResourceIndication.c
1 /*
2  * Copyright 2019 AT&T Intellectual Property
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /*
18  * This source code is part of the near-RT RIC (RAN Intelligent Controller)
19  * platform project (RICP).
20  */
21
22
23
24 /*
25  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
26  * From ASN.1 module "X2AP-IEs"
27  *      found in "../../asnFiles/X2AP-IEs.asn"
28  *      `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
29  */
30
31 #include "ProtectedEUTRAResourceIndication.h"
32
33 #include "ProtocolExtensionContainer.h"
34 static int
35 memb_activationSFN_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
36                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
37         long value;
38         
39         if(!sptr) {
40                 ASN__CTFAIL(app_key, td, sptr,
41                         "%s: value not given (%s:%d)",
42                         td->name, __FILE__, __LINE__);
43                 return -1;
44         }
45         
46         value = *(const long *)sptr;
47         
48         if((value >= 0 && value <= 1023)) {
49                 /* Constraint check succeeded */
50                 return 0;
51         } else {
52                 ASN__CTFAIL(app_key, td, sptr,
53                         "%s: constraint failed (%s:%d)",
54                         td->name, __FILE__, __LINE__);
55                 return -1;
56         }
57 }
58
59 static int
60 memb_mBSFNControlRegionLength_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
61                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
62         long value;
63         
64         if(!sptr) {
65                 ASN__CTFAIL(app_key, td, sptr,
66                         "%s: value not given (%s:%d)",
67                         td->name, __FILE__, __LINE__);
68                 return -1;
69         }
70         
71         value = *(const long *)sptr;
72         
73         if((value >= 0 && value <= 3)) {
74                 /* Constraint check succeeded */
75                 return 0;
76         } else {
77                 ASN__CTFAIL(app_key, td, sptr,
78                         "%s: constraint failed (%s:%d)",
79                         td->name, __FILE__, __LINE__);
80                 return -1;
81         }
82 }
83
84 static int
85 memb_pDCCHRegionLength_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
86                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
87         long value;
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         value = *(const long *)sptr;
97         
98         if((value >= 1 && value <= 3)) {
99                 /* Constraint check succeeded */
100                 return 0;
101         } else {
102                 ASN__CTFAIL(app_key, td, sptr,
103                         "%s: constraint failed (%s:%d)",
104                         td->name, __FILE__, __LINE__);
105                 return -1;
106         }
107 }
108
109 static asn_per_constraints_t asn_PER_memb_activationSFN_constr_2 CC_NOTUSED = {
110         { APC_CONSTRAINED,       10,  10,  0,  1023 }   /* (0..1023) */,
111         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
112         0, 0    /* No PER value map */
113 };
114 static asn_per_constraints_t asn_PER_memb_mBSFNControlRegionLength_constr_4 CC_NOTUSED = {
115         { APC_CONSTRAINED,       2,  2,  0,  3 }        /* (0..3) */,
116         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
117         0, 0    /* No PER value map */
118 };
119 static asn_per_constraints_t asn_PER_memb_pDCCHRegionLength_constr_5 CC_NOTUSED = {
120         { APC_CONSTRAINED,       2,  2,  1,  3 }        /* (1..3) */,
121         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
122         0, 0    /* No PER value map */
123 };
124 asn_TYPE_member_t asn_MBR_ProtectedEUTRAResourceIndication_1[] = {
125         { ATF_NOFLAGS, 0, offsetof(struct ProtectedEUTRAResourceIndication, activationSFN),
126                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
127                 -1,     /* IMPLICIT tag at current level */
128                 &asn_DEF_NativeInteger,
129                 0,
130                 { 0, &asn_PER_memb_activationSFN_constr_2,  memb_activationSFN_constraint_1 },
131                 0, 0, /* No default value */
132                 "activationSFN"
133                 },
134         { ATF_NOFLAGS, 0, offsetof(struct ProtectedEUTRAResourceIndication, protectedResourceList),
135                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
136                 -1,     /* IMPLICIT tag at current level */
137                 &asn_DEF_ProtectedResourceList,
138                 0,
139                 { 0, 0, 0 },
140                 0, 0, /* No default value */
141                 "protectedResourceList"
142                 },
143         { ATF_POINTER, 3, offsetof(struct ProtectedEUTRAResourceIndication, mBSFNControlRegionLength),
144                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
145                 -1,     /* IMPLICIT tag at current level */
146                 &asn_DEF_NativeInteger,
147                 0,
148                 { 0, &asn_PER_memb_mBSFNControlRegionLength_constr_4,  memb_mBSFNControlRegionLength_constraint_1 },
149                 0, 0, /* No default value */
150                 "mBSFNControlRegionLength"
151                 },
152         { ATF_POINTER, 2, offsetof(struct ProtectedEUTRAResourceIndication, pDCCHRegionLength),
153                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
154                 -1,     /* IMPLICIT tag at current level */
155                 &asn_DEF_NativeInteger,
156                 0,
157                 { 0, &asn_PER_memb_pDCCHRegionLength_constr_5,  memb_pDCCHRegionLength_constraint_1 },
158                 0, 0, /* No default value */
159                 "pDCCHRegionLength"
160                 },
161         { ATF_POINTER, 1, offsetof(struct ProtectedEUTRAResourceIndication, iE_Extensions),
162                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
163                 -1,     /* IMPLICIT tag at current level */
164                 &asn_DEF_ProtocolExtensionContainer_170P180,
165                 0,
166                 { 0, 0, 0 },
167                 0, 0, /* No default value */
168                 "iE-Extensions"
169                 },
170 };
171 static const int asn_MAP_ProtectedEUTRAResourceIndication_oms_1[] = { 2, 3, 4 };
172 static const ber_tlv_tag_t asn_DEF_ProtectedEUTRAResourceIndication_tags_1[] = {
173         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
174 };
175 static const asn_TYPE_tag2member_t asn_MAP_ProtectedEUTRAResourceIndication_tag2el_1[] = {
176     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* activationSFN */
177     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* protectedResourceList */
178     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* mBSFNControlRegionLength */
179     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* pDCCHRegionLength */
180     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iE-Extensions */
181 };
182 asn_SEQUENCE_specifics_t asn_SPC_ProtectedEUTRAResourceIndication_specs_1 = {
183         sizeof(struct ProtectedEUTRAResourceIndication),
184         offsetof(struct ProtectedEUTRAResourceIndication, _asn_ctx),
185         asn_MAP_ProtectedEUTRAResourceIndication_tag2el_1,
186         5,      /* Count of tags in the map */
187         asn_MAP_ProtectedEUTRAResourceIndication_oms_1, /* Optional members */
188         3, 0,   /* Root/Additions */
189         5,      /* First extension addition */
190 };
191 asn_TYPE_descriptor_t asn_DEF_ProtectedEUTRAResourceIndication = {
192         "ProtectedEUTRAResourceIndication",
193         "ProtectedEUTRAResourceIndication",
194         &asn_OP_SEQUENCE,
195         asn_DEF_ProtectedEUTRAResourceIndication_tags_1,
196         sizeof(asn_DEF_ProtectedEUTRAResourceIndication_tags_1)
197                 /sizeof(asn_DEF_ProtectedEUTRAResourceIndication_tags_1[0]), /* 1 */
198         asn_DEF_ProtectedEUTRAResourceIndication_tags_1,        /* Same as above */
199         sizeof(asn_DEF_ProtectedEUTRAResourceIndication_tags_1)
200                 /sizeof(asn_DEF_ProtectedEUTRAResourceIndication_tags_1[0]), /* 1 */
201         { 0, 0, SEQUENCE_constraint },
202         asn_MBR_ProtectedEUTRAResourceIndication_1,
203         5,      /* Elements count */
204         &asn_SPC_ProtectedEUTRAResourceIndication_specs_1       /* Additional specs */
205 };
206