e668168d98815368e30e0d8803bbecafea0c15c0
[ric-plt/resource-status-manager.git] / RSM / 3rdparty / asn1codec / e2ap_engine / RSRPMeasurementResult.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 "RSRPMeasurementResult.h"
32
33 #include "ProtocolExtensionContainer.h"
34 static int
35 memb_rSRPMeasured_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 <= 97)) {
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 asn_per_constraints_t asn_PER_memb_rSRPMeasured_constr_4 CC_NOTUSED = {
60         { APC_CONSTRAINED | APC_EXTENSIBLE,  7,  7,  0,  97 }   /* (0..97,...) */,
61         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
62         0, 0    /* No PER value map */
63 };
64 asn_per_constraints_t asn_PER_type_RSRPMeasurementResult_constr_1 CC_NOTUSED = {
65         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
66         { APC_CONSTRAINED,       4,  4,  1,  9 }        /* (SIZE(1..9)) */,
67         0, 0    /* No PER value map */
68 };
69 static asn_TYPE_member_t asn_MBR_Member_2[] = {
70         { ATF_NOFLAGS, 0, offsetof(struct RSRPMeasurementResult__Member, rSRPCellID),
71                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
72                 -1,     /* IMPLICIT tag at current level */
73                 &asn_DEF_ECGI,
74                 0,
75                 { 0, 0, 0 },
76                 0, 0, /* No default value */
77                 "rSRPCellID"
78                 },
79         { ATF_NOFLAGS, 0, offsetof(struct RSRPMeasurementResult__Member, rSRPMeasured),
80                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
81                 -1,     /* IMPLICIT tag at current level */
82                 &asn_DEF_NativeInteger,
83                 0,
84                 { 0, &asn_PER_memb_rSRPMeasured_constr_4,  memb_rSRPMeasured_constraint_2 },
85                 0, 0, /* No default value */
86                 "rSRPMeasured"
87                 },
88         { ATF_POINTER, 1, offsetof(struct RSRPMeasurementResult__Member, iE_Extensions),
89                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
90                 -1,     /* IMPLICIT tag at current level */
91                 &asn_DEF_ProtocolExtensionContainer_170P187,
92                 0,
93                 { 0, 0, 0 },
94                 0, 0, /* No default value */
95                 "iE-Extensions"
96                 },
97 };
98 static const int asn_MAP_Member_oms_2[] = { 2 };
99 static const ber_tlv_tag_t asn_DEF_Member_tags_2[] = {
100         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
101 };
102 static const asn_TYPE_tag2member_t asn_MAP_Member_tag2el_2[] = {
103     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rSRPCellID */
104     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* rSRPMeasured */
105     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */
106 };
107 static asn_SEQUENCE_specifics_t asn_SPC_Member_specs_2 = {
108         sizeof(struct RSRPMeasurementResult__Member),
109         offsetof(struct RSRPMeasurementResult__Member, _asn_ctx),
110         asn_MAP_Member_tag2el_2,
111         3,      /* Count of tags in the map */
112         asn_MAP_Member_oms_2,   /* Optional members */
113         1, 0,   /* Root/Additions */
114         3,      /* First extension addition */
115 };
116 static /* Use -fall-defs-global to expose */
117 asn_TYPE_descriptor_t asn_DEF_Member_2 = {
118         "SEQUENCE",
119         "SEQUENCE",
120         &asn_OP_SEQUENCE,
121         asn_DEF_Member_tags_2,
122         sizeof(asn_DEF_Member_tags_2)
123                 /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
124         asn_DEF_Member_tags_2,  /* Same as above */
125         sizeof(asn_DEF_Member_tags_2)
126                 /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
127         { 0, 0, SEQUENCE_constraint },
128         asn_MBR_Member_2,
129         3,      /* Elements count */
130         &asn_SPC_Member_specs_2 /* Additional specs */
131 };
132
133 asn_TYPE_member_t asn_MBR_RSRPMeasurementResult_1[] = {
134         { ATF_POINTER, 0, 0,
135                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
136                 0,
137                 &asn_DEF_Member_2,
138                 0,
139                 { 0, 0, 0 },
140                 0, 0, /* No default value */
141                 ""
142                 },
143 };
144 static const ber_tlv_tag_t asn_DEF_RSRPMeasurementResult_tags_1[] = {
145         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
146 };
147 asn_SET_OF_specifics_t asn_SPC_RSRPMeasurementResult_specs_1 = {
148         sizeof(struct RSRPMeasurementResult),
149         offsetof(struct RSRPMeasurementResult, _asn_ctx),
150         0,      /* XER encoding is XMLDelimitedItemList */
151 };
152 asn_TYPE_descriptor_t asn_DEF_RSRPMeasurementResult = {
153         "RSRPMeasurementResult",
154         "RSRPMeasurementResult",
155         &asn_OP_SEQUENCE_OF,
156         asn_DEF_RSRPMeasurementResult_tags_1,
157         sizeof(asn_DEF_RSRPMeasurementResult_tags_1)
158                 /sizeof(asn_DEF_RSRPMeasurementResult_tags_1[0]), /* 1 */
159         asn_DEF_RSRPMeasurementResult_tags_1,   /* Same as above */
160         sizeof(asn_DEF_RSRPMeasurementResult_tags_1)
161                 /sizeof(asn_DEF_RSRPMeasurementResult_tags_1[0]), /* 1 */
162         { 0, &asn_PER_type_RSRPMeasurementResult_constr_1, SEQUENCE_OF_constraint },
163         asn_MBR_RSRPMeasurementResult_1,
164         1,      /* Single element */
165         &asn_SPC_RSRPMeasurementResult_specs_1  /* Additional specs */
166 };
167