Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [A-noc] >>> ***/ |
| 3 | |
| 4 | #include <NativeInteger.h> |
| 5 | |
| 6 | /*** <<< TYPE-DECLS [A-noc] >>> ***/ |
| 7 | |
| 8 | typedef long A_noc_t; |
| 9 | |
| 10 | /*** <<< FUNC-DECLS [A-noc] >>> ***/ |
| 11 | |
| 12 | extern asn_TYPE_descriptor_t asn_DEF_A_noc; |
| 13 | asn_struct_free_f A_noc_free; |
| 14 | asn_struct_print_f A_noc_print; |
| 15 | asn_constr_check_f A_noc_constraint; |
| 16 | ber_type_decoder_f A_noc_decode_ber; |
| 17 | der_type_encoder_f A_noc_encode_der; |
| 18 | xer_type_decoder_f A_noc_decode_xer; |
| 19 | xer_type_encoder_f A_noc_encode_xer; |
| 20 | oer_type_decoder_f A_noc_decode_oer; |
| 21 | oer_type_encoder_f A_noc_encode_oer; |
| 22 | |
| 23 | /*** <<< CODE [A-noc] >>> ***/ |
| 24 | |
| 25 | int |
| 26 | A_noc_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 27 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 28 | /* Replace with underlying type checker */ |
| 29 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 30 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
| 31 | } |
| 32 | |
| 33 | /* |
| 34 | * This type is implemented using NativeInteger, |
| 35 | * so here we adjust the DEF accordingly. |
| 36 | */ |
| 37 | static void |
| 38 | A_noc_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 39 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 40 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 41 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 42 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 43 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 44 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 45 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 46 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 47 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 48 | td->oer_decoder = asn_DEF_NativeInteger.oer_decoder; |
| 49 | td->oer_encoder = asn_DEF_NativeInteger.oer_encoder; |
| 50 | if(!td->oer_constraints) |
| 51 | td->oer_constraints = asn_DEF_NativeInteger.oer_constraints; |
| 52 | if(!td->per_constraints) |
| 53 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 54 | td->elements = asn_DEF_NativeInteger.elements; |
| 55 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 56 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 57 | } |
| 58 | |
| 59 | void |
| 60 | A_noc_free(asn_TYPE_descriptor_t *td, |
| 61 | void *struct_ptr, int contents_only) { |
| 62 | A_noc_1_inherit_TYPE_descriptor(td); |
| 63 | td->free_struct(td, struct_ptr, contents_only); |
| 64 | } |
| 65 | |
| 66 | int |
| 67 | A_noc_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 68 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 69 | A_noc_1_inherit_TYPE_descriptor(td); |
| 70 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 71 | } |
| 72 | |
| 73 | asn_dec_rval_t |
| 74 | A_noc_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 75 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 76 | A_noc_1_inherit_TYPE_descriptor(td); |
| 77 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 78 | } |
| 79 | |
| 80 | asn_enc_rval_t |
| 81 | A_noc_encode_der(asn_TYPE_descriptor_t *td, |
| 82 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 83 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 84 | A_noc_1_inherit_TYPE_descriptor(td); |
| 85 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 86 | } |
| 87 | |
| 88 | asn_dec_rval_t |
| 89 | A_noc_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 90 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 91 | A_noc_1_inherit_TYPE_descriptor(td); |
| 92 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 93 | } |
| 94 | |
| 95 | asn_enc_rval_t |
| 96 | A_noc_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 97 | int ilevel, enum xer_encoder_flags_e flags, |
| 98 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 99 | A_noc_1_inherit_TYPE_descriptor(td); |
| 100 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 101 | } |
| 102 | |
| 103 | asn_dec_rval_t |
| 104 | A_noc_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 105 | asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) { |
| 106 | A_noc_1_inherit_TYPE_descriptor(td); |
| 107 | return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size); |
| 108 | } |
| 109 | |
| 110 | asn_enc_rval_t |
| 111 | A_noc_encode_oer(asn_TYPE_descriptor_t *td, |
| 112 | asn_oer_constraints_t *constraints, |
| 113 | void *structure, asn_app_consume_bytes_f *cb, void *app_key) { |
| 114 | A_noc_1_inherit_TYPE_descriptor(td); |
| 115 | return td->uper_encoder(td, constraints, structure, cb, app_key); |
| 116 | } |
| 117 | |
| 118 | |
| 119 | /*** <<< STAT-DEFS [A-noc] >>> ***/ |
| 120 | |
| 121 | static const ber_tlv_tag_t asn_DEF_A_noc_tags_1[] = { |
| 122 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 123 | }; |
| 124 | asn_TYPE_descriptor_t asn_DEF_A_noc = { |
| 125 | "A-noc", |
| 126 | "A-noc", |
| 127 | A_noc_free, |
| 128 | A_noc_print, |
| 129 | A_noc_constraint, |
| 130 | A_noc_decode_ber, |
| 131 | A_noc_encode_der, |
| 132 | A_noc_decode_xer, |
| 133 | A_noc_encode_xer, |
| 134 | A_noc_decode_oer, |
| 135 | A_noc_encode_oer, |
| 136 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 137 | 0, /* Use generic outmost tag fetcher */ |
| 138 | asn_DEF_A_noc_tags_1, |
| 139 | sizeof(asn_DEF_A_noc_tags_1) |
| 140 | /sizeof(asn_DEF_A_noc_tags_1[0]), /* 1 */ |
| 141 | asn_DEF_A_noc_tags_1, /* Same as above */ |
| 142 | sizeof(asn_DEF_A_noc_tags_1) |
| 143 | /sizeof(asn_DEF_A_noc_tags_1[0]), /* 1 */ |
| 144 | 0, /* No OER visible constraints */ |
| 145 | 0, /* No PER visible constraints */ |
| 146 | 0, 0, /* No members */ |
| 147 | 0 /* No specifics */ |
| 148 | }; |
| 149 | |
| 150 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 151 | /*** <<< INCLUDES [B-0-0] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 152 | |
| 153 | #include <NativeInteger.h> |
| 154 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 155 | /*** <<< TYPE-DECLS [B-0-0] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 156 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 157 | typedef long B_0_0_t; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 158 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 159 | /*** <<< FUNC-DECLS [B-0-0] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 160 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 161 | extern asn_TYPE_descriptor_t asn_DEF_B_0_0; |
| 162 | asn_struct_free_f B_0_0_free; |
| 163 | asn_struct_print_f B_0_0_print; |
| 164 | asn_constr_check_f B_0_0_constraint; |
| 165 | ber_type_decoder_f B_0_0_decode_ber; |
| 166 | der_type_encoder_f B_0_0_encode_der; |
| 167 | xer_type_decoder_f B_0_0_decode_xer; |
| 168 | xer_type_encoder_f B_0_0_encode_xer; |
| 169 | oer_type_decoder_f B_0_0_decode_oer; |
| 170 | oer_type_encoder_f B_0_0_encode_oer; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 171 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 172 | /*** <<< CODE [B-0-0] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 173 | |
| 174 | int |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 175 | B_0_0_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 176 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 177 | long value; |
| 178 | |
| 179 | if(!sptr) { |
| 180 | ASN__CTFAIL(app_key, td, sptr, |
| 181 | "%s: value not given (%s:%d)", |
| 182 | td->name, __FILE__, __LINE__); |
| 183 | return -1; |
| 184 | } |
| 185 | |
| 186 | value = *(const long *)sptr; |
| 187 | |
| 188 | if((value == 0)) { |
| 189 | /* Constraint check succeeded */ |
| 190 | return 0; |
| 191 | } else { |
| 192 | ASN__CTFAIL(app_key, td, sptr, |
| 193 | "%s: constraint failed (%s:%d)", |
| 194 | td->name, __FILE__, __LINE__); |
| 195 | return -1; |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | /* |
| 200 | * This type is implemented using NativeInteger, |
| 201 | * so here we adjust the DEF accordingly. |
| 202 | */ |
| 203 | static void |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 204 | B_0_0_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 205 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 206 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 207 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 208 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 209 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 210 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 211 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 212 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 213 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 214 | td->oer_decoder = asn_DEF_NativeInteger.oer_decoder; |
| 215 | td->oer_encoder = asn_DEF_NativeInteger.oer_encoder; |
| 216 | if(!td->oer_constraints) |
| 217 | td->oer_constraints = asn_DEF_NativeInteger.oer_constraints; |
| 218 | if(!td->per_constraints) |
| 219 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 220 | td->elements = asn_DEF_NativeInteger.elements; |
| 221 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 222 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 223 | } |
| 224 | |
| 225 | void |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 226 | B_0_0_free(asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 227 | void *struct_ptr, int contents_only) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 228 | B_0_0_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 229 | td->free_struct(td, struct_ptr, contents_only); |
| 230 | } |
| 231 | |
| 232 | int |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 233 | B_0_0_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 234 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 235 | B_0_0_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 236 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 237 | } |
| 238 | |
| 239 | asn_dec_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 240 | B_0_0_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 241 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 242 | B_0_0_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 243 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 244 | } |
| 245 | |
| 246 | asn_enc_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 247 | B_0_0_encode_der(asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 248 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 249 | asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 250 | B_0_0_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 251 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 252 | } |
| 253 | |
| 254 | asn_dec_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 255 | B_0_0_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 256 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 257 | B_0_0_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 258 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 259 | } |
| 260 | |
| 261 | asn_enc_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 262 | B_0_0_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 263 | int ilevel, enum xer_encoder_flags_e flags, |
| 264 | asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 265 | B_0_0_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 266 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 267 | } |
| 268 | |
| 269 | asn_dec_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 270 | B_0_0_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 271 | asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 272 | B_0_0_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 273 | return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size); |
| 274 | } |
| 275 | |
| 276 | asn_enc_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 277 | B_0_0_encode_oer(asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 278 | asn_oer_constraints_t *constraints, |
| 279 | void *structure, asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 280 | B_0_0_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 281 | return td->uper_encoder(td, constraints, structure, cb, app_key); |
| 282 | } |
| 283 | |
| 284 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 285 | /*** <<< CTDEFS [B-0-0] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 286 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 287 | static asn_oer_constraints_t asn_OER_type_B_0_0_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame^] | 288 | { 1, 1 } /* (0..0) */, |
| 289 | -1}; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 290 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 291 | /*** <<< STAT-DEFS [B-0-0] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 292 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 293 | static const ber_tlv_tag_t asn_DEF_B_0_0_tags_1[] = { |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 294 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 295 | }; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 296 | asn_TYPE_descriptor_t asn_DEF_B_0_0 = { |
| 297 | "B-0-0", |
| 298 | "B-0-0", |
| 299 | B_0_0_free, |
| 300 | B_0_0_print, |
| 301 | B_0_0_constraint, |
| 302 | B_0_0_decode_ber, |
| 303 | B_0_0_encode_der, |
| 304 | B_0_0_decode_xer, |
| 305 | B_0_0_encode_xer, |
| 306 | B_0_0_decode_oer, |
| 307 | B_0_0_encode_oer, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 308 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 309 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 310 | asn_DEF_B_0_0_tags_1, |
| 311 | sizeof(asn_DEF_B_0_0_tags_1) |
| 312 | /sizeof(asn_DEF_B_0_0_tags_1[0]), /* 1 */ |
| 313 | asn_DEF_B_0_0_tags_1, /* Same as above */ |
| 314 | sizeof(asn_DEF_B_0_0_tags_1) |
| 315 | /sizeof(asn_DEF_B_0_0_tags_1[0]), /* 1 */ |
| 316 | &asn_OER_type_B_0_0_constr_1, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 317 | 0, /* No PER visible constraints */ |
| 318 | 0, 0, /* No members */ |
| 319 | 0 /* No specifics */ |
| 320 | }; |
| 321 | |
| 322 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 323 | /*** <<< INCLUDES [C-1-2] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 324 | |
| 325 | #include <NativeInteger.h> |
| 326 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 327 | /*** <<< TYPE-DECLS [C-1-2] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 328 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 329 | typedef long C_1_2_t; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 330 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 331 | /*** <<< FUNC-DECLS [C-1-2] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 332 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 333 | extern asn_TYPE_descriptor_t asn_DEF_C_1_2; |
| 334 | asn_struct_free_f C_1_2_free; |
| 335 | asn_struct_print_f C_1_2_print; |
| 336 | asn_constr_check_f C_1_2_constraint; |
| 337 | ber_type_decoder_f C_1_2_decode_ber; |
| 338 | der_type_encoder_f C_1_2_encode_der; |
| 339 | xer_type_decoder_f C_1_2_decode_xer; |
| 340 | xer_type_encoder_f C_1_2_encode_xer; |
| 341 | oer_type_decoder_f C_1_2_decode_oer; |
| 342 | oer_type_encoder_f C_1_2_encode_oer; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 343 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 344 | /*** <<< CODE [C-1-2] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 345 | |
| 346 | int |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 347 | C_1_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 348 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 349 | long value; |
| 350 | |
| 351 | if(!sptr) { |
| 352 | ASN__CTFAIL(app_key, td, sptr, |
| 353 | "%s: value not given (%s:%d)", |
| 354 | td->name, __FILE__, __LINE__); |
| 355 | return -1; |
| 356 | } |
| 357 | |
| 358 | value = *(const long *)sptr; |
| 359 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 360 | if((value >= 1 && value <= 2)) { |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 361 | /* Constraint check succeeded */ |
| 362 | return 0; |
| 363 | } else { |
| 364 | ASN__CTFAIL(app_key, td, sptr, |
| 365 | "%s: constraint failed (%s:%d)", |
| 366 | td->name, __FILE__, __LINE__); |
| 367 | return -1; |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | /* |
| 372 | * This type is implemented using NativeInteger, |
| 373 | * so here we adjust the DEF accordingly. |
| 374 | */ |
| 375 | static void |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 376 | C_1_2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 377 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 378 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 379 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 380 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 381 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 382 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 383 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 384 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 385 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 386 | td->oer_decoder = asn_DEF_NativeInteger.oer_decoder; |
| 387 | td->oer_encoder = asn_DEF_NativeInteger.oer_encoder; |
| 388 | if(!td->oer_constraints) |
| 389 | td->oer_constraints = asn_DEF_NativeInteger.oer_constraints; |
| 390 | if(!td->per_constraints) |
| 391 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 392 | td->elements = asn_DEF_NativeInteger.elements; |
| 393 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 394 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 395 | } |
| 396 | |
| 397 | void |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 398 | C_1_2_free(asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 399 | void *struct_ptr, int contents_only) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 400 | C_1_2_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 401 | td->free_struct(td, struct_ptr, contents_only); |
| 402 | } |
| 403 | |
| 404 | int |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 405 | C_1_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 406 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 407 | C_1_2_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 408 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 409 | } |
| 410 | |
| 411 | asn_dec_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 412 | C_1_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 413 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 414 | C_1_2_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 415 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 416 | } |
| 417 | |
| 418 | asn_enc_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 419 | C_1_2_encode_der(asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 420 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 421 | asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 422 | C_1_2_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 423 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 424 | } |
| 425 | |
| 426 | asn_dec_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 427 | C_1_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 428 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 429 | C_1_2_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 430 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 431 | } |
| 432 | |
| 433 | asn_enc_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 434 | C_1_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 435 | int ilevel, enum xer_encoder_flags_e flags, |
| 436 | asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 437 | C_1_2_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 438 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 439 | } |
| 440 | |
| 441 | asn_dec_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 442 | C_1_2_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 443 | asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 444 | C_1_2_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 445 | return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size); |
| 446 | } |
| 447 | |
| 448 | asn_enc_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 449 | C_1_2_encode_oer(asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 450 | asn_oer_constraints_t *constraints, |
| 451 | void *structure, asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 452 | C_1_2_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 453 | return td->uper_encoder(td, constraints, structure, cb, app_key); |
| 454 | } |
| 455 | |
| 456 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 457 | /*** <<< CTDEFS [C-1-2] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 458 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 459 | static asn_oer_constraints_t asn_OER_type_C_1_2_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame^] | 460 | { 1, 1 } /* (1..2) */, |
| 461 | -1}; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 462 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 463 | /*** <<< STAT-DEFS [C-1-2] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 464 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 465 | static const ber_tlv_tag_t asn_DEF_C_1_2_tags_1[] = { |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 466 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 467 | }; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 468 | asn_TYPE_descriptor_t asn_DEF_C_1_2 = { |
| 469 | "C-1-2", |
| 470 | "C-1-2", |
| 471 | C_1_2_free, |
| 472 | C_1_2_print, |
| 473 | C_1_2_constraint, |
| 474 | C_1_2_decode_ber, |
| 475 | C_1_2_encode_der, |
| 476 | C_1_2_decode_xer, |
| 477 | C_1_2_encode_xer, |
| 478 | C_1_2_decode_oer, |
| 479 | C_1_2_encode_oer, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 480 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 481 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 482 | asn_DEF_C_1_2_tags_1, |
| 483 | sizeof(asn_DEF_C_1_2_tags_1) |
| 484 | /sizeof(asn_DEF_C_1_2_tags_1[0]), /* 1 */ |
| 485 | asn_DEF_C_1_2_tags_1, /* Same as above */ |
| 486 | sizeof(asn_DEF_C_1_2_tags_1) |
| 487 | /sizeof(asn_DEF_C_1_2_tags_1[0]), /* 1 */ |
| 488 | &asn_OER_type_C_1_2_constr_1, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 489 | 0, /* No PER visible constraints */ |
| 490 | 0, 0, /* No members */ |
| 491 | 0 /* No specifics */ |
| 492 | }; |
| 493 | |
| 494 | |
| 495 | /*** <<< INCLUDES [D-inv] >>> ***/ |
| 496 | |
| 497 | #include <NativeInteger.h> |
| 498 | |
| 499 | /*** <<< TYPE-DECLS [D-inv] >>> ***/ |
| 500 | |
| 501 | typedef long D_inv_t; |
| 502 | |
| 503 | /*** <<< FUNC-DECLS [D-inv] >>> ***/ |
| 504 | |
| 505 | extern asn_TYPE_descriptor_t asn_DEF_D_inv; |
| 506 | asn_struct_free_f D_inv_free; |
| 507 | asn_struct_print_f D_inv_print; |
| 508 | asn_constr_check_f D_inv_constraint; |
| 509 | ber_type_decoder_f D_inv_decode_ber; |
| 510 | der_type_encoder_f D_inv_encode_der; |
| 511 | xer_type_decoder_f D_inv_decode_xer; |
| 512 | xer_type_encoder_f D_inv_encode_xer; |
| 513 | oer_type_decoder_f D_inv_decode_oer; |
| 514 | oer_type_encoder_f D_inv_encode_oer; |
| 515 | |
| 516 | /*** <<< CODE [D-inv] >>> ***/ |
| 517 | |
| 518 | int |
| 519 | D_inv_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 520 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 521 | long value; |
| 522 | |
| 523 | if(!sptr) { |
| 524 | ASN__CTFAIL(app_key, td, sptr, |
| 525 | "%s: value not given (%s:%d)", |
| 526 | td->name, __FILE__, __LINE__); |
| 527 | return -1; |
| 528 | } |
| 529 | |
| 530 | value = *(const long *)sptr; |
| 531 | |
| 532 | if((value >= 0 && value <= 10)) { |
| 533 | /* Constraint check succeeded */ |
| 534 | return 0; |
| 535 | } else { |
| 536 | ASN__CTFAIL(app_key, td, sptr, |
| 537 | "%s: constraint failed (%s:%d)", |
| 538 | td->name, __FILE__, __LINE__); |
| 539 | return -1; |
| 540 | } |
| 541 | } |
| 542 | |
| 543 | /* |
| 544 | * This type is implemented using NativeInteger, |
| 545 | * so here we adjust the DEF accordingly. |
| 546 | */ |
| 547 | static void |
| 548 | D_inv_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 549 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 550 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 551 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 552 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 553 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 554 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 555 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 556 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 557 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 558 | td->oer_decoder = asn_DEF_NativeInteger.oer_decoder; |
| 559 | td->oer_encoder = asn_DEF_NativeInteger.oer_encoder; |
| 560 | if(!td->oer_constraints) |
| 561 | td->oer_constraints = asn_DEF_NativeInteger.oer_constraints; |
| 562 | if(!td->per_constraints) |
| 563 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 564 | td->elements = asn_DEF_NativeInteger.elements; |
| 565 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 566 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 567 | } |
| 568 | |
| 569 | void |
| 570 | D_inv_free(asn_TYPE_descriptor_t *td, |
| 571 | void *struct_ptr, int contents_only) { |
| 572 | D_inv_1_inherit_TYPE_descriptor(td); |
| 573 | td->free_struct(td, struct_ptr, contents_only); |
| 574 | } |
| 575 | |
| 576 | int |
| 577 | D_inv_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 578 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 579 | D_inv_1_inherit_TYPE_descriptor(td); |
| 580 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 581 | } |
| 582 | |
| 583 | asn_dec_rval_t |
| 584 | D_inv_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 585 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 586 | D_inv_1_inherit_TYPE_descriptor(td); |
| 587 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 588 | } |
| 589 | |
| 590 | asn_enc_rval_t |
| 591 | D_inv_encode_der(asn_TYPE_descriptor_t *td, |
| 592 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 593 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 594 | D_inv_1_inherit_TYPE_descriptor(td); |
| 595 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 596 | } |
| 597 | |
| 598 | asn_dec_rval_t |
| 599 | D_inv_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 600 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 601 | D_inv_1_inherit_TYPE_descriptor(td); |
| 602 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 603 | } |
| 604 | |
| 605 | asn_enc_rval_t |
| 606 | D_inv_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 607 | int ilevel, enum xer_encoder_flags_e flags, |
| 608 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 609 | D_inv_1_inherit_TYPE_descriptor(td); |
| 610 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 611 | } |
| 612 | |
| 613 | asn_dec_rval_t |
| 614 | D_inv_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 615 | asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) { |
| 616 | D_inv_1_inherit_TYPE_descriptor(td); |
| 617 | return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size); |
| 618 | } |
| 619 | |
| 620 | asn_enc_rval_t |
| 621 | D_inv_encode_oer(asn_TYPE_descriptor_t *td, |
| 622 | asn_oer_constraints_t *constraints, |
| 623 | void *structure, asn_app_consume_bytes_f *cb, void *app_key) { |
| 624 | D_inv_1_inherit_TYPE_descriptor(td); |
| 625 | return td->uper_encoder(td, constraints, structure, cb, app_key); |
| 626 | } |
| 627 | |
| 628 | |
| 629 | /*** <<< CTDEFS [D-inv] >>> ***/ |
| 630 | |
| 631 | static asn_oer_constraints_t asn_OER_type_D_inv_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame^] | 632 | { 0, 0 }, |
| 633 | -1}; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 634 | |
| 635 | /*** <<< STAT-DEFS [D-inv] >>> ***/ |
| 636 | |
| 637 | static const ber_tlv_tag_t asn_DEF_D_inv_tags_1[] = { |
| 638 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 639 | }; |
| 640 | asn_TYPE_descriptor_t asn_DEF_D_inv = { |
| 641 | "D-inv", |
| 642 | "D-inv", |
| 643 | D_inv_free, |
| 644 | D_inv_print, |
| 645 | D_inv_constraint, |
| 646 | D_inv_decode_ber, |
| 647 | D_inv_encode_der, |
| 648 | D_inv_decode_xer, |
| 649 | D_inv_encode_xer, |
| 650 | D_inv_decode_oer, |
| 651 | D_inv_encode_oer, |
| 652 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 653 | 0, /* Use generic outmost tag fetcher */ |
| 654 | asn_DEF_D_inv_tags_1, |
| 655 | sizeof(asn_DEF_D_inv_tags_1) |
| 656 | /sizeof(asn_DEF_D_inv_tags_1[0]), /* 1 */ |
| 657 | asn_DEF_D_inv_tags_1, /* Same as above */ |
| 658 | sizeof(asn_DEF_D_inv_tags_1) |
| 659 | /sizeof(asn_DEF_D_inv_tags_1[0]), /* 1 */ |
| 660 | &asn_OER_type_D_inv_constr_1, |
| 661 | 0, /* No PER visible constraints */ |
| 662 | 0, 0, /* No members */ |
| 663 | 0 /* No specifics */ |
| 664 | }; |
| 665 | |
| 666 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 667 | /*** <<< INCLUDES [E-2-5] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 668 | |
| 669 | #include <NativeInteger.h> |
| 670 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 671 | /*** <<< TYPE-DECLS [E-2-5] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 672 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 673 | typedef long E_2_5_t; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 674 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 675 | /*** <<< FUNC-DECLS [E-2-5] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 676 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 677 | extern asn_TYPE_descriptor_t asn_DEF_E_2_5; |
| 678 | asn_struct_free_f E_2_5_free; |
| 679 | asn_struct_print_f E_2_5_print; |
| 680 | asn_constr_check_f E_2_5_constraint; |
| 681 | ber_type_decoder_f E_2_5_decode_ber; |
| 682 | der_type_encoder_f E_2_5_encode_der; |
| 683 | xer_type_decoder_f E_2_5_decode_xer; |
| 684 | xer_type_encoder_f E_2_5_encode_xer; |
| 685 | oer_type_decoder_f E_2_5_decode_oer; |
| 686 | oer_type_encoder_f E_2_5_encode_oer; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 687 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 688 | /*** <<< CODE [E-2-5] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 689 | |
| 690 | int |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 691 | E_2_5_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 692 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 693 | long value; |
| 694 | |
| 695 | if(!sptr) { |
| 696 | ASN__CTFAIL(app_key, td, sptr, |
| 697 | "%s: value not given (%s:%d)", |
| 698 | td->name, __FILE__, __LINE__); |
| 699 | return -1; |
| 700 | } |
| 701 | |
| 702 | value = *(const long *)sptr; |
| 703 | |
| 704 | if((value >= 2 && value <= 5)) { |
| 705 | /* Constraint check succeeded */ |
| 706 | return 0; |
| 707 | } else { |
| 708 | ASN__CTFAIL(app_key, td, sptr, |
| 709 | "%s: constraint failed (%s:%d)", |
| 710 | td->name, __FILE__, __LINE__); |
| 711 | return -1; |
| 712 | } |
| 713 | } |
| 714 | |
| 715 | /* |
| 716 | * This type is implemented using NativeInteger, |
| 717 | * so here we adjust the DEF accordingly. |
| 718 | */ |
| 719 | static void |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 720 | E_2_5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 721 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 722 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 723 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 724 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 725 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 726 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 727 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 728 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 729 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 730 | td->oer_decoder = asn_DEF_NativeInteger.oer_decoder; |
| 731 | td->oer_encoder = asn_DEF_NativeInteger.oer_encoder; |
| 732 | if(!td->oer_constraints) |
| 733 | td->oer_constraints = asn_DEF_NativeInteger.oer_constraints; |
| 734 | if(!td->per_constraints) |
| 735 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 736 | td->elements = asn_DEF_NativeInteger.elements; |
| 737 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 738 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 739 | } |
| 740 | |
| 741 | void |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 742 | E_2_5_free(asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 743 | void *struct_ptr, int contents_only) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 744 | E_2_5_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 745 | td->free_struct(td, struct_ptr, contents_only); |
| 746 | } |
| 747 | |
| 748 | int |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 749 | E_2_5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 750 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 751 | E_2_5_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 752 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 753 | } |
| 754 | |
| 755 | asn_dec_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 756 | E_2_5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 757 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 758 | E_2_5_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 759 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 760 | } |
| 761 | |
| 762 | asn_enc_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 763 | E_2_5_encode_der(asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 764 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 765 | asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 766 | E_2_5_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 767 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 768 | } |
| 769 | |
| 770 | asn_dec_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 771 | E_2_5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 772 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 773 | E_2_5_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 774 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 775 | } |
| 776 | |
| 777 | asn_enc_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 778 | E_2_5_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 779 | int ilevel, enum xer_encoder_flags_e flags, |
| 780 | asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 781 | E_2_5_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 782 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 783 | } |
| 784 | |
| 785 | asn_dec_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 786 | E_2_5_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 787 | asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 788 | E_2_5_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 789 | return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size); |
| 790 | } |
| 791 | |
| 792 | asn_enc_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 793 | E_2_5_encode_oer(asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 794 | asn_oer_constraints_t *constraints, |
| 795 | void *structure, asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 796 | E_2_5_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 797 | return td->uper_encoder(td, constraints, structure, cb, app_key); |
| 798 | } |
| 799 | |
| 800 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 801 | /*** <<< CTDEFS [E-2-5] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 802 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 803 | static asn_oer_constraints_t asn_OER_type_E_2_5_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame^] | 804 | { 1, 1 } /* (2..5) */, |
| 805 | -1}; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 806 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 807 | /*** <<< STAT-DEFS [E-2-5] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 808 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 809 | static const ber_tlv_tag_t asn_DEF_E_2_5_tags_1[] = { |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 810 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 811 | }; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 812 | asn_TYPE_descriptor_t asn_DEF_E_2_5 = { |
| 813 | "E-2-5", |
| 814 | "E-2-5", |
| 815 | E_2_5_free, |
| 816 | E_2_5_print, |
| 817 | E_2_5_constraint, |
| 818 | E_2_5_decode_ber, |
| 819 | E_2_5_encode_der, |
| 820 | E_2_5_decode_xer, |
| 821 | E_2_5_encode_xer, |
| 822 | E_2_5_decode_oer, |
| 823 | E_2_5_encode_oer, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 824 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 825 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 826 | asn_DEF_E_2_5_tags_1, |
| 827 | sizeof(asn_DEF_E_2_5_tags_1) |
| 828 | /sizeof(asn_DEF_E_2_5_tags_1[0]), /* 1 */ |
| 829 | asn_DEF_E_2_5_tags_1, /* Same as above */ |
| 830 | sizeof(asn_DEF_E_2_5_tags_1) |
| 831 | /sizeof(asn_DEF_E_2_5_tags_1[0]), /* 1 */ |
| 832 | &asn_OER_type_E_2_5_constr_1, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 833 | 0, /* No PER visible constraints */ |
| 834 | 0, 0, /* No members */ |
| 835 | 0 /* No specifics */ |
| 836 | }; |
| 837 | |
| 838 | |
| 839 | /*** <<< INCLUDES [F-inv] >>> ***/ |
| 840 | |
| 841 | #include <NativeInteger.h> |
| 842 | |
| 843 | /*** <<< TYPE-DECLS [F-inv] >>> ***/ |
| 844 | |
| 845 | typedef long F_inv_t; |
| 846 | |
| 847 | /*** <<< FUNC-DECLS [F-inv] >>> ***/ |
| 848 | |
| 849 | extern asn_TYPE_descriptor_t asn_DEF_F_inv; |
| 850 | asn_struct_free_f F_inv_free; |
| 851 | asn_struct_print_f F_inv_print; |
| 852 | asn_constr_check_f F_inv_constraint; |
| 853 | ber_type_decoder_f F_inv_decode_ber; |
| 854 | der_type_encoder_f F_inv_encode_der; |
| 855 | xer_type_decoder_f F_inv_decode_xer; |
| 856 | xer_type_encoder_f F_inv_encode_xer; |
| 857 | oer_type_decoder_f F_inv_decode_oer; |
| 858 | oer_type_encoder_f F_inv_encode_oer; |
| 859 | |
| 860 | /*** <<< CODE [F-inv] >>> ***/ |
| 861 | |
| 862 | int |
| 863 | F_inv_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 864 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 865 | long value; |
| 866 | |
| 867 | if(!sptr) { |
| 868 | ASN__CTFAIL(app_key, td, sptr, |
| 869 | "%s: value not given (%s:%d)", |
| 870 | td->name, __FILE__, __LINE__); |
| 871 | return -1; |
| 872 | } |
| 873 | |
| 874 | value = *(const long *)sptr; |
| 875 | |
| 876 | if((value >= 2 && value <= 5)) { |
| 877 | /* Constraint check succeeded */ |
| 878 | return 0; |
| 879 | } else { |
| 880 | ASN__CTFAIL(app_key, td, sptr, |
| 881 | "%s: constraint failed (%s:%d)", |
| 882 | td->name, __FILE__, __LINE__); |
| 883 | return -1; |
| 884 | } |
| 885 | } |
| 886 | |
| 887 | /* |
| 888 | * This type is implemented using NativeInteger, |
| 889 | * so here we adjust the DEF accordingly. |
| 890 | */ |
| 891 | static void |
| 892 | F_inv_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 893 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 894 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 895 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 896 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 897 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 898 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 899 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 900 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 901 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 902 | td->oer_decoder = asn_DEF_NativeInteger.oer_decoder; |
| 903 | td->oer_encoder = asn_DEF_NativeInteger.oer_encoder; |
| 904 | if(!td->oer_constraints) |
| 905 | td->oer_constraints = asn_DEF_NativeInteger.oer_constraints; |
| 906 | if(!td->per_constraints) |
| 907 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 908 | td->elements = asn_DEF_NativeInteger.elements; |
| 909 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 910 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 911 | } |
| 912 | |
| 913 | void |
| 914 | F_inv_free(asn_TYPE_descriptor_t *td, |
| 915 | void *struct_ptr, int contents_only) { |
| 916 | F_inv_1_inherit_TYPE_descriptor(td); |
| 917 | td->free_struct(td, struct_ptr, contents_only); |
| 918 | } |
| 919 | |
| 920 | int |
| 921 | F_inv_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 922 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 923 | F_inv_1_inherit_TYPE_descriptor(td); |
| 924 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 925 | } |
| 926 | |
| 927 | asn_dec_rval_t |
| 928 | F_inv_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 929 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 930 | F_inv_1_inherit_TYPE_descriptor(td); |
| 931 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 932 | } |
| 933 | |
| 934 | asn_enc_rval_t |
| 935 | F_inv_encode_der(asn_TYPE_descriptor_t *td, |
| 936 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 937 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 938 | F_inv_1_inherit_TYPE_descriptor(td); |
| 939 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 940 | } |
| 941 | |
| 942 | asn_dec_rval_t |
| 943 | F_inv_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 944 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 945 | F_inv_1_inherit_TYPE_descriptor(td); |
| 946 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 947 | } |
| 948 | |
| 949 | asn_enc_rval_t |
| 950 | F_inv_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 951 | int ilevel, enum xer_encoder_flags_e flags, |
| 952 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 953 | F_inv_1_inherit_TYPE_descriptor(td); |
| 954 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 955 | } |
| 956 | |
| 957 | asn_dec_rval_t |
| 958 | F_inv_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 959 | asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) { |
| 960 | F_inv_1_inherit_TYPE_descriptor(td); |
| 961 | return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size); |
| 962 | } |
| 963 | |
| 964 | asn_enc_rval_t |
| 965 | F_inv_encode_oer(asn_TYPE_descriptor_t *td, |
| 966 | asn_oer_constraints_t *constraints, |
| 967 | void *structure, asn_app_consume_bytes_f *cb, void *app_key) { |
| 968 | F_inv_1_inherit_TYPE_descriptor(td); |
| 969 | return td->uper_encoder(td, constraints, structure, cb, app_key); |
| 970 | } |
| 971 | |
| 972 | |
| 973 | /*** <<< CTDEFS [F-inv] >>> ***/ |
| 974 | |
| 975 | static asn_oer_constraints_t asn_OER_type_F_inv_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame^] | 976 | { 1, 1 } /* (0..10) */, |
| 977 | -1}; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 978 | |
| 979 | /*** <<< STAT-DEFS [F-inv] >>> ***/ |
| 980 | |
| 981 | static const ber_tlv_tag_t asn_DEF_F_inv_tags_1[] = { |
| 982 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 983 | }; |
| 984 | asn_TYPE_descriptor_t asn_DEF_F_inv = { |
| 985 | "F-inv", |
| 986 | "F-inv", |
| 987 | F_inv_free, |
| 988 | F_inv_print, |
| 989 | F_inv_constraint, |
| 990 | F_inv_decode_ber, |
| 991 | F_inv_encode_der, |
| 992 | F_inv_decode_xer, |
| 993 | F_inv_encode_xer, |
| 994 | F_inv_decode_oer, |
| 995 | F_inv_encode_oer, |
| 996 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 997 | 0, /* Use generic outmost tag fetcher */ |
| 998 | asn_DEF_F_inv_tags_1, |
| 999 | sizeof(asn_DEF_F_inv_tags_1) |
| 1000 | /sizeof(asn_DEF_F_inv_tags_1[0]), /* 1 */ |
| 1001 | asn_DEF_F_inv_tags_1, /* Same as above */ |
| 1002 | sizeof(asn_DEF_F_inv_tags_1) |
| 1003 | /sizeof(asn_DEF_F_inv_tags_1[0]), /* 1 */ |
| 1004 | &asn_OER_type_F_inv_constr_1, |
| 1005 | 0, /* No PER visible constraints */ |
| 1006 | 0, 0, /* No members */ |
| 1007 | 0 /* No specifics */ |
| 1008 | }; |
| 1009 | |
| 1010 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1011 | /*** <<< INCLUDES [G-3-3] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1012 | |
| 1013 | #include <NativeInteger.h> |
| 1014 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1015 | /*** <<< TYPE-DECLS [G-3-3] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1016 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1017 | typedef long G_3_3_t; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1018 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1019 | /*** <<< FUNC-DECLS [G-3-3] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1020 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1021 | extern asn_TYPE_descriptor_t asn_DEF_G_3_3; |
| 1022 | asn_struct_free_f G_3_3_free; |
| 1023 | asn_struct_print_f G_3_3_print; |
| 1024 | asn_constr_check_f G_3_3_constraint; |
| 1025 | ber_type_decoder_f G_3_3_decode_ber; |
| 1026 | der_type_encoder_f G_3_3_encode_der; |
| 1027 | xer_type_decoder_f G_3_3_decode_xer; |
| 1028 | xer_type_encoder_f G_3_3_encode_xer; |
| 1029 | oer_type_decoder_f G_3_3_decode_oer; |
| 1030 | oer_type_encoder_f G_3_3_encode_oer; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1031 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1032 | /*** <<< CODE [G-3-3] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1033 | |
| 1034 | int |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1035 | G_3_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1036 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 1037 | long value; |
| 1038 | |
| 1039 | if(!sptr) { |
| 1040 | ASN__CTFAIL(app_key, td, sptr, |
| 1041 | "%s: value not given (%s:%d)", |
| 1042 | td->name, __FILE__, __LINE__); |
| 1043 | return -1; |
| 1044 | } |
| 1045 | |
| 1046 | value = *(const long *)sptr; |
| 1047 | |
| 1048 | if((value == 3)) { |
| 1049 | /* Constraint check succeeded */ |
| 1050 | return 0; |
| 1051 | } else { |
| 1052 | ASN__CTFAIL(app_key, td, sptr, |
| 1053 | "%s: constraint failed (%s:%d)", |
| 1054 | td->name, __FILE__, __LINE__); |
| 1055 | return -1; |
| 1056 | } |
| 1057 | } |
| 1058 | |
| 1059 | /* |
| 1060 | * This type is implemented using NativeInteger, |
| 1061 | * so here we adjust the DEF accordingly. |
| 1062 | */ |
| 1063 | static void |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1064 | G_3_3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1065 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 1066 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 1067 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 1068 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 1069 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 1070 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 1071 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 1072 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 1073 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 1074 | td->oer_decoder = asn_DEF_NativeInteger.oer_decoder; |
| 1075 | td->oer_encoder = asn_DEF_NativeInteger.oer_encoder; |
| 1076 | if(!td->oer_constraints) |
| 1077 | td->oer_constraints = asn_DEF_NativeInteger.oer_constraints; |
| 1078 | if(!td->per_constraints) |
| 1079 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 1080 | td->elements = asn_DEF_NativeInteger.elements; |
| 1081 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 1082 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 1083 | } |
| 1084 | |
| 1085 | void |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1086 | G_3_3_free(asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1087 | void *struct_ptr, int contents_only) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1088 | G_3_3_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1089 | td->free_struct(td, struct_ptr, contents_only); |
| 1090 | } |
| 1091 | |
| 1092 | int |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1093 | G_3_3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1094 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1095 | G_3_3_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1096 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1097 | } |
| 1098 | |
| 1099 | asn_dec_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1100 | G_3_3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1101 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1102 | G_3_3_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1103 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1104 | } |
| 1105 | |
| 1106 | asn_enc_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1107 | G_3_3_encode_der(asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1108 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1109 | asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1110 | G_3_3_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1111 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1112 | } |
| 1113 | |
| 1114 | asn_dec_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1115 | G_3_3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1116 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1117 | G_3_3_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1118 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1119 | } |
| 1120 | |
| 1121 | asn_enc_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1122 | G_3_3_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1123 | int ilevel, enum xer_encoder_flags_e flags, |
| 1124 | asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1125 | G_3_3_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1126 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1127 | } |
| 1128 | |
| 1129 | asn_dec_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1130 | G_3_3_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1131 | asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1132 | G_3_3_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1133 | return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size); |
| 1134 | } |
| 1135 | |
| 1136 | asn_enc_rval_t |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1137 | G_3_3_encode_oer(asn_TYPE_descriptor_t *td, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1138 | asn_oer_constraints_t *constraints, |
| 1139 | void *structure, asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1140 | G_3_3_1_inherit_TYPE_descriptor(td); |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1141 | return td->uper_encoder(td, constraints, structure, cb, app_key); |
| 1142 | } |
| 1143 | |
| 1144 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1145 | /*** <<< CTDEFS [G-3-3] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1146 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1147 | static asn_oer_constraints_t asn_OER_type_G_3_3_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame^] | 1148 | { 1, 1 } /* (3..3) */, |
| 1149 | -1}; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1150 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1151 | /*** <<< STAT-DEFS [G-3-3] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1152 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1153 | static const ber_tlv_tag_t asn_DEF_G_3_3_tags_1[] = { |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1154 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1155 | }; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1156 | asn_TYPE_descriptor_t asn_DEF_G_3_3 = { |
| 1157 | "G-3-3", |
| 1158 | "G-3-3", |
| 1159 | G_3_3_free, |
| 1160 | G_3_3_print, |
| 1161 | G_3_3_constraint, |
| 1162 | G_3_3_decode_ber, |
| 1163 | G_3_3_encode_der, |
| 1164 | G_3_3_decode_xer, |
| 1165 | G_3_3_encode_xer, |
| 1166 | G_3_3_decode_oer, |
| 1167 | G_3_3_encode_oer, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1168 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 1169 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1170 | asn_DEF_G_3_3_tags_1, |
| 1171 | sizeof(asn_DEF_G_3_3_tags_1) |
| 1172 | /sizeof(asn_DEF_G_3_3_tags_1[0]), /* 1 */ |
| 1173 | asn_DEF_G_3_3_tags_1, /* Same as above */ |
| 1174 | sizeof(asn_DEF_G_3_3_tags_1) |
| 1175 | /sizeof(asn_DEF_G_3_3_tags_1[0]), /* 1 */ |
| 1176 | &asn_OER_type_G_3_3_constr_1, |
| 1177 | 0, /* No PER visible constraints */ |
| 1178 | 0, 0, /* No members */ |
| 1179 | 0 /* No specifics */ |
| 1180 | }; |
| 1181 | |
| 1182 | |
| 1183 | /*** <<< INCLUDES [H-4-5] >>> ***/ |
| 1184 | |
| 1185 | #include <NativeInteger.h> |
| 1186 | |
| 1187 | /*** <<< TYPE-DECLS [H-4-5] >>> ***/ |
| 1188 | |
| 1189 | typedef long H_4_5_t; |
| 1190 | |
| 1191 | /*** <<< FUNC-DECLS [H-4-5] >>> ***/ |
| 1192 | |
| 1193 | extern asn_TYPE_descriptor_t asn_DEF_H_4_5; |
| 1194 | asn_struct_free_f H_4_5_free; |
| 1195 | asn_struct_print_f H_4_5_print; |
| 1196 | asn_constr_check_f H_4_5_constraint; |
| 1197 | ber_type_decoder_f H_4_5_decode_ber; |
| 1198 | der_type_encoder_f H_4_5_encode_der; |
| 1199 | xer_type_decoder_f H_4_5_decode_xer; |
| 1200 | xer_type_encoder_f H_4_5_encode_xer; |
| 1201 | oer_type_decoder_f H_4_5_decode_oer; |
| 1202 | oer_type_encoder_f H_4_5_encode_oer; |
| 1203 | |
| 1204 | /*** <<< CODE [H-4-5] >>> ***/ |
| 1205 | |
| 1206 | int |
| 1207 | H_4_5_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1208 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 1209 | long value; |
| 1210 | |
| 1211 | if(!sptr) { |
| 1212 | ASN__CTFAIL(app_key, td, sptr, |
| 1213 | "%s: value not given (%s:%d)", |
| 1214 | td->name, __FILE__, __LINE__); |
| 1215 | return -1; |
| 1216 | } |
| 1217 | |
| 1218 | value = *(const long *)sptr; |
| 1219 | |
| 1220 | if((value >= 4 && value <= 5)) { |
| 1221 | /* Constraint check succeeded */ |
| 1222 | return 0; |
| 1223 | } else { |
| 1224 | ASN__CTFAIL(app_key, td, sptr, |
| 1225 | "%s: constraint failed (%s:%d)", |
| 1226 | td->name, __FILE__, __LINE__); |
| 1227 | return -1; |
| 1228 | } |
| 1229 | } |
| 1230 | |
| 1231 | /* |
| 1232 | * This type is implemented using NativeInteger, |
| 1233 | * so here we adjust the DEF accordingly. |
| 1234 | */ |
| 1235 | static void |
| 1236 | H_4_5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 1237 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 1238 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 1239 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 1240 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 1241 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 1242 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 1243 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 1244 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 1245 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 1246 | td->oer_decoder = asn_DEF_NativeInteger.oer_decoder; |
| 1247 | td->oer_encoder = asn_DEF_NativeInteger.oer_encoder; |
| 1248 | if(!td->oer_constraints) |
| 1249 | td->oer_constraints = asn_DEF_NativeInteger.oer_constraints; |
| 1250 | if(!td->per_constraints) |
| 1251 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 1252 | td->elements = asn_DEF_NativeInteger.elements; |
| 1253 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 1254 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 1255 | } |
| 1256 | |
| 1257 | void |
| 1258 | H_4_5_free(asn_TYPE_descriptor_t *td, |
| 1259 | void *struct_ptr, int contents_only) { |
| 1260 | H_4_5_1_inherit_TYPE_descriptor(td); |
| 1261 | td->free_struct(td, struct_ptr, contents_only); |
| 1262 | } |
| 1263 | |
| 1264 | int |
| 1265 | H_4_5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1266 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1267 | H_4_5_1_inherit_TYPE_descriptor(td); |
| 1268 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1269 | } |
| 1270 | |
| 1271 | asn_dec_rval_t |
| 1272 | H_4_5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1273 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1274 | H_4_5_1_inherit_TYPE_descriptor(td); |
| 1275 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1276 | } |
| 1277 | |
| 1278 | asn_enc_rval_t |
| 1279 | H_4_5_encode_der(asn_TYPE_descriptor_t *td, |
| 1280 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1281 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1282 | H_4_5_1_inherit_TYPE_descriptor(td); |
| 1283 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1284 | } |
| 1285 | |
| 1286 | asn_dec_rval_t |
| 1287 | H_4_5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1288 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1289 | H_4_5_1_inherit_TYPE_descriptor(td); |
| 1290 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1291 | } |
| 1292 | |
| 1293 | asn_enc_rval_t |
| 1294 | H_4_5_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1295 | int ilevel, enum xer_encoder_flags_e flags, |
| 1296 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1297 | H_4_5_1_inherit_TYPE_descriptor(td); |
| 1298 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1299 | } |
| 1300 | |
| 1301 | asn_dec_rval_t |
| 1302 | H_4_5_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1303 | asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) { |
| 1304 | H_4_5_1_inherit_TYPE_descriptor(td); |
| 1305 | return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size); |
| 1306 | } |
| 1307 | |
| 1308 | asn_enc_rval_t |
| 1309 | H_4_5_encode_oer(asn_TYPE_descriptor_t *td, |
| 1310 | asn_oer_constraints_t *constraints, |
| 1311 | void *structure, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1312 | H_4_5_1_inherit_TYPE_descriptor(td); |
| 1313 | return td->uper_encoder(td, constraints, structure, cb, app_key); |
| 1314 | } |
| 1315 | |
| 1316 | |
| 1317 | /*** <<< CTDEFS [H-4-5] >>> ***/ |
| 1318 | |
| 1319 | static asn_oer_constraints_t asn_OER_type_H_4_5_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame^] | 1320 | { 1, 1 } /* (4..5) */, |
| 1321 | -1}; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1322 | |
| 1323 | /*** <<< STAT-DEFS [H-4-5] >>> ***/ |
| 1324 | |
| 1325 | static const ber_tlv_tag_t asn_DEF_H_4_5_tags_1[] = { |
| 1326 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1327 | }; |
| 1328 | asn_TYPE_descriptor_t asn_DEF_H_4_5 = { |
| 1329 | "H-4-5", |
| 1330 | "H-4-5", |
| 1331 | H_4_5_free, |
| 1332 | H_4_5_print, |
| 1333 | H_4_5_constraint, |
| 1334 | H_4_5_decode_ber, |
| 1335 | H_4_5_encode_der, |
| 1336 | H_4_5_decode_xer, |
| 1337 | H_4_5_encode_xer, |
| 1338 | H_4_5_decode_oer, |
| 1339 | H_4_5_encode_oer, |
| 1340 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 1341 | 0, /* Use generic outmost tag fetcher */ |
| 1342 | asn_DEF_H_4_5_tags_1, |
| 1343 | sizeof(asn_DEF_H_4_5_tags_1) |
| 1344 | /sizeof(asn_DEF_H_4_5_tags_1[0]), /* 1 */ |
| 1345 | asn_DEF_H_4_5_tags_1, /* Same as above */ |
| 1346 | sizeof(asn_DEF_H_4_5_tags_1) |
| 1347 | /sizeof(asn_DEF_H_4_5_tags_1[0]), /* 1 */ |
| 1348 | &asn_OER_type_H_4_5_constr_1, |
| 1349 | 0, /* No PER visible constraints */ |
| 1350 | 0, 0, /* No members */ |
| 1351 | 0 /* No specifics */ |
| 1352 | }; |
| 1353 | |
| 1354 | |
| 1355 | /*** <<< INCLUDES [I-0-5] >>> ***/ |
| 1356 | |
| 1357 | #include <NativeInteger.h> |
| 1358 | |
| 1359 | /*** <<< TYPE-DECLS [I-0-5] >>> ***/ |
| 1360 | |
| 1361 | typedef long I_0_5_t; |
| 1362 | |
| 1363 | /*** <<< FUNC-DECLS [I-0-5] >>> ***/ |
| 1364 | |
| 1365 | extern asn_TYPE_descriptor_t asn_DEF_I_0_5; |
| 1366 | asn_struct_free_f I_0_5_free; |
| 1367 | asn_struct_print_f I_0_5_print; |
| 1368 | asn_constr_check_f I_0_5_constraint; |
| 1369 | ber_type_decoder_f I_0_5_decode_ber; |
| 1370 | der_type_encoder_f I_0_5_encode_der; |
| 1371 | xer_type_decoder_f I_0_5_decode_xer; |
| 1372 | xer_type_encoder_f I_0_5_encode_xer; |
| 1373 | oer_type_decoder_f I_0_5_decode_oer; |
| 1374 | oer_type_encoder_f I_0_5_encode_oer; |
| 1375 | |
| 1376 | /*** <<< CODE [I-0-5] >>> ***/ |
| 1377 | |
| 1378 | int |
| 1379 | I_0_5_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1380 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 1381 | long value; |
| 1382 | |
| 1383 | if(!sptr) { |
| 1384 | ASN__CTFAIL(app_key, td, sptr, |
| 1385 | "%s: value not given (%s:%d)", |
| 1386 | td->name, __FILE__, __LINE__); |
| 1387 | return -1; |
| 1388 | } |
| 1389 | |
| 1390 | value = *(const long *)sptr; |
| 1391 | |
| 1392 | if((value >= 4 && value <= 5)) { |
| 1393 | /* Constraint check succeeded */ |
| 1394 | return 0; |
| 1395 | } else { |
| 1396 | ASN__CTFAIL(app_key, td, sptr, |
| 1397 | "%s: constraint failed (%s:%d)", |
| 1398 | td->name, __FILE__, __LINE__); |
| 1399 | return -1; |
| 1400 | } |
| 1401 | } |
| 1402 | |
| 1403 | /* |
| 1404 | * This type is implemented using NativeInteger, |
| 1405 | * so here we adjust the DEF accordingly. |
| 1406 | */ |
| 1407 | static void |
| 1408 | I_0_5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 1409 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 1410 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 1411 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 1412 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 1413 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 1414 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 1415 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 1416 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 1417 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 1418 | td->oer_decoder = asn_DEF_NativeInteger.oer_decoder; |
| 1419 | td->oer_encoder = asn_DEF_NativeInteger.oer_encoder; |
| 1420 | if(!td->oer_constraints) |
| 1421 | td->oer_constraints = asn_DEF_NativeInteger.oer_constraints; |
| 1422 | if(!td->per_constraints) |
| 1423 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 1424 | td->elements = asn_DEF_NativeInteger.elements; |
| 1425 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 1426 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 1427 | } |
| 1428 | |
| 1429 | void |
| 1430 | I_0_5_free(asn_TYPE_descriptor_t *td, |
| 1431 | void *struct_ptr, int contents_only) { |
| 1432 | I_0_5_1_inherit_TYPE_descriptor(td); |
| 1433 | td->free_struct(td, struct_ptr, contents_only); |
| 1434 | } |
| 1435 | |
| 1436 | int |
| 1437 | I_0_5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1438 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1439 | I_0_5_1_inherit_TYPE_descriptor(td); |
| 1440 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1441 | } |
| 1442 | |
| 1443 | asn_dec_rval_t |
| 1444 | I_0_5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1445 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1446 | I_0_5_1_inherit_TYPE_descriptor(td); |
| 1447 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1448 | } |
| 1449 | |
| 1450 | asn_enc_rval_t |
| 1451 | I_0_5_encode_der(asn_TYPE_descriptor_t *td, |
| 1452 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1453 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1454 | I_0_5_1_inherit_TYPE_descriptor(td); |
| 1455 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1456 | } |
| 1457 | |
| 1458 | asn_dec_rval_t |
| 1459 | I_0_5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1460 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1461 | I_0_5_1_inherit_TYPE_descriptor(td); |
| 1462 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1463 | } |
| 1464 | |
| 1465 | asn_enc_rval_t |
| 1466 | I_0_5_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1467 | int ilevel, enum xer_encoder_flags_e flags, |
| 1468 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1469 | I_0_5_1_inherit_TYPE_descriptor(td); |
| 1470 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1471 | } |
| 1472 | |
| 1473 | asn_dec_rval_t |
| 1474 | I_0_5_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1475 | asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) { |
| 1476 | I_0_5_1_inherit_TYPE_descriptor(td); |
| 1477 | return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size); |
| 1478 | } |
| 1479 | |
| 1480 | asn_enc_rval_t |
| 1481 | I_0_5_encode_oer(asn_TYPE_descriptor_t *td, |
| 1482 | asn_oer_constraints_t *constraints, |
| 1483 | void *structure, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1484 | I_0_5_1_inherit_TYPE_descriptor(td); |
| 1485 | return td->uper_encoder(td, constraints, structure, cb, app_key); |
| 1486 | } |
| 1487 | |
| 1488 | |
| 1489 | /*** <<< CTDEFS [I-0-5] >>> ***/ |
| 1490 | |
| 1491 | static asn_oer_constraints_t asn_OER_type_I_0_5_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame^] | 1492 | { 1, 1 } /* (0..5) */, |
| 1493 | -1}; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1494 | |
| 1495 | /*** <<< STAT-DEFS [I-0-5] >>> ***/ |
| 1496 | |
| 1497 | static const ber_tlv_tag_t asn_DEF_I_0_5_tags_1[] = { |
| 1498 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1499 | }; |
| 1500 | asn_TYPE_descriptor_t asn_DEF_I_0_5 = { |
| 1501 | "I-0-5", |
| 1502 | "I-0-5", |
| 1503 | I_0_5_free, |
| 1504 | I_0_5_print, |
| 1505 | I_0_5_constraint, |
| 1506 | I_0_5_decode_ber, |
| 1507 | I_0_5_encode_der, |
| 1508 | I_0_5_decode_xer, |
| 1509 | I_0_5_encode_xer, |
| 1510 | I_0_5_decode_oer, |
| 1511 | I_0_5_encode_oer, |
| 1512 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 1513 | 0, /* Use generic outmost tag fetcher */ |
| 1514 | asn_DEF_I_0_5_tags_1, |
| 1515 | sizeof(asn_DEF_I_0_5_tags_1) |
| 1516 | /sizeof(asn_DEF_I_0_5_tags_1[0]), /* 1 */ |
| 1517 | asn_DEF_I_0_5_tags_1, /* Same as above */ |
| 1518 | sizeof(asn_DEF_I_0_5_tags_1) |
| 1519 | /sizeof(asn_DEF_I_0_5_tags_1[0]), /* 1 */ |
| 1520 | &asn_OER_type_I_0_5_constr_1, |
| 1521 | 0, /* No PER visible constraints */ |
| 1522 | 0, 0, /* No members */ |
| 1523 | 0 /* No specifics */ |
| 1524 | }; |
| 1525 | |
| 1526 | |
| 1527 | /*** <<< INCLUDES [J-4-9] >>> ***/ |
| 1528 | |
| 1529 | #include <NativeInteger.h> |
| 1530 | |
| 1531 | /*** <<< TYPE-DECLS [J-4-9] >>> ***/ |
| 1532 | |
| 1533 | typedef long J_4_9_t; |
| 1534 | |
| 1535 | /*** <<< FUNC-DECLS [J-4-9] >>> ***/ |
| 1536 | |
| 1537 | extern asn_TYPE_descriptor_t asn_DEF_J_4_9; |
| 1538 | asn_struct_free_f J_4_9_free; |
| 1539 | asn_struct_print_f J_4_9_print; |
| 1540 | asn_constr_check_f J_4_9_constraint; |
| 1541 | ber_type_decoder_f J_4_9_decode_ber; |
| 1542 | der_type_encoder_f J_4_9_encode_der; |
| 1543 | xer_type_decoder_f J_4_9_decode_xer; |
| 1544 | xer_type_encoder_f J_4_9_encode_xer; |
| 1545 | oer_type_decoder_f J_4_9_decode_oer; |
| 1546 | oer_type_encoder_f J_4_9_encode_oer; |
| 1547 | |
| 1548 | /*** <<< CODE [J-4-9] >>> ***/ |
| 1549 | |
| 1550 | int |
| 1551 | J_4_9_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1552 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 1553 | long value; |
| 1554 | |
| 1555 | if(!sptr) { |
| 1556 | ASN__CTFAIL(app_key, td, sptr, |
| 1557 | "%s: value not given (%s:%d)", |
| 1558 | td->name, __FILE__, __LINE__); |
| 1559 | return -1; |
| 1560 | } |
| 1561 | |
| 1562 | value = *(const long *)sptr; |
| 1563 | |
| 1564 | if((value >= 4 && value <= 5)) { |
| 1565 | /* Constraint check succeeded */ |
| 1566 | return 0; |
| 1567 | } else { |
| 1568 | ASN__CTFAIL(app_key, td, sptr, |
| 1569 | "%s: constraint failed (%s:%d)", |
| 1570 | td->name, __FILE__, __LINE__); |
| 1571 | return -1; |
| 1572 | } |
| 1573 | } |
| 1574 | |
| 1575 | /* |
| 1576 | * This type is implemented using NativeInteger, |
| 1577 | * so here we adjust the DEF accordingly. |
| 1578 | */ |
| 1579 | static void |
| 1580 | J_4_9_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 1581 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 1582 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 1583 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 1584 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 1585 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 1586 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 1587 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 1588 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 1589 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 1590 | td->oer_decoder = asn_DEF_NativeInteger.oer_decoder; |
| 1591 | td->oer_encoder = asn_DEF_NativeInteger.oer_encoder; |
| 1592 | if(!td->oer_constraints) |
| 1593 | td->oer_constraints = asn_DEF_NativeInteger.oer_constraints; |
| 1594 | if(!td->per_constraints) |
| 1595 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 1596 | td->elements = asn_DEF_NativeInteger.elements; |
| 1597 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 1598 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 1599 | } |
| 1600 | |
| 1601 | void |
| 1602 | J_4_9_free(asn_TYPE_descriptor_t *td, |
| 1603 | void *struct_ptr, int contents_only) { |
| 1604 | J_4_9_1_inherit_TYPE_descriptor(td); |
| 1605 | td->free_struct(td, struct_ptr, contents_only); |
| 1606 | } |
| 1607 | |
| 1608 | int |
| 1609 | J_4_9_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1610 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1611 | J_4_9_1_inherit_TYPE_descriptor(td); |
| 1612 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1613 | } |
| 1614 | |
| 1615 | asn_dec_rval_t |
| 1616 | J_4_9_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1617 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1618 | J_4_9_1_inherit_TYPE_descriptor(td); |
| 1619 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1620 | } |
| 1621 | |
| 1622 | asn_enc_rval_t |
| 1623 | J_4_9_encode_der(asn_TYPE_descriptor_t *td, |
| 1624 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1625 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1626 | J_4_9_1_inherit_TYPE_descriptor(td); |
| 1627 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1628 | } |
| 1629 | |
| 1630 | asn_dec_rval_t |
| 1631 | J_4_9_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1632 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1633 | J_4_9_1_inherit_TYPE_descriptor(td); |
| 1634 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1635 | } |
| 1636 | |
| 1637 | asn_enc_rval_t |
| 1638 | J_4_9_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1639 | int ilevel, enum xer_encoder_flags_e flags, |
| 1640 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1641 | J_4_9_1_inherit_TYPE_descriptor(td); |
| 1642 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1643 | } |
| 1644 | |
| 1645 | asn_dec_rval_t |
| 1646 | J_4_9_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1647 | asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) { |
| 1648 | J_4_9_1_inherit_TYPE_descriptor(td); |
| 1649 | return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size); |
| 1650 | } |
| 1651 | |
| 1652 | asn_enc_rval_t |
| 1653 | J_4_9_encode_oer(asn_TYPE_descriptor_t *td, |
| 1654 | asn_oer_constraints_t *constraints, |
| 1655 | void *structure, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1656 | J_4_9_1_inherit_TYPE_descriptor(td); |
| 1657 | return td->uper_encoder(td, constraints, structure, cb, app_key); |
| 1658 | } |
| 1659 | |
| 1660 | |
| 1661 | /*** <<< CTDEFS [J-4-9] >>> ***/ |
| 1662 | |
| 1663 | static asn_oer_constraints_t asn_OER_type_J_4_9_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame^] | 1664 | { 1, 1 } /* (4..9) */, |
| 1665 | -1}; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1666 | |
| 1667 | /*** <<< STAT-DEFS [J-4-9] >>> ***/ |
| 1668 | |
| 1669 | static const ber_tlv_tag_t asn_DEF_J_4_9_tags_1[] = { |
| 1670 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1671 | }; |
| 1672 | asn_TYPE_descriptor_t asn_DEF_J_4_9 = { |
| 1673 | "J-4-9", |
| 1674 | "J-4-9", |
| 1675 | J_4_9_free, |
| 1676 | J_4_9_print, |
| 1677 | J_4_9_constraint, |
| 1678 | J_4_9_decode_ber, |
| 1679 | J_4_9_encode_der, |
| 1680 | J_4_9_decode_xer, |
| 1681 | J_4_9_encode_xer, |
| 1682 | J_4_9_decode_oer, |
| 1683 | J_4_9_encode_oer, |
| 1684 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 1685 | 0, /* Use generic outmost tag fetcher */ |
| 1686 | asn_DEF_J_4_9_tags_1, |
| 1687 | sizeof(asn_DEF_J_4_9_tags_1) |
| 1688 | /sizeof(asn_DEF_J_4_9_tags_1[0]), /* 1 */ |
| 1689 | asn_DEF_J_4_9_tags_1, /* Same as above */ |
| 1690 | sizeof(asn_DEF_J_4_9_tags_1) |
| 1691 | /sizeof(asn_DEF_J_4_9_tags_1[0]), /* 1 */ |
| 1692 | &asn_OER_type_J_4_9_constr_1, |
| 1693 | 0, /* No PER visible constraints */ |
| 1694 | 0, 0, /* No members */ |
| 1695 | 0 /* No specifics */ |
| 1696 | }; |
| 1697 | |
| 1698 | |
| 1699 | /*** <<< INCLUDES [K-inv] >>> ***/ |
| 1700 | |
| 1701 | #include <NativeInteger.h> |
| 1702 | |
| 1703 | /*** <<< TYPE-DECLS [K-inv] >>> ***/ |
| 1704 | |
| 1705 | typedef long K_inv_t; |
| 1706 | |
| 1707 | /*** <<< FUNC-DECLS [K-inv] >>> ***/ |
| 1708 | |
| 1709 | extern asn_TYPE_descriptor_t asn_DEF_K_inv; |
| 1710 | asn_struct_free_f K_inv_free; |
| 1711 | asn_struct_print_f K_inv_print; |
| 1712 | asn_constr_check_f K_inv_constraint; |
| 1713 | ber_type_decoder_f K_inv_decode_ber; |
| 1714 | der_type_encoder_f K_inv_encode_der; |
| 1715 | xer_type_decoder_f K_inv_decode_xer; |
| 1716 | xer_type_encoder_f K_inv_encode_xer; |
| 1717 | oer_type_decoder_f K_inv_decode_oer; |
| 1718 | oer_type_encoder_f K_inv_encode_oer; |
| 1719 | |
| 1720 | /*** <<< CODE [K-inv] >>> ***/ |
| 1721 | |
| 1722 | int |
| 1723 | K_inv_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1724 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 1725 | long value; |
| 1726 | |
| 1727 | if(!sptr) { |
| 1728 | ASN__CTFAIL(app_key, td, sptr, |
| 1729 | "%s: value not given (%s:%d)", |
| 1730 | td->name, __FILE__, __LINE__); |
| 1731 | return -1; |
| 1732 | } |
| 1733 | |
| 1734 | value = *(const long *)sptr; |
| 1735 | |
| 1736 | if((value >= 4 && value <= 5)) { |
| 1737 | /* Constraint check succeeded */ |
| 1738 | return 0; |
| 1739 | } else { |
| 1740 | ASN__CTFAIL(app_key, td, sptr, |
| 1741 | "%s: constraint failed (%s:%d)", |
| 1742 | td->name, __FILE__, __LINE__); |
| 1743 | return -1; |
| 1744 | } |
| 1745 | } |
| 1746 | |
| 1747 | /* |
| 1748 | * This type is implemented using NativeInteger, |
| 1749 | * so here we adjust the DEF accordingly. |
| 1750 | */ |
| 1751 | static void |
| 1752 | K_inv_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 1753 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 1754 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 1755 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 1756 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 1757 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 1758 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 1759 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 1760 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 1761 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 1762 | td->oer_decoder = asn_DEF_NativeInteger.oer_decoder; |
| 1763 | td->oer_encoder = asn_DEF_NativeInteger.oer_encoder; |
| 1764 | if(!td->oer_constraints) |
| 1765 | td->oer_constraints = asn_DEF_NativeInteger.oer_constraints; |
| 1766 | if(!td->per_constraints) |
| 1767 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 1768 | td->elements = asn_DEF_NativeInteger.elements; |
| 1769 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 1770 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 1771 | } |
| 1772 | |
| 1773 | void |
| 1774 | K_inv_free(asn_TYPE_descriptor_t *td, |
| 1775 | void *struct_ptr, int contents_only) { |
| 1776 | K_inv_1_inherit_TYPE_descriptor(td); |
| 1777 | td->free_struct(td, struct_ptr, contents_only); |
| 1778 | } |
| 1779 | |
| 1780 | int |
| 1781 | K_inv_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1782 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1783 | K_inv_1_inherit_TYPE_descriptor(td); |
| 1784 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1785 | } |
| 1786 | |
| 1787 | asn_dec_rval_t |
| 1788 | K_inv_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1789 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1790 | K_inv_1_inherit_TYPE_descriptor(td); |
| 1791 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1792 | } |
| 1793 | |
| 1794 | asn_enc_rval_t |
| 1795 | K_inv_encode_der(asn_TYPE_descriptor_t *td, |
| 1796 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1797 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1798 | K_inv_1_inherit_TYPE_descriptor(td); |
| 1799 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1800 | } |
| 1801 | |
| 1802 | asn_dec_rval_t |
| 1803 | K_inv_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1804 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1805 | K_inv_1_inherit_TYPE_descriptor(td); |
| 1806 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1807 | } |
| 1808 | |
| 1809 | asn_enc_rval_t |
| 1810 | K_inv_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1811 | int ilevel, enum xer_encoder_flags_e flags, |
| 1812 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1813 | K_inv_1_inherit_TYPE_descriptor(td); |
| 1814 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1815 | } |
| 1816 | |
| 1817 | asn_dec_rval_t |
| 1818 | K_inv_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1819 | asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) { |
| 1820 | K_inv_1_inherit_TYPE_descriptor(td); |
| 1821 | return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size); |
| 1822 | } |
| 1823 | |
| 1824 | asn_enc_rval_t |
| 1825 | K_inv_encode_oer(asn_TYPE_descriptor_t *td, |
| 1826 | asn_oer_constraints_t *constraints, |
| 1827 | void *structure, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1828 | K_inv_1_inherit_TYPE_descriptor(td); |
| 1829 | return td->uper_encoder(td, constraints, structure, cb, app_key); |
| 1830 | } |
| 1831 | |
| 1832 | |
| 1833 | /*** <<< CTDEFS [K-inv] >>> ***/ |
| 1834 | |
| 1835 | static asn_oer_constraints_t asn_OER_type_K_inv_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame^] | 1836 | { 0, 0 }, |
| 1837 | -1}; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1838 | |
| 1839 | /*** <<< STAT-DEFS [K-inv] >>> ***/ |
| 1840 | |
| 1841 | static const ber_tlv_tag_t asn_DEF_K_inv_tags_1[] = { |
| 1842 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1843 | }; |
| 1844 | asn_TYPE_descriptor_t asn_DEF_K_inv = { |
| 1845 | "K-inv", |
| 1846 | "K-inv", |
| 1847 | K_inv_free, |
| 1848 | K_inv_print, |
| 1849 | K_inv_constraint, |
| 1850 | K_inv_decode_ber, |
| 1851 | K_inv_encode_der, |
| 1852 | K_inv_decode_xer, |
| 1853 | K_inv_encode_xer, |
| 1854 | K_inv_decode_oer, |
| 1855 | K_inv_encode_oer, |
| 1856 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 1857 | 0, /* Use generic outmost tag fetcher */ |
| 1858 | asn_DEF_K_inv_tags_1, |
| 1859 | sizeof(asn_DEF_K_inv_tags_1) |
| 1860 | /sizeof(asn_DEF_K_inv_tags_1[0]), /* 1 */ |
| 1861 | asn_DEF_K_inv_tags_1, /* Same as above */ |
| 1862 | sizeof(asn_DEF_K_inv_tags_1) |
| 1863 | /sizeof(asn_DEF_K_inv_tags_1[0]), /* 1 */ |
| 1864 | &asn_OER_type_K_inv_constr_1, |
| 1865 | 0, /* No PER visible constraints */ |
| 1866 | 0, 0, /* No members */ |
| 1867 | 0 /* No specifics */ |
| 1868 | }; |
| 1869 | |
| 1870 | |
| 1871 | /*** <<< INCLUDES [L-0-5] >>> ***/ |
| 1872 | |
| 1873 | #include <NativeInteger.h> |
| 1874 | |
| 1875 | /*** <<< TYPE-DECLS [L-0-5] >>> ***/ |
| 1876 | |
| 1877 | typedef long L_0_5_t; |
| 1878 | |
| 1879 | /*** <<< FUNC-DECLS [L-0-5] >>> ***/ |
| 1880 | |
| 1881 | extern asn_TYPE_descriptor_t asn_DEF_L_0_5; |
| 1882 | asn_struct_free_f L_0_5_free; |
| 1883 | asn_struct_print_f L_0_5_print; |
| 1884 | asn_constr_check_f L_0_5_constraint; |
| 1885 | ber_type_decoder_f L_0_5_decode_ber; |
| 1886 | der_type_encoder_f L_0_5_encode_der; |
| 1887 | xer_type_decoder_f L_0_5_decode_xer; |
| 1888 | xer_type_encoder_f L_0_5_encode_xer; |
| 1889 | oer_type_decoder_f L_0_5_decode_oer; |
| 1890 | oer_type_encoder_f L_0_5_encode_oer; |
| 1891 | |
| 1892 | /*** <<< CODE [L-0-5] >>> ***/ |
| 1893 | |
| 1894 | int |
| 1895 | L_0_5_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1896 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 1897 | long value; |
| 1898 | |
| 1899 | if(!sptr) { |
| 1900 | ASN__CTFAIL(app_key, td, sptr, |
| 1901 | "%s: value not given (%s:%d)", |
| 1902 | td->name, __FILE__, __LINE__); |
| 1903 | return -1; |
| 1904 | } |
| 1905 | |
| 1906 | value = *(const long *)sptr; |
| 1907 | |
| 1908 | if(((value == 0) || (value == 5))) { |
| 1909 | /* Constraint check succeeded */ |
| 1910 | return 0; |
| 1911 | } else { |
| 1912 | ASN__CTFAIL(app_key, td, sptr, |
| 1913 | "%s: constraint failed (%s:%d)", |
| 1914 | td->name, __FILE__, __LINE__); |
| 1915 | return -1; |
| 1916 | } |
| 1917 | } |
| 1918 | |
| 1919 | /* |
| 1920 | * This type is implemented using NativeInteger, |
| 1921 | * so here we adjust the DEF accordingly. |
| 1922 | */ |
| 1923 | static void |
| 1924 | L_0_5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 1925 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 1926 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 1927 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 1928 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 1929 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 1930 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 1931 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 1932 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 1933 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 1934 | td->oer_decoder = asn_DEF_NativeInteger.oer_decoder; |
| 1935 | td->oer_encoder = asn_DEF_NativeInteger.oer_encoder; |
| 1936 | if(!td->oer_constraints) |
| 1937 | td->oer_constraints = asn_DEF_NativeInteger.oer_constraints; |
| 1938 | if(!td->per_constraints) |
| 1939 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 1940 | td->elements = asn_DEF_NativeInteger.elements; |
| 1941 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 1942 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 1943 | } |
| 1944 | |
| 1945 | void |
| 1946 | L_0_5_free(asn_TYPE_descriptor_t *td, |
| 1947 | void *struct_ptr, int contents_only) { |
| 1948 | L_0_5_1_inherit_TYPE_descriptor(td); |
| 1949 | td->free_struct(td, struct_ptr, contents_only); |
| 1950 | } |
| 1951 | |
| 1952 | int |
| 1953 | L_0_5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1954 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1955 | L_0_5_1_inherit_TYPE_descriptor(td); |
| 1956 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1957 | } |
| 1958 | |
| 1959 | asn_dec_rval_t |
| 1960 | L_0_5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1961 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1962 | L_0_5_1_inherit_TYPE_descriptor(td); |
| 1963 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1964 | } |
| 1965 | |
| 1966 | asn_enc_rval_t |
| 1967 | L_0_5_encode_der(asn_TYPE_descriptor_t *td, |
| 1968 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1969 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1970 | L_0_5_1_inherit_TYPE_descriptor(td); |
| 1971 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1972 | } |
| 1973 | |
| 1974 | asn_dec_rval_t |
| 1975 | L_0_5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1976 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1977 | L_0_5_1_inherit_TYPE_descriptor(td); |
| 1978 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1979 | } |
| 1980 | |
| 1981 | asn_enc_rval_t |
| 1982 | L_0_5_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1983 | int ilevel, enum xer_encoder_flags_e flags, |
| 1984 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1985 | L_0_5_1_inherit_TYPE_descriptor(td); |
| 1986 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1987 | } |
| 1988 | |
| 1989 | asn_dec_rval_t |
| 1990 | L_0_5_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1991 | asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) { |
| 1992 | L_0_5_1_inherit_TYPE_descriptor(td); |
| 1993 | return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size); |
| 1994 | } |
| 1995 | |
| 1996 | asn_enc_rval_t |
| 1997 | L_0_5_encode_oer(asn_TYPE_descriptor_t *td, |
| 1998 | asn_oer_constraints_t *constraints, |
| 1999 | void *structure, asn_app_consume_bytes_f *cb, void *app_key) { |
| 2000 | L_0_5_1_inherit_TYPE_descriptor(td); |
| 2001 | return td->uper_encoder(td, constraints, structure, cb, app_key); |
| 2002 | } |
| 2003 | |
| 2004 | |
| 2005 | /*** <<< CTDEFS [L-0-5] >>> ***/ |
| 2006 | |
| 2007 | static asn_oer_constraints_t asn_OER_type_L_0_5_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame^] | 2008 | { 1, 1 } /* (0..5) */, |
| 2009 | -1}; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 2010 | |
| 2011 | /*** <<< STAT-DEFS [L-0-5] >>> ***/ |
| 2012 | |
| 2013 | static const ber_tlv_tag_t asn_DEF_L_0_5_tags_1[] = { |
| 2014 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 2015 | }; |
| 2016 | asn_TYPE_descriptor_t asn_DEF_L_0_5 = { |
| 2017 | "L-0-5", |
| 2018 | "L-0-5", |
| 2019 | L_0_5_free, |
| 2020 | L_0_5_print, |
| 2021 | L_0_5_constraint, |
| 2022 | L_0_5_decode_ber, |
| 2023 | L_0_5_encode_der, |
| 2024 | L_0_5_decode_xer, |
| 2025 | L_0_5_encode_xer, |
| 2026 | L_0_5_decode_oer, |
| 2027 | L_0_5_encode_oer, |
| 2028 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 2029 | 0, /* Use generic outmost tag fetcher */ |
| 2030 | asn_DEF_L_0_5_tags_1, |
| 2031 | sizeof(asn_DEF_L_0_5_tags_1) |
| 2032 | /sizeof(asn_DEF_L_0_5_tags_1[0]), /* 1 */ |
| 2033 | asn_DEF_L_0_5_tags_1, /* Same as above */ |
| 2034 | sizeof(asn_DEF_L_0_5_tags_1) |
| 2035 | /sizeof(asn_DEF_L_0_5_tags_1[0]), /* 1 */ |
| 2036 | &asn_OER_type_L_0_5_constr_1, |
| 2037 | 0, /* No PER visible constraints */ |
| 2038 | 0, 0, /* No members */ |
| 2039 | 0 /* No specifics */ |
| 2040 | }; |
| 2041 | |
| 2042 | |
| 2043 | /*** <<< INCLUDES [M-inv] >>> ***/ |
| 2044 | |
| 2045 | #include <NativeInteger.h> |
| 2046 | |
| 2047 | /*** <<< TYPE-DECLS [M-inv] >>> ***/ |
| 2048 | |
| 2049 | typedef long M_inv_t; |
| 2050 | |
| 2051 | /*** <<< FUNC-DECLS [M-inv] >>> ***/ |
| 2052 | |
| 2053 | extern asn_TYPE_descriptor_t asn_DEF_M_inv; |
| 2054 | asn_struct_free_f M_inv_free; |
| 2055 | asn_struct_print_f M_inv_print; |
| 2056 | asn_constr_check_f M_inv_constraint; |
| 2057 | ber_type_decoder_f M_inv_decode_ber; |
| 2058 | der_type_encoder_f M_inv_encode_der; |
| 2059 | xer_type_decoder_f M_inv_decode_xer; |
| 2060 | xer_type_encoder_f M_inv_encode_xer; |
| 2061 | oer_type_decoder_f M_inv_decode_oer; |
| 2062 | oer_type_encoder_f M_inv_encode_oer; |
| 2063 | |
| 2064 | /*** <<< CODE [M-inv] >>> ***/ |
| 2065 | |
| 2066 | int |
| 2067 | M_inv_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 2068 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 2069 | long value; |
| 2070 | |
| 2071 | if(!sptr) { |
| 2072 | ASN__CTFAIL(app_key, td, sptr, |
| 2073 | "%s: value not given (%s:%d)", |
| 2074 | td->name, __FILE__, __LINE__); |
| 2075 | return -1; |
| 2076 | } |
| 2077 | |
| 2078 | value = *(const long *)sptr; |
| 2079 | |
| 2080 | if(((value == 0) || (value == 5))) { |
| 2081 | /* Constraint check succeeded */ |
| 2082 | return 0; |
| 2083 | } else { |
| 2084 | ASN__CTFAIL(app_key, td, sptr, |
| 2085 | "%s: constraint failed (%s:%d)", |
| 2086 | td->name, __FILE__, __LINE__); |
| 2087 | return -1; |
| 2088 | } |
| 2089 | } |
| 2090 | |
| 2091 | /* |
| 2092 | * This type is implemented using NativeInteger, |
| 2093 | * so here we adjust the DEF accordingly. |
| 2094 | */ |
| 2095 | static void |
| 2096 | M_inv_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 2097 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 2098 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 2099 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 2100 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 2101 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 2102 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 2103 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 2104 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 2105 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 2106 | td->oer_decoder = asn_DEF_NativeInteger.oer_decoder; |
| 2107 | td->oer_encoder = asn_DEF_NativeInteger.oer_encoder; |
| 2108 | if(!td->oer_constraints) |
| 2109 | td->oer_constraints = asn_DEF_NativeInteger.oer_constraints; |
| 2110 | if(!td->per_constraints) |
| 2111 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 2112 | td->elements = asn_DEF_NativeInteger.elements; |
| 2113 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 2114 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 2115 | } |
| 2116 | |
| 2117 | void |
| 2118 | M_inv_free(asn_TYPE_descriptor_t *td, |
| 2119 | void *struct_ptr, int contents_only) { |
| 2120 | M_inv_1_inherit_TYPE_descriptor(td); |
| 2121 | td->free_struct(td, struct_ptr, contents_only); |
| 2122 | } |
| 2123 | |
| 2124 | int |
| 2125 | M_inv_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 2126 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 2127 | M_inv_1_inherit_TYPE_descriptor(td); |
| 2128 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 2129 | } |
| 2130 | |
| 2131 | asn_dec_rval_t |
| 2132 | M_inv_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2133 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 2134 | M_inv_1_inherit_TYPE_descriptor(td); |
| 2135 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 2136 | } |
| 2137 | |
| 2138 | asn_enc_rval_t |
| 2139 | M_inv_encode_der(asn_TYPE_descriptor_t *td, |
| 2140 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 2141 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2142 | M_inv_1_inherit_TYPE_descriptor(td); |
| 2143 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 2144 | } |
| 2145 | |
| 2146 | asn_dec_rval_t |
| 2147 | M_inv_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2148 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 2149 | M_inv_1_inherit_TYPE_descriptor(td); |
| 2150 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 2151 | } |
| 2152 | |
| 2153 | asn_enc_rval_t |
| 2154 | M_inv_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 2155 | int ilevel, enum xer_encoder_flags_e flags, |
| 2156 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2157 | M_inv_1_inherit_TYPE_descriptor(td); |
| 2158 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 2159 | } |
| 2160 | |
| 2161 | asn_dec_rval_t |
| 2162 | M_inv_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2163 | asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) { |
| 2164 | M_inv_1_inherit_TYPE_descriptor(td); |
| 2165 | return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size); |
| 2166 | } |
| 2167 | |
| 2168 | asn_enc_rval_t |
| 2169 | M_inv_encode_oer(asn_TYPE_descriptor_t *td, |
| 2170 | asn_oer_constraints_t *constraints, |
| 2171 | void *structure, asn_app_consume_bytes_f *cb, void *app_key) { |
| 2172 | M_inv_1_inherit_TYPE_descriptor(td); |
| 2173 | return td->uper_encoder(td, constraints, structure, cb, app_key); |
| 2174 | } |
| 2175 | |
| 2176 | |
| 2177 | /*** <<< CTDEFS [M-inv] >>> ***/ |
| 2178 | |
| 2179 | static asn_oer_constraints_t asn_OER_type_M_inv_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame^] | 2180 | { 0, 0 }, |
| 2181 | -1}; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 2182 | |
| 2183 | /*** <<< STAT-DEFS [M-inv] >>> ***/ |
| 2184 | |
| 2185 | static const ber_tlv_tag_t asn_DEF_M_inv_tags_1[] = { |
| 2186 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 2187 | }; |
| 2188 | asn_TYPE_descriptor_t asn_DEF_M_inv = { |
| 2189 | "M-inv", |
| 2190 | "M-inv", |
| 2191 | M_inv_free, |
| 2192 | M_inv_print, |
| 2193 | M_inv_constraint, |
| 2194 | M_inv_decode_ber, |
| 2195 | M_inv_encode_der, |
| 2196 | M_inv_decode_xer, |
| 2197 | M_inv_encode_xer, |
| 2198 | M_inv_decode_oer, |
| 2199 | M_inv_encode_oer, |
| 2200 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 2201 | 0, /* Use generic outmost tag fetcher */ |
| 2202 | asn_DEF_M_inv_tags_1, |
| 2203 | sizeof(asn_DEF_M_inv_tags_1) |
| 2204 | /sizeof(asn_DEF_M_inv_tags_1[0]), /* 1 */ |
| 2205 | asn_DEF_M_inv_tags_1, /* Same as above */ |
| 2206 | sizeof(asn_DEF_M_inv_tags_1) |
| 2207 | /sizeof(asn_DEF_M_inv_tags_1[0]), /* 1 */ |
| 2208 | &asn_OER_type_M_inv_constr_1, |
| 2209 | 0, /* No PER visible constraints */ |
| 2210 | 0, 0, /* No members */ |
| 2211 | 0 /* No specifics */ |
| 2212 | }; |
| 2213 | |
| 2214 | |
| 2215 | /*** <<< INCLUDES [N-inv] >>> ***/ |
| 2216 | |
| 2217 | #include <NativeInteger.h> |
| 2218 | |
| 2219 | /*** <<< TYPE-DECLS [N-inv] >>> ***/ |
| 2220 | |
| 2221 | typedef long N_inv_t; |
| 2222 | |
| 2223 | /*** <<< FUNC-DECLS [N-inv] >>> ***/ |
| 2224 | |
| 2225 | extern asn_TYPE_descriptor_t asn_DEF_N_inv; |
| 2226 | asn_struct_free_f N_inv_free; |
| 2227 | asn_struct_print_f N_inv_print; |
| 2228 | asn_constr_check_f N_inv_constraint; |
| 2229 | ber_type_decoder_f N_inv_decode_ber; |
| 2230 | der_type_encoder_f N_inv_encode_der; |
| 2231 | xer_type_decoder_f N_inv_decode_xer; |
| 2232 | xer_type_encoder_f N_inv_encode_xer; |
| 2233 | oer_type_decoder_f N_inv_decode_oer; |
| 2234 | oer_type_encoder_f N_inv_encode_oer; |
| 2235 | |
| 2236 | /*** <<< CODE [N-inv] >>> ***/ |
| 2237 | |
| 2238 | int |
| 2239 | N_inv_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 2240 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 2241 | long value; |
| 2242 | |
| 2243 | if(!sptr) { |
| 2244 | ASN__CTFAIL(app_key, td, sptr, |
| 2245 | "%s: value not given (%s:%d)", |
| 2246 | td->name, __FILE__, __LINE__); |
| 2247 | return -1; |
| 2248 | } |
| 2249 | |
| 2250 | value = *(const long *)sptr; |
| 2251 | |
| 2252 | if((value >= 0 && value <= 5)) { |
| 2253 | /* Constraint check succeeded */ |
| 2254 | return 0; |
| 2255 | } else { |
| 2256 | ASN__CTFAIL(app_key, td, sptr, |
| 2257 | "%s: constraint failed (%s:%d)", |
| 2258 | td->name, __FILE__, __LINE__); |
| 2259 | return -1; |
| 2260 | } |
| 2261 | } |
| 2262 | |
| 2263 | /* |
| 2264 | * This type is implemented using NativeInteger, |
| 2265 | * so here we adjust the DEF accordingly. |
| 2266 | */ |
| 2267 | static void |
| 2268 | N_inv_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 2269 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 2270 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 2271 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 2272 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 2273 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 2274 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 2275 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 2276 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 2277 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 2278 | td->oer_decoder = asn_DEF_NativeInteger.oer_decoder; |
| 2279 | td->oer_encoder = asn_DEF_NativeInteger.oer_encoder; |
| 2280 | if(!td->oer_constraints) |
| 2281 | td->oer_constraints = asn_DEF_NativeInteger.oer_constraints; |
| 2282 | if(!td->per_constraints) |
| 2283 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 2284 | td->elements = asn_DEF_NativeInteger.elements; |
| 2285 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 2286 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 2287 | } |
| 2288 | |
| 2289 | void |
| 2290 | N_inv_free(asn_TYPE_descriptor_t *td, |
| 2291 | void *struct_ptr, int contents_only) { |
| 2292 | N_inv_1_inherit_TYPE_descriptor(td); |
| 2293 | td->free_struct(td, struct_ptr, contents_only); |
| 2294 | } |
| 2295 | |
| 2296 | int |
| 2297 | N_inv_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 2298 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 2299 | N_inv_1_inherit_TYPE_descriptor(td); |
| 2300 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 2301 | } |
| 2302 | |
| 2303 | asn_dec_rval_t |
| 2304 | N_inv_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2305 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 2306 | N_inv_1_inherit_TYPE_descriptor(td); |
| 2307 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 2308 | } |
| 2309 | |
| 2310 | asn_enc_rval_t |
| 2311 | N_inv_encode_der(asn_TYPE_descriptor_t *td, |
| 2312 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 2313 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2314 | N_inv_1_inherit_TYPE_descriptor(td); |
| 2315 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 2316 | } |
| 2317 | |
| 2318 | asn_dec_rval_t |
| 2319 | N_inv_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2320 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 2321 | N_inv_1_inherit_TYPE_descriptor(td); |
| 2322 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 2323 | } |
| 2324 | |
| 2325 | asn_enc_rval_t |
| 2326 | N_inv_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 2327 | int ilevel, enum xer_encoder_flags_e flags, |
| 2328 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2329 | N_inv_1_inherit_TYPE_descriptor(td); |
| 2330 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 2331 | } |
| 2332 | |
| 2333 | asn_dec_rval_t |
| 2334 | N_inv_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2335 | asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) { |
| 2336 | N_inv_1_inherit_TYPE_descriptor(td); |
| 2337 | return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size); |
| 2338 | } |
| 2339 | |
| 2340 | asn_enc_rval_t |
| 2341 | N_inv_encode_oer(asn_TYPE_descriptor_t *td, |
| 2342 | asn_oer_constraints_t *constraints, |
| 2343 | void *structure, asn_app_consume_bytes_f *cb, void *app_key) { |
| 2344 | N_inv_1_inherit_TYPE_descriptor(td); |
| 2345 | return td->uper_encoder(td, constraints, structure, cb, app_key); |
| 2346 | } |
| 2347 | |
| 2348 | |
| 2349 | /*** <<< CTDEFS [N-inv] >>> ***/ |
| 2350 | |
| 2351 | static asn_oer_constraints_t asn_OER_type_N_inv_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame^] | 2352 | { 0, 0 }, |
| 2353 | -1}; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 2354 | |
| 2355 | /*** <<< STAT-DEFS [N-inv] >>> ***/ |
| 2356 | |
| 2357 | static const ber_tlv_tag_t asn_DEF_N_inv_tags_1[] = { |
| 2358 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 2359 | }; |
| 2360 | asn_TYPE_descriptor_t asn_DEF_N_inv = { |
| 2361 | "N-inv", |
| 2362 | "N-inv", |
| 2363 | N_inv_free, |
| 2364 | N_inv_print, |
| 2365 | N_inv_constraint, |
| 2366 | N_inv_decode_ber, |
| 2367 | N_inv_encode_der, |
| 2368 | N_inv_decode_xer, |
| 2369 | N_inv_encode_xer, |
| 2370 | N_inv_decode_oer, |
| 2371 | N_inv_encode_oer, |
| 2372 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 2373 | 0, /* Use generic outmost tag fetcher */ |
| 2374 | asn_DEF_N_inv_tags_1, |
| 2375 | sizeof(asn_DEF_N_inv_tags_1) |
| 2376 | /sizeof(asn_DEF_N_inv_tags_1[0]), /* 1 */ |
| 2377 | asn_DEF_N_inv_tags_1, /* Same as above */ |
| 2378 | sizeof(asn_DEF_N_inv_tags_1) |
| 2379 | /sizeof(asn_DEF_N_inv_tags_1[0]), /* 1 */ |
| 2380 | &asn_OER_type_N_inv_constr_1, |
| 2381 | 0, /* No PER visible constraints */ |
| 2382 | 0, 0, /* No members */ |
| 2383 | 0 /* No specifics */ |
| 2384 | }; |
| 2385 | |
| 2386 | |
| 2387 | /*** <<< INCLUDES [O-inv] >>> ***/ |
| 2388 | |
| 2389 | #include <NativeInteger.h> |
| 2390 | |
| 2391 | /*** <<< TYPE-DECLS [O-inv] >>> ***/ |
| 2392 | |
| 2393 | typedef long O_inv_t; |
| 2394 | |
| 2395 | /*** <<< FUNC-DECLS [O-inv] >>> ***/ |
| 2396 | |
| 2397 | extern asn_TYPE_descriptor_t asn_DEF_O_inv; |
| 2398 | asn_struct_free_f O_inv_free; |
| 2399 | asn_struct_print_f O_inv_print; |
| 2400 | asn_constr_check_f O_inv_constraint; |
| 2401 | ber_type_decoder_f O_inv_decode_ber; |
| 2402 | der_type_encoder_f O_inv_encode_der; |
| 2403 | xer_type_decoder_f O_inv_decode_xer; |
| 2404 | xer_type_encoder_f O_inv_encode_xer; |
| 2405 | oer_type_decoder_f O_inv_decode_oer; |
| 2406 | oer_type_encoder_f O_inv_encode_oer; |
| 2407 | |
| 2408 | /*** <<< CODE [O-inv] >>> ***/ |
| 2409 | |
| 2410 | int |
| 2411 | O_inv_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 2412 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 2413 | long value; |
| 2414 | |
| 2415 | if(!sptr) { |
| 2416 | ASN__CTFAIL(app_key, td, sptr, |
| 2417 | "%s: value not given (%s:%d)", |
| 2418 | td->name, __FILE__, __LINE__); |
| 2419 | return -1; |
| 2420 | } |
| 2421 | |
| 2422 | value = *(const long *)sptr; |
| 2423 | |
| 2424 | if((value >= 0 && value <= 5)) { |
| 2425 | /* Constraint check succeeded */ |
| 2426 | return 0; |
| 2427 | } else { |
| 2428 | ASN__CTFAIL(app_key, td, sptr, |
| 2429 | "%s: constraint failed (%s:%d)", |
| 2430 | td->name, __FILE__, __LINE__); |
| 2431 | return -1; |
| 2432 | } |
| 2433 | } |
| 2434 | |
| 2435 | /* |
| 2436 | * This type is implemented using NativeInteger, |
| 2437 | * so here we adjust the DEF accordingly. |
| 2438 | */ |
| 2439 | static void |
| 2440 | O_inv_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 2441 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 2442 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 2443 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
| 2444 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 2445 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 2446 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 2447 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 2448 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 2449 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
| 2450 | td->oer_decoder = asn_DEF_NativeInteger.oer_decoder; |
| 2451 | td->oer_encoder = asn_DEF_NativeInteger.oer_encoder; |
| 2452 | if(!td->oer_constraints) |
| 2453 | td->oer_constraints = asn_DEF_NativeInteger.oer_constraints; |
| 2454 | if(!td->per_constraints) |
| 2455 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 2456 | td->elements = asn_DEF_NativeInteger.elements; |
| 2457 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 2458 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 2459 | } |
| 2460 | |
| 2461 | void |
| 2462 | O_inv_free(asn_TYPE_descriptor_t *td, |
| 2463 | void *struct_ptr, int contents_only) { |
| 2464 | O_inv_1_inherit_TYPE_descriptor(td); |
| 2465 | td->free_struct(td, struct_ptr, contents_only); |
| 2466 | } |
| 2467 | |
| 2468 | int |
| 2469 | O_inv_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 2470 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 2471 | O_inv_1_inherit_TYPE_descriptor(td); |
| 2472 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 2473 | } |
| 2474 | |
| 2475 | asn_dec_rval_t |
| 2476 | O_inv_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2477 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 2478 | O_inv_1_inherit_TYPE_descriptor(td); |
| 2479 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 2480 | } |
| 2481 | |
| 2482 | asn_enc_rval_t |
| 2483 | O_inv_encode_der(asn_TYPE_descriptor_t *td, |
| 2484 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 2485 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2486 | O_inv_1_inherit_TYPE_descriptor(td); |
| 2487 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 2488 | } |
| 2489 | |
| 2490 | asn_dec_rval_t |
| 2491 | O_inv_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2492 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 2493 | O_inv_1_inherit_TYPE_descriptor(td); |
| 2494 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 2495 | } |
| 2496 | |
| 2497 | asn_enc_rval_t |
| 2498 | O_inv_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 2499 | int ilevel, enum xer_encoder_flags_e flags, |
| 2500 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2501 | O_inv_1_inherit_TYPE_descriptor(td); |
| 2502 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 2503 | } |
| 2504 | |
| 2505 | asn_dec_rval_t |
| 2506 | O_inv_decode_oer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2507 | asn_oer_constraints_t *constraints, void **structure, const void *buffer, size_t size) { |
| 2508 | O_inv_1_inherit_TYPE_descriptor(td); |
| 2509 | return td->oer_decoder(opt_codec_ctx, td, constraints, structure, buffer, size); |
| 2510 | } |
| 2511 | |
| 2512 | asn_enc_rval_t |
| 2513 | O_inv_encode_oer(asn_TYPE_descriptor_t *td, |
| 2514 | asn_oer_constraints_t *constraints, |
| 2515 | void *structure, asn_app_consume_bytes_f *cb, void *app_key) { |
| 2516 | O_inv_1_inherit_TYPE_descriptor(td); |
| 2517 | return td->uper_encoder(td, constraints, structure, cb, app_key); |
| 2518 | } |
| 2519 | |
| 2520 | |
| 2521 | /*** <<< CTDEFS [O-inv] >>> ***/ |
| 2522 | |
| 2523 | static asn_oer_constraints_t asn_OER_type_O_inv_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame^] | 2524 | { 0, 0 }, |
| 2525 | -1}; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 2526 | |
| 2527 | /*** <<< STAT-DEFS [O-inv] >>> ***/ |
| 2528 | |
| 2529 | static const ber_tlv_tag_t asn_DEF_O_inv_tags_1[] = { |
| 2530 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 2531 | }; |
| 2532 | asn_TYPE_descriptor_t asn_DEF_O_inv = { |
| 2533 | "O-inv", |
| 2534 | "O-inv", |
| 2535 | O_inv_free, |
| 2536 | O_inv_print, |
| 2537 | O_inv_constraint, |
| 2538 | O_inv_decode_ber, |
| 2539 | O_inv_encode_der, |
| 2540 | O_inv_decode_xer, |
| 2541 | O_inv_encode_xer, |
| 2542 | O_inv_decode_oer, |
| 2543 | O_inv_encode_oer, |
| 2544 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 2545 | 0, /* Use generic outmost tag fetcher */ |
| 2546 | asn_DEF_O_inv_tags_1, |
| 2547 | sizeof(asn_DEF_O_inv_tags_1) |
| 2548 | /sizeof(asn_DEF_O_inv_tags_1[0]), /* 1 */ |
| 2549 | asn_DEF_O_inv_tags_1, /* Same as above */ |
| 2550 | sizeof(asn_DEF_O_inv_tags_1) |
| 2551 | /sizeof(asn_DEF_O_inv_tags_1[0]), /* 1 */ |
| 2552 | &asn_OER_type_O_inv_constr_1, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 2553 | 0, /* No PER visible constraints */ |
| 2554 | 0, 0, /* No members */ |
| 2555 | 0 /* No specifics */ |
| 2556 | }; |
| 2557 | |