18e5df7ce8b9ee1e3ac7b19e2ab0a455e4a7a3a5
[ric-plt/resource-status-manager.git] / RSM / 3rdparty / asn1codec / e2ap_engine / PrivateIE-Field.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 /*
21  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
22  * From ASN.1 module "X2AP-Containers"
23  *      found in "../../asnFiles/X2AP-Containers.asn"
24  *      `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
25  */
26
27 #include "PrivateIE-Field.h"
28
29 static int
30 memb_id_constraint_1(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         if(1 /* No applicable constraints whatsoever */) {
42                 /* Nothing is here. See below */
43         }
44         
45         return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
46 }
47
48 static int
49 memb_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
50                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
51         
52         if(!sptr) {
53                 ASN__CTFAIL(app_key, td, sptr,
54                         "%s: value not given (%s:%d)",
55                         td->name, __FILE__, __LINE__);
56                 return -1;
57         }
58         
59         
60         if(1 /* No applicable constraints whatsoever */) {
61                 /* Nothing is here. See below */
62         }
63         
64         return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
65 }
66
67 static int
68 memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
69                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
70         
71         if(!sptr) {
72                 ASN__CTFAIL(app_key, td, sptr,
73                         "%s: value not given (%s:%d)",
74                         td->name, __FILE__, __LINE__);
75                 return -1;
76         }
77         
78         
79         if(1 /* No applicable constraints whatsoever */) {
80                 /* Nothing is here. See below */
81         }
82         
83         return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
84 }
85
86 static asn_per_constraints_t asn_PER_memb_id_constr_2 CC_NOTUSED = {
87         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
88         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
89         0, 0    /* No PER value map */
90 };
91 static asn_per_constraints_t asn_PER_memb_criticality_constr_3 CC_NOTUSED = {
92         { APC_CONSTRAINED,       2,  2,  0,  2 }        /* (0..2) */,
93         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
94         0, 0    /* No PER value map */
95 };
96 static asn_per_constraints_t asn_PER_memb_value_constr_4 CC_NOTUSED = {
97         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
98         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
99         0, 0    /* No PER value map */
100 };
101 static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = {
102         sizeof(struct PrivateMessage_IEs__value),
103         offsetof(struct PrivateMessage_IEs__value, _asn_ctx),
104         offsetof(struct PrivateMessage_IEs__value, present),
105         sizeof(((struct PrivateMessage_IEs__value *)0)->present),
106         0,      /* No top level tags */
107         0,      /* No tags in the map */
108         0, 0,
109         -1      /* Extensions start */
110 };
111 static /* Use -fall-defs-global to expose */
112 asn_TYPE_descriptor_t asn_DEF_value_4 = {
113         "value",
114         "value",
115         &asn_OP_OPEN_TYPE,
116         0,      /* No effective tags (pointer) */
117         0,      /* No effective tags (count) */
118         0,      /* No tags (pointer) */
119         0,      /* No tags (count) */
120         { 0, 0, OPEN_TYPE_constraint },
121         0, 0,   /* No members */
122         &asn_SPC_value_specs_4  /* Additional specs */
123 };
124
125 asn_TYPE_member_t asn_MBR_PrivateMessage_IEs_1[] = {
126         { ATF_NOFLAGS, 0, offsetof(struct PrivateMessage_IEs, id),
127                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
128                 +1,     /* EXPLICIT tag at current level */
129                 &asn_DEF_PrivateIE_ID,
130                 0,
131                 { 0, &asn_PER_memb_id_constr_2,  memb_id_constraint_1 },
132                 0, 0, /* No default value */
133                 "id"
134                 },
135         { ATF_NOFLAGS, 0, offsetof(struct PrivateMessage_IEs, criticality),
136                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
137                 -1,     /* IMPLICIT tag at current level */
138                 &asn_DEF_Criticality,
139                 0,
140                 { 0, &asn_PER_memb_criticality_constr_3,  memb_criticality_constraint_1 },
141                 0, 0, /* No default value */
142                 "criticality"
143                 },
144         { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct PrivateMessage_IEs, value),
145                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
146                 +1,     /* EXPLICIT tag at current level */
147                 &asn_DEF_value_4,
148                 0,
149                 { 0, &asn_PER_memb_value_constr_4,  memb_value_constraint_1 },
150                 0, 0, /* No default value */
151                 "value"
152                 },
153 };
154 static const ber_tlv_tag_t asn_DEF_PrivateMessage_IEs_tags_1[] = {
155         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
156 };
157 static const asn_TYPE_tag2member_t asn_MAP_PrivateMessage_IEs_tag2el_1[] = {
158     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
159     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
160     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
161 };
162 asn_SEQUENCE_specifics_t asn_SPC_PrivateMessage_IEs_specs_1 = {
163         sizeof(struct PrivateMessage_IEs),
164         offsetof(struct PrivateMessage_IEs, _asn_ctx),
165         asn_MAP_PrivateMessage_IEs_tag2el_1,
166         3,      /* Count of tags in the map */
167         0, 0, 0,        /* Optional elements (not needed) */
168         -1,     /* First extension addition */
169 };
170 asn_TYPE_descriptor_t asn_DEF_PrivateMessage_IEs = {
171         "PrivateMessage-IEs",
172         "PrivateMessage-IEs",
173         &asn_OP_SEQUENCE,
174         asn_DEF_PrivateMessage_IEs_tags_1,
175         sizeof(asn_DEF_PrivateMessage_IEs_tags_1)
176                 /sizeof(asn_DEF_PrivateMessage_IEs_tags_1[0]), /* 1 */
177         asn_DEF_PrivateMessage_IEs_tags_1,      /* Same as above */
178         sizeof(asn_DEF_PrivateMessage_IEs_tags_1)
179                 /sizeof(asn_DEF_PrivateMessage_IEs_tags_1[0]), /* 1 */
180         { 0, 0, SEQUENCE_constraint },
181         asn_MBR_PrivateMessage_IEs_1,
182         3,      /* Elements count */
183         &asn_SPC_PrivateMessage_IEs_specs_1     /* Additional specs */
184 };
185