blob: 1bee993d02a6cb33d4637740b5b8be0f617c07bd [file] [log] [blame]
Harald Welteee091892015-09-10 10:22:03 +02001/*
2 * Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
3 * From ASN.1 module "RANAP-IEs"
4 * found in "../../asn1/ranap/RANAP-IEs.asn"
5 */
6
Neels Hofmeyrf1f2d7c2016-01-05 12:00:06 +01007#include <osmocom/ranap/RANAP_ReportInterval.h>
Harald Welteee091892015-09-10 10:22:03 +02008
9int
10RANAP_ReportInterval_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
11 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
12 /* Replace with underlying type checker */
13 td->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
14 return td->check_constraints(td, sptr, ctfailcb, app_key);
15}
16
17/*
18 * This type is implemented using NativeEnumerated,
19 * so here we adjust the DEF accordingly.
20 */
21static void
22RANAP_ReportInterval_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
23 td->free_struct = asn_DEF_NativeEnumerated.free_struct;
24 td->print_struct = asn_DEF_NativeEnumerated.print_struct;
25 td->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
26 td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
27 td->der_encoder = asn_DEF_NativeEnumerated.der_encoder;
28 td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder;
29 td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder;
30 td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder;
31 td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder;
32 td->aper_decoder = asn_DEF_NativeEnumerated.aper_decoder;
33 td->aper_encoder = asn_DEF_NativeEnumerated.aper_encoder;
34 if(!td->per_constraints)
35 td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
36 td->elements = asn_DEF_NativeEnumerated.elements;
37 td->elements_count = asn_DEF_NativeEnumerated.elements_count;
38 /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
39}
40
41void
42RANAP_ReportInterval_free(asn_TYPE_descriptor_t *td,
43 void *struct_ptr, int contents_only) {
44 RANAP_ReportInterval_1_inherit_TYPE_descriptor(td);
45 td->free_struct(td, struct_ptr, contents_only);
46}
47
48int
49RANAP_ReportInterval_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
50 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
51 RANAP_ReportInterval_1_inherit_TYPE_descriptor(td);
52 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
53}
54
55asn_dec_rval_t
56RANAP_ReportInterval_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
57 void **structure, const void *bufptr, size_t size, int tag_mode) {
58 RANAP_ReportInterval_1_inherit_TYPE_descriptor(td);
59 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
60}
61
62asn_enc_rval_t
63RANAP_ReportInterval_encode_der(asn_TYPE_descriptor_t *td,
64 void *structure, int tag_mode, ber_tlv_tag_t tag,
65 asn_app_consume_bytes_f *cb, void *app_key) {
66 RANAP_ReportInterval_1_inherit_TYPE_descriptor(td);
67 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
68}
69
70asn_dec_rval_t
71RANAP_ReportInterval_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
72 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
73 RANAP_ReportInterval_1_inherit_TYPE_descriptor(td);
74 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
75}
76
77asn_enc_rval_t
78RANAP_ReportInterval_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
79 int ilevel, enum xer_encoder_flags_e flags,
80 asn_app_consume_bytes_f *cb, void *app_key) {
81 RANAP_ReportInterval_1_inherit_TYPE_descriptor(td);
82 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
83}
84
85asn_dec_rval_t
86RANAP_ReportInterval_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
87 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
88 RANAP_ReportInterval_1_inherit_TYPE_descriptor(td);
89 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
90}
91
92asn_enc_rval_t
93RANAP_ReportInterval_encode_uper(asn_TYPE_descriptor_t *td,
94 asn_per_constraints_t *constraints,
95 void *structure, asn_per_outp_t *per_out) {
96 RANAP_ReportInterval_1_inherit_TYPE_descriptor(td);
97 return td->uper_encoder(td, constraints, structure, per_out);
98}
99
100asn_enc_rval_t
101RANAP_ReportInterval_encode_aper(asn_TYPE_descriptor_t *td,
102 asn_per_constraints_t *constraints,
103 void *structure, asn_per_outp_t *per_out) {
104 RANAP_ReportInterval_1_inherit_TYPE_descriptor(td);
105 return td->aper_encoder(td, constraints, structure, per_out);
106}
107
108asn_dec_rval_t
109RANAP_ReportInterval_decode_aper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
110 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
111 RANAP_ReportInterval_1_inherit_TYPE_descriptor(td);
112 return td->aper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
113}
114
115static asn_per_constraints_t asn_PER_type_RANAP_ReportInterval_constr_1 GCC_NOTUSED = {
116 { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0l, 12l } /* (0..12,...) */,
117 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
118 0, 0 /* No PER value map */
119};
120static const asn_INTEGER_enum_map_t asn_MAP_RANAP_ReportInterval_value2enum_1[] = {
121 { 0, 5, "ms250" },
122 { 1, 5, "ms500" },
123 { 2, 6, "ms1000" },
124 { 3, 6, "ms2000" },
125 { 4, 6, "ms3000" },
126 { 5, 6, "ms4000" },
127 { 6, 6, "ms6000" },
128 { 7, 7, "ms12000" },
129 { 8, 7, "ms16000" },
130 { 9, 7, "ms20000" },
131 { 10, 7, "ms24000" },
132 { 11, 7, "ms32000" },
133 { 12, 7, "ms64000" },
134 { 13, 6, "ms8000" },
135 { 14, 7, "ms28000" }
136 /* This list is extensible */
137};
138static const unsigned int asn_MAP_RANAP_ReportInterval_enum2value_1[] = {
139 2, /* ms1000(2) */
140 7, /* ms12000(7) */
141 8, /* ms16000(8) */
142 3, /* ms2000(3) */
143 9, /* ms20000(9) */
144 10, /* ms24000(10) */
145 0, /* ms250(0) */
146 14, /* ms28000(14) */
147 4, /* ms3000(4) */
148 11, /* ms32000(11) */
149 5, /* ms4000(5) */
150 1, /* ms500(1) */
151 6, /* ms6000(6) */
152 12, /* ms64000(12) */
153 13 /* ms8000(13) */
154 /* This list is extensible */
155};
156static const asn_INTEGER_specifics_t asn_SPC_RANAP_ReportInterval_specs_1 = {
157 asn_MAP_RANAP_ReportInterval_value2enum_1, /* "tag" => N; sorted by tag */
158 asn_MAP_RANAP_ReportInterval_enum2value_1, /* N => "tag"; sorted by N */
159 15, /* Number of elements in the maps */
160 14, /* Extensions before this member */
161 1, /* Strict enumeration */
162 0, /* Native long size */
163 0
164};
165static const ber_tlv_tag_t asn_DEF_RANAP_ReportInterval_tags_1[] = {
166 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
167};
168asn_TYPE_descriptor_t asn_DEF_RANAP_ReportInterval = {
169 "RANAP_ReportInterval",
170 "RANAP_ReportInterval",
171 RANAP_ReportInterval_free,
172 RANAP_ReportInterval_print,
173 RANAP_ReportInterval_constraint,
174 RANAP_ReportInterval_decode_ber,
175 RANAP_ReportInterval_encode_der,
176 RANAP_ReportInterval_decode_xer,
177 RANAP_ReportInterval_encode_xer,
178 RANAP_ReportInterval_decode_uper,
179 RANAP_ReportInterval_encode_uper,
180 RANAP_ReportInterval_decode_aper,
181 RANAP_ReportInterval_encode_aper,
182 0, /* Use generic outmost tag fetcher */
183 asn_DEF_RANAP_ReportInterval_tags_1,
184 sizeof(asn_DEF_RANAP_ReportInterval_tags_1)
185 /sizeof(asn_DEF_RANAP_ReportInterval_tags_1[0]), /* 1 */
186 asn_DEF_RANAP_ReportInterval_tags_1, /* Same as above */
187 sizeof(asn_DEF_RANAP_ReportInterval_tags_1)
188 /sizeof(asn_DEF_RANAP_ReportInterval_tags_1[0]), /* 1 */
189 &asn_PER_type_RANAP_ReportInterval_constr_1,
190 0, 0, /* Defined elsewhere */
191 &asn_SPC_RANAP_ReportInterval_specs_1 /* Additional specs */
192};
193