blob: c7c1fd323a10d28321dd53546b162f09cccf3413 [file] [log] [blame]
Harald Welted523a692015-08-30 23:11:19 +02001/*
2 * Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
3 * From ASN.1 module "HNBAP-IEs"
4 * found in "../../asn1/hnbap/HNBAP-IEs.asn"
Harald Welteff4750f2015-08-31 09:55:28 +02005 * `asn1c -gen-PER`
Harald Welted523a692015-08-30 23:11:19 +02006 */
7
Neels Hofmeyrf1f2d7c2016-01-05 12:00:06 +01008#include <osmocom/hnbap/CauseRadioNetwork.h>
Harald Welted523a692015-08-30 23:11:19 +02009
10int
11CauseRadioNetwork_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);
16}
17
18/*
19 * This type is implemented using NativeEnumerated,
20 * so here we adjust the DEF accordingly.
21 */
22static void
23CauseRadioNetwork_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->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
27 td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
28 td->der_encoder = asn_DEF_NativeEnumerated.der_encoder;
29 td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder;
30 td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder;
31 td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder;
32 td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder;
33 td->aper_decoder = asn_DEF_NativeEnumerated.aper_decoder;
34 td->aper_encoder = asn_DEF_NativeEnumerated.aper_encoder;
35 if(!td->per_constraints)
36 td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
37 td->elements = asn_DEF_NativeEnumerated.elements;
38 td->elements_count = asn_DEF_NativeEnumerated.elements_count;
39 /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
40}
41
42void
43CauseRadioNetwork_free(asn_TYPE_descriptor_t *td,
44 void *struct_ptr, int contents_only) {
45 CauseRadioNetwork_1_inherit_TYPE_descriptor(td);
46 td->free_struct(td, struct_ptr, contents_only);
47}
48
49int
50CauseRadioNetwork_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
51 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
52 CauseRadioNetwork_1_inherit_TYPE_descriptor(td);
53 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
54}
55
56asn_dec_rval_t
57CauseRadioNetwork_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
58 void **structure, const void *bufptr, size_t size, int tag_mode) {
59 CauseRadioNetwork_1_inherit_TYPE_descriptor(td);
60 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
61}
62
63asn_enc_rval_t
64CauseRadioNetwork_encode_der(asn_TYPE_descriptor_t *td,
65 void *structure, int tag_mode, ber_tlv_tag_t tag,
66 asn_app_consume_bytes_f *cb, void *app_key) {
67 CauseRadioNetwork_1_inherit_TYPE_descriptor(td);
68 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
69}
70
71asn_dec_rval_t
72CauseRadioNetwork_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
73 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
74 CauseRadioNetwork_1_inherit_TYPE_descriptor(td);
75 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
76}
77
78asn_enc_rval_t
79CauseRadioNetwork_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
80 int ilevel, enum xer_encoder_flags_e flags,
81 asn_app_consume_bytes_f *cb, void *app_key) {
82 CauseRadioNetwork_1_inherit_TYPE_descriptor(td);
83 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
84}
85
86asn_dec_rval_t
87CauseRadioNetwork_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
88 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
89 CauseRadioNetwork_1_inherit_TYPE_descriptor(td);
90 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
91}
92
93asn_enc_rval_t
94CauseRadioNetwork_encode_uper(asn_TYPE_descriptor_t *td,
95 asn_per_constraints_t *constraints,
96 void *structure, asn_per_outp_t *per_out) {
97 CauseRadioNetwork_1_inherit_TYPE_descriptor(td);
98 return td->uper_encoder(td, constraints, structure, per_out);
99}
100
101asn_enc_rval_t
102CauseRadioNetwork_encode_aper(asn_TYPE_descriptor_t *td,
103 asn_per_constraints_t *constraints,
104 void *structure, asn_per_outp_t *per_out) {
105 CauseRadioNetwork_1_inherit_TYPE_descriptor(td);
106 return td->aper_encoder(td, constraints, structure, per_out);
107}
108
109asn_dec_rval_t
110CauseRadioNetwork_decode_aper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
111 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
112 CauseRadioNetwork_1_inherit_TYPE_descriptor(td);
113 return td->aper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
114}
115
116static asn_per_constraints_t asn_PER_type_CauseRadioNetwork_constr_1 GCC_NOTUSED = {
117 { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0l, 13l } /* (0..13,...) */,
118 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
119 0, 0 /* No PER value map */
120};
121static const asn_INTEGER_enum_map_t asn_MAP_CauseRadioNetwork_value2enum_1[] = {
122 { 0, 8, "overload" },
123 { 1, 21, "unauthorised-Location" },
124 { 2, 16, "unauthorised-HNB" },
125 { 3, 22, "hNB-parameter-mismatch" },
126 { 4, 19, "invalid-UE-identity" },
127 { 5, 26, "uE-not-allowed-on-this-HNB" },
128 { 6, 15, "uE-unauthorised" },
129 { 7, 23, "connection-with-UE-lost" },
130 { 8, 14, "ue-RRC-release" },
131 { 9, 18, "hNB-not-registered" },
132 { 10, 11, "unspecified" },
133 { 11, 6, "normal" },
134 { 12, 12, "uE-relocated" },
135 { 13, 28, "ue-registered-in-another-HNB" },
136 { 14, 34, "no-neighbour-information-available" },
137 { 15, 45, "iurh-connection-to-that-neighbour-not-Allowed" }
138 /* This list is extensible */
139};
140static const unsigned int asn_MAP_CauseRadioNetwork_enum2value_1[] = {
141 7, /* connection-with-UE-lost(7) */
142 9, /* hNB-not-registered(9) */
143 3, /* hNB-parameter-mismatch(3) */
144 4, /* invalid-UE-identity(4) */
145 15, /* iurh-connection-to-that-neighbour-not-Allowed(15) */
146 14, /* no-neighbour-information-available(14) */
147 11, /* normal(11) */
148 0, /* overload(0) */
149 5, /* uE-not-allowed-on-this-HNB(5) */
150 12, /* uE-relocated(12) */
151 6, /* uE-unauthorised(6) */
152 8, /* ue-RRC-release(8) */
153 13, /* ue-registered-in-another-HNB(13) */
154 2, /* unauthorised-HNB(2) */
155 1, /* unauthorised-Location(1) */
156 10 /* unspecified(10) */
157 /* This list is extensible */
158};
159static const asn_INTEGER_specifics_t asn_SPC_CauseRadioNetwork_specs_1 = {
160 asn_MAP_CauseRadioNetwork_value2enum_1, /* "tag" => N; sorted by tag */
161 asn_MAP_CauseRadioNetwork_enum2value_1, /* N => "tag"; sorted by N */
162 16, /* Number of elements in the maps */
163 15, /* Extensions before this member */
164 1, /* Strict enumeration */
165 0, /* Native long size */
166 0
167};
168static const ber_tlv_tag_t asn_DEF_CauseRadioNetwork_tags_1[] = {
169 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
170};
171asn_TYPE_descriptor_t asn_DEF_CauseRadioNetwork = {
172 "CauseRadioNetwork",
173 "CauseRadioNetwork",
174 CauseRadioNetwork_free,
175 CauseRadioNetwork_print,
176 CauseRadioNetwork_constraint,
177 CauseRadioNetwork_decode_ber,
178 CauseRadioNetwork_encode_der,
179 CauseRadioNetwork_decode_xer,
180 CauseRadioNetwork_encode_xer,
181 CauseRadioNetwork_decode_uper,
182 CauseRadioNetwork_encode_uper,
183 CauseRadioNetwork_decode_aper,
184 CauseRadioNetwork_encode_aper,
185 0, /* Use generic outmost tag fetcher */
186 asn_DEF_CauseRadioNetwork_tags_1,
187 sizeof(asn_DEF_CauseRadioNetwork_tags_1)
188 /sizeof(asn_DEF_CauseRadioNetwork_tags_1[0]), /* 1 */
189 asn_DEF_CauseRadioNetwork_tags_1, /* Same as above */
190 sizeof(asn_DEF_CauseRadioNetwork_tags_1)
191 /sizeof(asn_DEF_CauseRadioNetwork_tags_1[0]), /* 1 */
192 &asn_PER_type_CauseRadioNetwork_constr_1,
193 0, 0, /* Defined elsewhere */
194 &asn_SPC_CauseRadioNetwork_specs_1 /* Additional specs */
195};
196