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