Adding new comments for Oran in all files with licenses
[ric-plt/resource-status-manager.git] / RSM / 3rdparty / asn1codec / e2ap_engine / CoMPInformationStartTime.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 "CoMPInformationStartTime.h"
32
33 #include "ProtocolExtensionContainer.h"
34 static int
35 memb_startSFN_constraint_2(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_startSubframeNumber_constraint_2(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 <= 9)) {
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 asn_per_constraints_t asn_PER_memb_startSFN_constr_3 CC_NOTUSED = {
85         { APC_CONSTRAINED | APC_EXTENSIBLE,  10,  10,  0,  1023 }       /* (0..1023,...) */,
86         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
87         0, 0    /* No PER value map */
88 };
89 static asn_per_constraints_t asn_PER_memb_startSubframeNumber_constr_4 CC_NOTUSED = {
90         { APC_CONSTRAINED | APC_EXTENSIBLE,  4,  4,  0,  9 }    /* (0..9,...) */,
91         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
92         0, 0    /* No PER value map */
93 };
94 asn_per_constraints_t asn_PER_type_CoMPInformationStartTime_constr_1 CC_NOTUSED = {
95         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
96         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (SIZE(0..1)) */,
97         0, 0    /* No PER value map */
98 };
99 static asn_TYPE_member_t asn_MBR_Member_2[] = {
100         { ATF_NOFLAGS, 0, offsetof(struct CoMPInformationStartTime__Member, startSFN),
101                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
102                 -1,     /* IMPLICIT tag at current level */
103                 &asn_DEF_NativeInteger,
104                 0,
105                 { 0, &asn_PER_memb_startSFN_constr_3,  memb_startSFN_constraint_2 },
106                 0, 0, /* No default value */
107                 "startSFN"
108                 },
109         { ATF_NOFLAGS, 0, offsetof(struct CoMPInformationStartTime__Member, startSubframeNumber),
110                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
111                 -1,     /* IMPLICIT tag at current level */
112                 &asn_DEF_NativeInteger,
113                 0,
114                 { 0, &asn_PER_memb_startSubframeNumber_constr_4,  memb_startSubframeNumber_constraint_2 },
115                 0, 0, /* No default value */
116                 "startSubframeNumber"
117                 },
118         { ATF_POINTER, 1, offsetof(struct CoMPInformationStartTime__Member, iE_Extensions),
119                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
120                 -1,     /* IMPLICIT tag at current level */
121                 &asn_DEF_ProtocolExtensionContainer_170P120,
122                 0,
123                 { 0, 0, 0 },
124                 0, 0, /* No default value */
125                 "iE-Extensions"
126                 },
127 };
128 static const int asn_MAP_Member_oms_2[] = { 2 };
129 static const ber_tlv_tag_t asn_DEF_Member_tags_2[] = {
130         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
131 };
132 static const asn_TYPE_tag2member_t asn_MAP_Member_tag2el_2[] = {
133     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* startSFN */
134     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* startSubframeNumber */
135     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */
136 };
137 static asn_SEQUENCE_specifics_t asn_SPC_Member_specs_2 = {
138         sizeof(struct CoMPInformationStartTime__Member),
139         offsetof(struct CoMPInformationStartTime__Member, _asn_ctx),
140         asn_MAP_Member_tag2el_2,
141         3,      /* Count of tags in the map */
142         asn_MAP_Member_oms_2,   /* Optional members */
143         1, 0,   /* Root/Additions */
144         3,      /* First extension addition */
145 };
146 static /* Use -fall-defs-global to expose */
147 asn_TYPE_descriptor_t asn_DEF_Member_2 = {
148         "SEQUENCE",
149         "SEQUENCE",
150         &asn_OP_SEQUENCE,
151         asn_DEF_Member_tags_2,
152         sizeof(asn_DEF_Member_tags_2)
153                 /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
154         asn_DEF_Member_tags_2,  /* Same as above */
155         sizeof(asn_DEF_Member_tags_2)
156                 /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
157         { 0, 0, SEQUENCE_constraint },
158         asn_MBR_Member_2,
159         3,      /* Elements count */
160         &asn_SPC_Member_specs_2 /* Additional specs */
161 };
162
163 asn_TYPE_member_t asn_MBR_CoMPInformationStartTime_1[] = {
164         { ATF_POINTER, 0, 0,
165                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
166                 0,
167                 &asn_DEF_Member_2,
168                 0,
169                 { 0, 0, 0 },
170                 0, 0, /* No default value */
171                 ""
172                 },
173 };
174 static const ber_tlv_tag_t asn_DEF_CoMPInformationStartTime_tags_1[] = {
175         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
176 };
177 asn_SET_OF_specifics_t asn_SPC_CoMPInformationStartTime_specs_1 = {
178         sizeof(struct CoMPInformationStartTime),
179         offsetof(struct CoMPInformationStartTime, _asn_ctx),
180         0,      /* XER encoding is XMLDelimitedItemList */
181 };
182 asn_TYPE_descriptor_t asn_DEF_CoMPInformationStartTime = {
183         "CoMPInformationStartTime",
184         "CoMPInformationStartTime",
185         &asn_OP_SEQUENCE_OF,
186         asn_DEF_CoMPInformationStartTime_tags_1,
187         sizeof(asn_DEF_CoMPInformationStartTime_tags_1)
188                 /sizeof(asn_DEF_CoMPInformationStartTime_tags_1[0]), /* 1 */
189         asn_DEF_CoMPInformationStartTime_tags_1,        /* Same as above */
190         sizeof(asn_DEF_CoMPInformationStartTime_tags_1)
191                 /sizeof(asn_DEF_CoMPInformationStartTime_tags_1[0]), /* 1 */
192         { 0, &asn_PER_type_CoMPInformationStartTime_constr_1, SEQUENCE_OF_constraint },
193         asn_MBR_CoMPInformationStartTime_1,
194         1,      /* Single element */
195         &asn_SPC_CoMPInformationStartTime_specs_1       /* Additional specs */
196 };
197