Updated documentation for mock a1 tool
[ric-app/admin.git] / asn1c_defs / X2N_NRFreqInfo.c
1 /*
2  * Generated by asn1c-0.9.29 n1 (http://lionet.info/asn1c)
3  * From ASN.1 module "X2AP-IEs"
4  *      found in "../../asn_defs/asn1/x2ap-15-04.asn"
5  *      `asn1c -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-OER`
6  */
7
8 #include "X2N_NRFreqInfo.h"
9
10 #include "X2N_SULInformation.h"
11 #include "X2N_ProtocolExtensionContainer.h"
12 #include "X2N_FreqBandNrItem.h"
13 static int
14 memb_X2N_nRARFCN_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
15                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
16         long value;
17         
18         if(!sptr) {
19                 ASN__CTFAIL(app_key, td, sptr,
20                         "%s: value not given (%s:%d)",
21                         td->name, __FILE__, __LINE__);
22                 return -1;
23         }
24         
25         value = *(const long *)sptr;
26         
27         if((value >= 0 && value <= 3279165)) {
28                 /* Constraint check succeeded */
29                 return 0;
30         } else {
31                 ASN__CTFAIL(app_key, td, sptr,
32                         "%s: constraint failed (%s:%d)",
33                         td->name, __FILE__, __LINE__);
34                 return -1;
35         }
36 }
37
38 static int
39 memb_X2N_freqBandListNr_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
40                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
41         size_t size;
42         
43         if(!sptr) {
44                 ASN__CTFAIL(app_key, td, sptr,
45                         "%s: value not given (%s:%d)",
46                         td->name, __FILE__, __LINE__);
47                 return -1;
48         }
49         
50         /* Determine the number of elements */
51         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
52         
53         if((size >= 1 && size <= 32)) {
54                 /* Perform validation of the inner elements */
55                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
56         } else {
57                 ASN__CTFAIL(app_key, td, sptr,
58                         "%s: constraint failed (%s:%d)",
59                         td->name, __FILE__, __LINE__);
60                 return -1;
61         }
62 }
63
64 static asn_per_constraints_t asn_PER_type_X2N_freqBandListNr_constr_3 CC_NOTUSED = {
65         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
66         { APC_CONSTRAINED,       5,  5,  1,  32 }       /* (SIZE(1..32)) */,
67         0, 0    /* No PER value map */
68 };
69 static asn_per_constraints_t asn_PER_memb_X2N_nRARFCN_constr_2 CC_NOTUSED = {
70         { APC_CONSTRAINED,       22, -1,  0,  3279165 } /* (0..3279165) */,
71         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
72         0, 0    /* No PER value map */
73 };
74 static asn_per_constraints_t asn_PER_memb_X2N_freqBandListNr_constr_3 CC_NOTUSED = {
75         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
76         { APC_CONSTRAINED,       5,  5,  1,  32 }       /* (SIZE(1..32)) */,
77         0, 0    /* No PER value map */
78 };
79 static asn_TYPE_member_t asn_MBR_X2N_freqBandListNr_3[] = {
80         { ATF_POINTER, 0, 0,
81                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
82                 0,
83                 &asn_DEF_X2N_FreqBandNrItem,
84                 0,
85                 { 0, 0, 0 },
86                 0, 0, /* No default value */
87                 ""
88                 },
89 };
90 static const ber_tlv_tag_t asn_DEF_X2N_freqBandListNr_tags_3[] = {
91         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
92         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
93 };
94 static asn_SET_OF_specifics_t asn_SPC_X2N_freqBandListNr_specs_3 = {
95         sizeof(struct X2N_NRFreqInfo__freqBandListNr),
96         offsetof(struct X2N_NRFreqInfo__freqBandListNr, _asn_ctx),
97         0,      /* XER encoding is XMLDelimitedItemList */
98 };
99 static /* Use -fall-defs-global to expose */
100 asn_TYPE_descriptor_t asn_DEF_X2N_freqBandListNr_3 = {
101         "freqBandListNr",
102         "freqBandListNr",
103         &asn_OP_SEQUENCE_OF,
104         asn_DEF_X2N_freqBandListNr_tags_3,
105         sizeof(asn_DEF_X2N_freqBandListNr_tags_3)
106                 /sizeof(asn_DEF_X2N_freqBandListNr_tags_3[0]) - 1, /* 1 */
107         asn_DEF_X2N_freqBandListNr_tags_3,      /* Same as above */
108         sizeof(asn_DEF_X2N_freqBandListNr_tags_3)
109                 /sizeof(asn_DEF_X2N_freqBandListNr_tags_3[0]), /* 2 */
110         { 0, &asn_PER_type_X2N_freqBandListNr_constr_3, SEQUENCE_OF_constraint },
111         asn_MBR_X2N_freqBandListNr_3,
112         1,      /* Single element */
113         &asn_SPC_X2N_freqBandListNr_specs_3     /* Additional specs */
114 };
115
116 asn_TYPE_member_t asn_MBR_X2N_NRFreqInfo_1[] = {
117         { ATF_NOFLAGS, 0, offsetof(struct X2N_NRFreqInfo, nRARFCN),
118                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
119                 -1,     /* IMPLICIT tag at current level */
120                 &asn_DEF_NativeInteger,
121                 0,
122                 { 0, &asn_PER_memb_X2N_nRARFCN_constr_2,  memb_X2N_nRARFCN_constraint_1 },
123                 0, 0, /* No default value */
124                 "nRARFCN"
125                 },
126         { ATF_NOFLAGS, 0, offsetof(struct X2N_NRFreqInfo, freqBandListNr),
127                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
128                 0,
129                 &asn_DEF_X2N_freqBandListNr_3,
130                 0,
131                 { 0, &asn_PER_memb_X2N_freqBandListNr_constr_3,  memb_X2N_freqBandListNr_constraint_1 },
132                 0, 0, /* No default value */
133                 "freqBandListNr"
134                 },
135         { ATF_POINTER, 2, offsetof(struct X2N_NRFreqInfo, sULInformation),
136                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
137                 -1,     /* IMPLICIT tag at current level */
138                 &asn_DEF_X2N_SULInformation,
139                 0,
140                 { 0, 0, 0 },
141                 0, 0, /* No default value */
142                 "sULInformation"
143                 },
144         { ATF_POINTER, 1, offsetof(struct X2N_NRFreqInfo, iE_Extensions),
145                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
146                 -1,     /* IMPLICIT tag at current level */
147                 &asn_DEF_X2N_ProtocolExtensionContainer_8231P173,
148                 0,
149                 { 0, 0, 0 },
150                 0, 0, /* No default value */
151                 "iE-Extensions"
152                 },
153 };
154 static const int asn_MAP_X2N_NRFreqInfo_oms_1[] = { 2, 3 };
155 static const ber_tlv_tag_t asn_DEF_X2N_NRFreqInfo_tags_1[] = {
156         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
157 };
158 static const asn_TYPE_tag2member_t asn_MAP_X2N_NRFreqInfo_tag2el_1[] = {
159     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nRARFCN */
160     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* freqBandListNr */
161     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* sULInformation */
162     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */
163 };
164 asn_SEQUENCE_specifics_t asn_SPC_X2N_NRFreqInfo_specs_1 = {
165         sizeof(struct X2N_NRFreqInfo),
166         offsetof(struct X2N_NRFreqInfo, _asn_ctx),
167         asn_MAP_X2N_NRFreqInfo_tag2el_1,
168         4,      /* Count of tags in the map */
169         asn_MAP_X2N_NRFreqInfo_oms_1,   /* Optional members */
170         2, 0,   /* Root/Additions */
171         4,      /* First extension addition */
172 };
173 asn_TYPE_descriptor_t asn_DEF_X2N_NRFreqInfo = {
174         "NRFreqInfo",
175         "NRFreqInfo",
176         &asn_OP_SEQUENCE,
177         asn_DEF_X2N_NRFreqInfo_tags_1,
178         sizeof(asn_DEF_X2N_NRFreqInfo_tags_1)
179                 /sizeof(asn_DEF_X2N_NRFreqInfo_tags_1[0]), /* 1 */
180         asn_DEF_X2N_NRFreqInfo_tags_1,  /* Same as above */
181         sizeof(asn_DEF_X2N_NRFreqInfo_tags_1)
182                 /sizeof(asn_DEF_X2N_NRFreqInfo_tags_1[0]), /* 1 */
183         { 0, 0, SEQUENCE_constraint },
184         asn_MBR_X2N_NRFreqInfo_1,
185         4,      /* Elements count */
186         &asn_SPC_X2N_NRFreqInfo_specs_1 /* Additional specs */
187 };
188