2 * Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
3 * From ASN.1 module "MAP-OM-DataTypes"
4 * found in "../asn1src/MAP-OM-DataTypes.asn"
5 * `asn1c -gen-PER -fskeletons-copy -fnative-types`
8 #include "ReportInterval.h"
11 ReportInterval_constraint(asn_TYPE_descriptor_t
*td
, const void *sptr
,
12 asn_app_constraint_failed_f
*ctfailcb
, void *app_key
) {
13 /* Replace with underlying type checker */
14 td
->check_constraints
= asn_DEF_NativeEnumerated
.check_constraints
;
15 return td
->check_constraints(td
, sptr
, ctfailcb
, app_key
);
19 * This type is implemented using NativeEnumerated,
20 * so here we adjust the DEF accordingly.
23 ReportInterval_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t
*td
) {
24 td
->free_struct
= asn_DEF_NativeEnumerated
.free_struct
;
25 td
->print_struct
= asn_DEF_NativeEnumerated
.print_struct
;
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 if(!td
->per_constraints
)
33 td
->per_constraints
= asn_DEF_NativeEnumerated
.per_constraints
;
34 td
->elements
= asn_DEF_NativeEnumerated
.elements
;
35 td
->elements_count
= asn_DEF_NativeEnumerated
.elements_count
;
36 /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
40 ReportInterval_free(asn_TYPE_descriptor_t
*td
,
41 void *struct_ptr
, int contents_only
) {
42 ReportInterval_1_inherit_TYPE_descriptor(td
);
43 td
->free_struct(td
, struct_ptr
, contents_only
);
47 ReportInterval_print(asn_TYPE_descriptor_t
*td
, const void *struct_ptr
,
48 int ilevel
, asn_app_consume_bytes_f
*cb
, void *app_key
) {
49 ReportInterval_1_inherit_TYPE_descriptor(td
);
50 return td
->print_struct(td
, struct_ptr
, ilevel
, cb
, app_key
);
54 ReportInterval_decode_ber(asn_codec_ctx_t
*opt_codec_ctx
, asn_TYPE_descriptor_t
*td
,
55 void **structure
, const void *bufptr
, size_t size
, int tag_mode
) {
56 ReportInterval_1_inherit_TYPE_descriptor(td
);
57 return td
->ber_decoder(opt_codec_ctx
, td
, structure
, bufptr
, size
, tag_mode
);
61 ReportInterval_encode_der(asn_TYPE_descriptor_t
*td
,
62 void *structure
, int tag_mode
, ber_tlv_tag_t tag
,
63 asn_app_consume_bytes_f
*cb
, void *app_key
) {
64 ReportInterval_1_inherit_TYPE_descriptor(td
);
65 return td
->der_encoder(td
, structure
, tag_mode
, tag
, cb
, app_key
);
69 ReportInterval_decode_xer(asn_codec_ctx_t
*opt_codec_ctx
, asn_TYPE_descriptor_t
*td
,
70 void **structure
, const char *opt_mname
, const void *bufptr
, size_t size
) {
71 ReportInterval_1_inherit_TYPE_descriptor(td
);
72 return td
->xer_decoder(opt_codec_ctx
, td
, structure
, opt_mname
, bufptr
, size
);
76 ReportInterval_encode_xer(asn_TYPE_descriptor_t
*td
, void *structure
,
77 int ilevel
, enum xer_encoder_flags_e flags
,
78 asn_app_consume_bytes_f
*cb
, void *app_key
) {
79 ReportInterval_1_inherit_TYPE_descriptor(td
);
80 return td
->xer_encoder(td
, structure
, ilevel
, flags
, cb
, app_key
);
84 ReportInterval_decode_uper(asn_codec_ctx_t
*opt_codec_ctx
, asn_TYPE_descriptor_t
*td
,
85 asn_per_constraints_t
*constraints
, void **structure
, asn_per_data_t
*per_data
) {
86 ReportInterval_1_inherit_TYPE_descriptor(td
);
87 return td
->uper_decoder(opt_codec_ctx
, td
, constraints
, structure
, per_data
);
91 ReportInterval_encode_uper(asn_TYPE_descriptor_t
*td
,
92 asn_per_constraints_t
*constraints
,
93 void *structure
, asn_per_outp_t
*per_out
) {
94 ReportInterval_1_inherit_TYPE_descriptor(td
);
95 return td
->uper_encoder(td
, constraints
, structure
, per_out
);
98 static asn_per_constraints_t asn_PER_type_ReportInterval_constr_1
= {
99 { APC_CONSTRAINED
, 5, 5, 0, 27 } /* (0..27) */,
100 { APC_UNCONSTRAINED
, -1, -1, 0, 0 },
101 0, 0 /* No PER value map */
103 static asn_INTEGER_enum_map_t asn_MAP_ReportInterval_value2enum_1
[] = {
104 { 0, 9, "umts250ms" },
105 { 1, 9, "umts500ms" },
106 { 2, 10, "umts1000ms" },
107 { 3, 10, "umts2000ms" },
108 { 4, 10, "umts3000ms" },
109 { 5, 10, "umts4000ms" },
110 { 6, 10, "umts6000ms" },
111 { 7, 10, "umts8000ms" },
112 { 8, 11, "umts12000ms" },
113 { 9, 11, "umts16000ms" },
114 { 10, 11, "umts20000ms" },
115 { 11, 11, "umts24000ms" },
116 { 12, 11, "umts28000ms" },
117 { 13, 11, "umts32000ms" },
118 { 14, 11, "umts64000ms" },
119 { 15, 8, "lte120ms" },
120 { 16, 8, "lte240ms" },
121 { 17, 8, "lte480ms" },
122 { 18, 8, "lte640ms" },
123 { 19, 9, "lte1024ms" },
124 { 20, 9, "lte2048ms" },
125 { 21, 9, "lte5120ms" },
126 { 22, 10, "lte10240ms" },
127 { 23, 7, "lte1min" },
128 { 24, 7, "lte6min" },
129 { 25, 8, "lte12min" },
130 { 26, 8, "lte30min" },
131 { 27, 8, "lte60min" }
133 static unsigned int asn_MAP_ReportInterval_enum2value_1
[] = {
134 22, /* lte10240ms(22) */
135 19, /* lte1024ms(19) */
136 15, /* lte120ms(15) */
137 25, /* lte12min(25) */
138 23, /* lte1min(23) */
139 20, /* lte2048ms(20) */
140 16, /* lte240ms(16) */
141 26, /* lte30min(26) */
142 17, /* lte480ms(17) */
143 21, /* lte5120ms(21) */
144 27, /* lte60min(27) */
145 18, /* lte640ms(18) */
146 24, /* lte6min(24) */
147 2, /* umts1000ms(2) */
148 8, /* umts12000ms(8) */
149 9, /* umts16000ms(9) */
150 10, /* umts20000ms(10) */
151 3, /* umts2000ms(3) */
152 11, /* umts24000ms(11) */
153 0, /* umts250ms(0) */
154 12, /* umts28000ms(12) */
155 4, /* umts3000ms(4) */
156 13, /* umts32000ms(13) */
157 5, /* umts4000ms(5) */
158 1, /* umts500ms(1) */
159 6, /* umts6000ms(6) */
160 14, /* umts64000ms(14) */
161 7 /* umts8000ms(7) */
163 static asn_INTEGER_specifics_t asn_SPC_ReportInterval_specs_1
= {
164 asn_MAP_ReportInterval_value2enum_1
, /* "tag" => N; sorted by tag */
165 asn_MAP_ReportInterval_enum2value_1
, /* N => "tag"; sorted by N */
166 28, /* Number of elements in the maps */
167 0, /* Enumeration is not extensible */
168 1, /* Strict enumeration */
169 0, /* Native long size */
172 static ber_tlv_tag_t asn_DEF_ReportInterval_tags_1
[] = {
173 (ASN_TAG_CLASS_UNIVERSAL
| (10 << 2))
175 asn_TYPE_descriptor_t asn_DEF_ReportInterval
= {
179 ReportInterval_print
,
180 ReportInterval_constraint
,
181 ReportInterval_decode_ber
,
182 ReportInterval_encode_der
,
183 ReportInterval_decode_xer
,
184 ReportInterval_encode_xer
,
185 ReportInterval_decode_uper
,
186 ReportInterval_encode_uper
,
187 0, /* Use generic outmost tag fetcher */
188 asn_DEF_ReportInterval_tags_1
,
189 sizeof(asn_DEF_ReportInterval_tags_1
)
190 /sizeof(asn_DEF_ReportInterval_tags_1
[0]), /* 1 */
191 asn_DEF_ReportInterval_tags_1
, /* Same as above */
192 sizeof(asn_DEF_ReportInterval_tags_1
)
193 /sizeof(asn_DEF_ReportInterval_tags_1
[0]), /* 1 */
194 &asn_PER_type_ReportInterval_constr_1
,
195 0, 0, /* Defined elsewhere */
196 &asn_SPC_ReportInterval_specs_1
/* Additional specs */