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