RICPLT-2801 Implement Subscription Request timer, RICPLT-2801 Implement Subscription...
[ric-plt/submgr.git] / e2ap / lib / NRFreqInfo.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "X2AP-IEs"
4  *      found in "X2AP-15-4-0.asn1"
5  *      `asn1c -D ./asn1_n1 -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example`
6  */
7
8 #include "NRFreqInfo.h"
9
10 #include "SULInformation.h"
11 #include "ProtocolExtensionContainer.h"
12 #include "FreqBandNrItem.h"
13 static int
14 memb_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_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_oer_constraints_t asn_OER_type_freqBandListNr_constr_3 CC_NOTUSED = {
65         { 0, 0 },
66         -1      /* (SIZE(1..32)) */};
67 static asn_per_constraints_t asn_PER_type_freqBandListNr_constr_3 CC_NOTUSED = {
68         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
69         { APC_CONSTRAINED,       5,  5,  1,  32 }       /* (SIZE(1..32)) */,
70         0, 0    /* No PER value map */
71 };
72 static asn_oer_constraints_t asn_OER_memb_nRARFCN_constr_2 CC_NOTUSED = {
73         { 4, 1 }        /* (0..3279165) */,
74         -1};
75 static asn_per_constraints_t asn_PER_memb_nRARFCN_constr_2 CC_NOTUSED = {
76         { APC_CONSTRAINED,       22, -1,  0,  3279165 } /* (0..3279165) */,
77         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
78         0, 0    /* No PER value map */
79 };
80 static asn_oer_constraints_t asn_OER_memb_freqBandListNr_constr_3 CC_NOTUSED = {
81         { 0, 0 },
82         -1      /* (SIZE(1..32)) */};
83 static asn_per_constraints_t asn_PER_memb_freqBandListNr_constr_3 CC_NOTUSED = {
84         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
85         { APC_CONSTRAINED,       5,  5,  1,  32 }       /* (SIZE(1..32)) */,
86         0, 0    /* No PER value map */
87 };
88 static asn_TYPE_member_t asn_MBR_freqBandListNr_3[] = {
89         { ATF_POINTER, 0, 0,
90                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
91                 0,
92                 &asn_DEF_FreqBandNrItem,
93                 0,
94                 { 0, 0, 0 },
95                 0, 0, /* No default value */
96                 ""
97                 },
98 };
99 static const ber_tlv_tag_t asn_DEF_freqBandListNr_tags_3[] = {
100         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
101         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
102 };
103 static asn_SET_OF_specifics_t asn_SPC_freqBandListNr_specs_3 = {
104         sizeof(struct NRFreqInfo__freqBandListNr),
105         offsetof(struct NRFreqInfo__freqBandListNr, _asn_ctx),
106         0,      /* XER encoding is XMLDelimitedItemList */
107 };
108 static /* Use -fall-defs-global to expose */
109 asn_TYPE_descriptor_t asn_DEF_freqBandListNr_3 = {
110         "freqBandListNr",
111         "freqBandListNr",
112         &asn_OP_SEQUENCE_OF,
113         asn_DEF_freqBandListNr_tags_3,
114         sizeof(asn_DEF_freqBandListNr_tags_3)
115                 /sizeof(asn_DEF_freqBandListNr_tags_3[0]) - 1, /* 1 */
116         asn_DEF_freqBandListNr_tags_3,  /* Same as above */
117         sizeof(asn_DEF_freqBandListNr_tags_3)
118                 /sizeof(asn_DEF_freqBandListNr_tags_3[0]), /* 2 */
119         { &asn_OER_type_freqBandListNr_constr_3, &asn_PER_type_freqBandListNr_constr_3, SEQUENCE_OF_constraint },
120         asn_MBR_freqBandListNr_3,
121         1,      /* Single element */
122         &asn_SPC_freqBandListNr_specs_3 /* Additional specs */
123 };
124
125 asn_TYPE_member_t asn_MBR_NRFreqInfo_1[] = {
126         { ATF_NOFLAGS, 0, offsetof(struct NRFreqInfo, nRARFCN),
127                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
128                 -1,     /* IMPLICIT tag at current level */
129                 &asn_DEF_NativeInteger,
130                 0,
131                 { &asn_OER_memb_nRARFCN_constr_2, &asn_PER_memb_nRARFCN_constr_2,  memb_nRARFCN_constraint_1 },
132                 0, 0, /* No default value */
133                 "nRARFCN"
134                 },
135         { ATF_NOFLAGS, 0, offsetof(struct NRFreqInfo, freqBandListNr),
136                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
137                 0,
138                 &asn_DEF_freqBandListNr_3,
139                 0,
140                 { &asn_OER_memb_freqBandListNr_constr_3, &asn_PER_memb_freqBandListNr_constr_3,  memb_freqBandListNr_constraint_1 },
141                 0, 0, /* No default value */
142                 "freqBandListNr"
143                 },
144         { ATF_POINTER, 2, offsetof(struct NRFreqInfo, sULInformation),
145                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
146                 -1,     /* IMPLICIT tag at current level */
147                 &asn_DEF_SULInformation,
148                 0,
149                 { 0, 0, 0 },
150                 0, 0, /* No default value */
151                 "sULInformation"
152                 },
153         { ATF_POINTER, 1, offsetof(struct NRFreqInfo, iE_Extensions),
154                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
155                 -1,     /* IMPLICIT tag at current level */
156                 &asn_DEF_ProtocolExtensionContainer_7683P173,
157                 0,
158                 { 0, 0, 0 },
159                 0, 0, /* No default value */
160                 "iE-Extensions"
161                 },
162 };
163 static const int asn_MAP_NRFreqInfo_oms_1[] = { 2, 3 };
164 static const ber_tlv_tag_t asn_DEF_NRFreqInfo_tags_1[] = {
165         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
166 };
167 static const asn_TYPE_tag2member_t asn_MAP_NRFreqInfo_tag2el_1[] = {
168     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nRARFCN */
169     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* freqBandListNr */
170     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* sULInformation */
171     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */
172 };
173 asn_SEQUENCE_specifics_t asn_SPC_NRFreqInfo_specs_1 = {
174         sizeof(struct NRFreqInfo),
175         offsetof(struct NRFreqInfo, _asn_ctx),
176         asn_MAP_NRFreqInfo_tag2el_1,
177         4,      /* Count of tags in the map */
178         asn_MAP_NRFreqInfo_oms_1,       /* Optional members */
179         2, 0,   /* Root/Additions */
180         4,      /* First extension addition */
181 };
182 asn_TYPE_descriptor_t asn_DEF_NRFreqInfo = {
183         "NRFreqInfo",
184         "NRFreqInfo",
185         &asn_OP_SEQUENCE,
186         asn_DEF_NRFreqInfo_tags_1,
187         sizeof(asn_DEF_NRFreqInfo_tags_1)
188                 /sizeof(asn_DEF_NRFreqInfo_tags_1[0]), /* 1 */
189         asn_DEF_NRFreqInfo_tags_1,      /* Same as above */
190         sizeof(asn_DEF_NRFreqInfo_tags_1)
191                 /sizeof(asn_DEF_NRFreqInfo_tags_1[0]), /* 1 */
192         { 0, 0, SEQUENCE_constraint },
193         asn_MBR_NRFreqInfo_1,
194         4,      /* Elements count */
195         &asn_SPC_NRFreqInfo_specs_1     /* Additional specs */
196 };
197