Adding new comments for Oran in all files with licenses
[ric-plt/resource-status-manager.git] / RSM / 3rdparty / asn1codec / e2ap_engine / EnhancedRNTPStartTime.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 "EnhancedRNTPStartTime.h"
32
33 #include "ProtocolExtensionContainer.h"
34 static int
35 memb_startSFN_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_startSubframeNumber_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 <= 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_2 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_3 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_TYPE_member_t asn_MBR_EnhancedRNTPStartTime_1[] = {
95         { ATF_NOFLAGS, 0, offsetof(struct EnhancedRNTPStartTime, startSFN),
96                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
97                 -1,     /* IMPLICIT tag at current level */
98                 &asn_DEF_NativeInteger,
99                 0,
100                 { 0, &asn_PER_memb_startSFN_constr_2,  memb_startSFN_constraint_1 },
101                 0, 0, /* No default value */
102                 "startSFN"
103                 },
104         { ATF_NOFLAGS, 0, offsetof(struct EnhancedRNTPStartTime, startSubframeNumber),
105                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
106                 -1,     /* IMPLICIT tag at current level */
107                 &asn_DEF_NativeInteger,
108                 0,
109                 { 0, &asn_PER_memb_startSubframeNumber_constr_3,  memb_startSubframeNumber_constraint_1 },
110                 0, 0, /* No default value */
111                 "startSubframeNumber"
112                 },
113         { ATF_POINTER, 1, offsetof(struct EnhancedRNTPStartTime, iE_Extensions),
114                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
115                 -1,     /* IMPLICIT tag at current level */
116                 &asn_DEF_ProtocolExtensionContainer_170P136,
117                 0,
118                 { 0, 0, 0 },
119                 0, 0, /* No default value */
120                 "iE-Extensions"
121                 },
122 };
123 static const int asn_MAP_EnhancedRNTPStartTime_oms_1[] = { 2 };
124 static const ber_tlv_tag_t asn_DEF_EnhancedRNTPStartTime_tags_1[] = {
125         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
126 };
127 static const asn_TYPE_tag2member_t asn_MAP_EnhancedRNTPStartTime_tag2el_1[] = {
128     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* startSFN */
129     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* startSubframeNumber */
130     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */
131 };
132 asn_SEQUENCE_specifics_t asn_SPC_EnhancedRNTPStartTime_specs_1 = {
133         sizeof(struct EnhancedRNTPStartTime),
134         offsetof(struct EnhancedRNTPStartTime, _asn_ctx),
135         asn_MAP_EnhancedRNTPStartTime_tag2el_1,
136         3,      /* Count of tags in the map */
137         asn_MAP_EnhancedRNTPStartTime_oms_1,    /* Optional members */
138         1, 0,   /* Root/Additions */
139         3,      /* First extension addition */
140 };
141 asn_TYPE_descriptor_t asn_DEF_EnhancedRNTPStartTime = {
142         "EnhancedRNTPStartTime",
143         "EnhancedRNTPStartTime",
144         &asn_OP_SEQUENCE,
145         asn_DEF_EnhancedRNTPStartTime_tags_1,
146         sizeof(asn_DEF_EnhancedRNTPStartTime_tags_1)
147                 /sizeof(asn_DEF_EnhancedRNTPStartTime_tags_1[0]), /* 1 */
148         asn_DEF_EnhancedRNTPStartTime_tags_1,   /* Same as above */
149         sizeof(asn_DEF_EnhancedRNTPStartTime_tags_1)
150                 /sizeof(asn_DEF_EnhancedRNTPStartTime_tags_1[0]), /* 1 */
151         { 0, 0, SEQUENCE_constraint },
152         asn_MBR_EnhancedRNTPStartTime_1,
153         3,      /* Elements count */
154         &asn_SPC_EnhancedRNTPStartTime_specs_1  /* Additional specs */
155 };
156