remark release date
[Net-Radio-Location-SUPL-Test.git] / asn1 / AbsentSubscriberReason.c
blob88cd2f98f1318b50d4f666dae2977c0ba497a3a1
1 /*
2 * Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
3 * From ASN.1 module "MAP-ER-DataTypes"
4 * found in "../asn1src/MAP-ER-DataTypes.asn"
5 * `asn1c -gen-PER -fskeletons-copy -fnative-types`
6 */
8 #include "AbsentSubscriberReason.h"
10 int
11 AbsentSubscriberReason_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.
22 static void
23 AbsentSubscriberReason_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 */
39 void
40 AbsentSubscriberReason_free(asn_TYPE_descriptor_t *td,
41 void *struct_ptr, int contents_only) {
42 AbsentSubscriberReason_1_inherit_TYPE_descriptor(td);
43 td->free_struct(td, struct_ptr, contents_only);
46 int
47 AbsentSubscriberReason_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
48 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
49 AbsentSubscriberReason_1_inherit_TYPE_descriptor(td);
50 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
53 asn_dec_rval_t
54 AbsentSubscriberReason_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 AbsentSubscriberReason_1_inherit_TYPE_descriptor(td);
57 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
60 asn_enc_rval_t
61 AbsentSubscriberReason_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 AbsentSubscriberReason_1_inherit_TYPE_descriptor(td);
65 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
68 asn_dec_rval_t
69 AbsentSubscriberReason_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 AbsentSubscriberReason_1_inherit_TYPE_descriptor(td);
72 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
75 asn_enc_rval_t
76 AbsentSubscriberReason_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 AbsentSubscriberReason_1_inherit_TYPE_descriptor(td);
80 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
83 asn_dec_rval_t
84 AbsentSubscriberReason_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 AbsentSubscriberReason_1_inherit_TYPE_descriptor(td);
87 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
90 asn_enc_rval_t
91 AbsentSubscriberReason_encode_uper(asn_TYPE_descriptor_t *td,
92 asn_per_constraints_t *constraints,
93 void *structure, asn_per_outp_t *per_out) {
94 AbsentSubscriberReason_1_inherit_TYPE_descriptor(td);
95 return td->uper_encoder(td, constraints, structure, per_out);
98 static asn_per_constraints_t asn_PER_type_AbsentSubscriberReason_constr_1 = {
99 { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
100 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
101 0, 0 /* No PER value map */
103 static asn_INTEGER_enum_map_t asn_MAP_AbsentSubscriberReason_value2enum_1[] = {
104 { 0, 10, "imsiDetach" },
105 { 1, 14, "restrictedArea" },
106 { 2, 14, "noPageResponse" },
107 { 3, 8, "purgedMS" },
108 { 4, 14, "mtRoamingRetry" },
109 { 5, 14, "busySubscriber" }
110 /* This list is extensible */
112 static unsigned int asn_MAP_AbsentSubscriberReason_enum2value_1[] = {
113 5, /* busySubscriber(5) */
114 0, /* imsiDetach(0) */
115 4, /* mtRoamingRetry(4) */
116 2, /* noPageResponse(2) */
117 3, /* purgedMS(3) */
118 1 /* restrictedArea(1) */
119 /* This list is extensible */
121 static asn_INTEGER_specifics_t asn_SPC_AbsentSubscriberReason_specs_1 = {
122 asn_MAP_AbsentSubscriberReason_value2enum_1, /* "tag" => N; sorted by tag */
123 asn_MAP_AbsentSubscriberReason_enum2value_1, /* N => "tag"; sorted by N */
124 6, /* Number of elements in the maps */
125 4, /* Extensions before this member */
126 1, /* Strict enumeration */
127 0, /* Native long size */
130 static ber_tlv_tag_t asn_DEF_AbsentSubscriberReason_tags_1[] = {
131 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
133 asn_TYPE_descriptor_t asn_DEF_AbsentSubscriberReason = {
134 "AbsentSubscriberReason",
135 "AbsentSubscriberReason",
136 AbsentSubscriberReason_free,
137 AbsentSubscriberReason_print,
138 AbsentSubscriberReason_constraint,
139 AbsentSubscriberReason_decode_ber,
140 AbsentSubscriberReason_encode_der,
141 AbsentSubscriberReason_decode_xer,
142 AbsentSubscriberReason_encode_xer,
143 AbsentSubscriberReason_decode_uper,
144 AbsentSubscriberReason_encode_uper,
145 0, /* Use generic outmost tag fetcher */
146 asn_DEF_AbsentSubscriberReason_tags_1,
147 sizeof(asn_DEF_AbsentSubscriberReason_tags_1)
148 /sizeof(asn_DEF_AbsentSubscriberReason_tags_1[0]), /* 1 */
149 asn_DEF_AbsentSubscriberReason_tags_1, /* Same as above */
150 sizeof(asn_DEF_AbsentSubscriberReason_tags_1)
151 /sizeof(asn_DEF_AbsentSubscriberReason_tags_1[0]), /* 1 */
152 &asn_PER_type_AbsentSubscriberReason_constr_1,
153 0, 0, /* Defined elsewhere */
154 &asn_SPC_AbsentSubscriberReason_specs_1 /* Additional specs */