2 * Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
3 * From ASN.1 module "MAP-CommonDataTypes"
4 * found in "../asn1src/MAP-CommonDataTypes.asn"
5 * `asn1c -gen-PER -fskeletons-copy -fnative-types`
8 #include "TBCD-STRING.h"
11 TBCD_STRING_constraint(asn_TYPE_descriptor_t
*td
, const void *sptr
,
12 asn_app_constraint_failed_f
*ctfailcb
, void *app_key
) {
13 /* Replace with underlying type checker */
14 td
->check_constraints
= asn_DEF_OCTET_STRING
.check_constraints
;
15 return td
->check_constraints(td
, sptr
, ctfailcb
, app_key
);
19 * This type is implemented using OCTET_STRING,
20 * so here we adjust the DEF accordingly.
23 TBCD_STRING_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t
*td
) {
24 td
->free_struct
= asn_DEF_OCTET_STRING
.free_struct
;
25 td
->print_struct
= asn_DEF_OCTET_STRING
.print_struct
;
26 td
->ber_decoder
= asn_DEF_OCTET_STRING
.ber_decoder
;
27 td
->der_encoder
= asn_DEF_OCTET_STRING
.der_encoder
;
28 td
->xer_decoder
= asn_DEF_OCTET_STRING
.xer_decoder
;
29 td
->xer_encoder
= asn_DEF_OCTET_STRING
.xer_encoder
;
30 td
->uper_decoder
= asn_DEF_OCTET_STRING
.uper_decoder
;
31 td
->uper_encoder
= asn_DEF_OCTET_STRING
.uper_encoder
;
32 if(!td
->per_constraints
)
33 td
->per_constraints
= asn_DEF_OCTET_STRING
.per_constraints
;
34 td
->elements
= asn_DEF_OCTET_STRING
.elements
;
35 td
->elements_count
= asn_DEF_OCTET_STRING
.elements_count
;
36 td
->specifics
= asn_DEF_OCTET_STRING
.specifics
;
40 TBCD_STRING_free(asn_TYPE_descriptor_t
*td
,
41 void *struct_ptr
, int contents_only
) {
42 TBCD_STRING_1_inherit_TYPE_descriptor(td
);
43 td
->free_struct(td
, struct_ptr
, contents_only
);
47 TBCD_STRING_print(asn_TYPE_descriptor_t
*td
, const void *struct_ptr
,
48 int ilevel
, asn_app_consume_bytes_f
*cb
, void *app_key
) {
49 TBCD_STRING_1_inherit_TYPE_descriptor(td
);
50 return td
->print_struct(td
, struct_ptr
, ilevel
, cb
, app_key
);
54 TBCD_STRING_decode_ber(asn_codec_ctx_t
*opt_codec_ctx
, asn_TYPE_descriptor_t
*td
,
55 void **structure
, const void *bufptr
, size_t size
, int tag_mode
) {
56 TBCD_STRING_1_inherit_TYPE_descriptor(td
);
57 return td
->ber_decoder(opt_codec_ctx
, td
, structure
, bufptr
, size
, tag_mode
);
61 TBCD_STRING_encode_der(asn_TYPE_descriptor_t
*td
,
62 void *structure
, int tag_mode
, ber_tlv_tag_t tag
,
63 asn_app_consume_bytes_f
*cb
, void *app_key
) {
64 TBCD_STRING_1_inherit_TYPE_descriptor(td
);
65 return td
->der_encoder(td
, structure
, tag_mode
, tag
, cb
, app_key
);
69 TBCD_STRING_decode_xer(asn_codec_ctx_t
*opt_codec_ctx
, asn_TYPE_descriptor_t
*td
,
70 void **structure
, const char *opt_mname
, const void *bufptr
, size_t size
) {
71 TBCD_STRING_1_inherit_TYPE_descriptor(td
);
72 return td
->xer_decoder(opt_codec_ctx
, td
, structure
, opt_mname
, bufptr
, size
);
76 TBCD_STRING_encode_xer(asn_TYPE_descriptor_t
*td
, void *structure
,
77 int ilevel
, enum xer_encoder_flags_e flags
,
78 asn_app_consume_bytes_f
*cb
, void *app_key
) {
79 TBCD_STRING_1_inherit_TYPE_descriptor(td
);
80 return td
->xer_encoder(td
, structure
, ilevel
, flags
, cb
, app_key
);
84 TBCD_STRING_decode_uper(asn_codec_ctx_t
*opt_codec_ctx
, asn_TYPE_descriptor_t
*td
,
85 asn_per_constraints_t
*constraints
, void **structure
, asn_per_data_t
*per_data
) {
86 TBCD_STRING_1_inherit_TYPE_descriptor(td
);
87 return td
->uper_decoder(opt_codec_ctx
, td
, constraints
, structure
, per_data
);
91 TBCD_STRING_encode_uper(asn_TYPE_descriptor_t
*td
,
92 asn_per_constraints_t
*constraints
,
93 void *structure
, asn_per_outp_t
*per_out
) {
94 TBCD_STRING_1_inherit_TYPE_descriptor(td
);
95 return td
->uper_encoder(td
, constraints
, structure
, per_out
);
98 static ber_tlv_tag_t asn_DEF_TBCD_STRING_tags_1
[] = {
99 (ASN_TAG_CLASS_UNIVERSAL
| (4 << 2))
101 asn_TYPE_descriptor_t asn_DEF_TBCD_STRING
= {
106 TBCD_STRING_constraint
,
107 TBCD_STRING_decode_ber
,
108 TBCD_STRING_encode_der
,
109 TBCD_STRING_decode_xer
,
110 TBCD_STRING_encode_xer
,
111 TBCD_STRING_decode_uper
,
112 TBCD_STRING_encode_uper
,
113 0, /* Use generic outmost tag fetcher */
114 asn_DEF_TBCD_STRING_tags_1
,
115 sizeof(asn_DEF_TBCD_STRING_tags_1
)
116 /sizeof(asn_DEF_TBCD_STRING_tags_1
[0]), /* 1 */
117 asn_DEF_TBCD_STRING_tags_1
, /* Same as above */
118 sizeof(asn_DEF_TBCD_STRING_tags_1
)
119 /sizeof(asn_DEF_TBCD_STRING_tags_1
[0]), /* 1 */
120 0, /* No PER visible constraints */
121 0, 0, /* No members */