2 * Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
3 * From ASN.1 module "MAP-MS-DataTypes"
4 * found in "../asn1src/MAP-MS-DataTypes.asn"
5 * `asn1c -gen-PER -fskeletons-copy -fnative-types`
8 #include "CUG-Interlock.h"
11 CUG_Interlock_constraint(asn_TYPE_descriptor_t
*td
, const void *sptr
,
12 asn_app_constraint_failed_f
*ctfailcb
, void *app_key
) {
13 const OCTET_STRING_t
*st
= (const OCTET_STRING_t
*)sptr
;
17 _ASN_CTFAIL(app_key
, td
, sptr
,
18 "%s: value not given (%s:%d)",
19 td
->name
, __FILE__
, __LINE__
);
26 /* Constraint check succeeded */
29 _ASN_CTFAIL(app_key
, td
, sptr
,
30 "%s: constraint failed (%s:%d)",
31 td
->name
, __FILE__
, __LINE__
);
37 * This type is implemented using OCTET_STRING,
38 * so here we adjust the DEF accordingly.
41 CUG_Interlock_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t
*td
) {
42 td
->free_struct
= asn_DEF_OCTET_STRING
.free_struct
;
43 td
->print_struct
= asn_DEF_OCTET_STRING
.print_struct
;
44 td
->ber_decoder
= asn_DEF_OCTET_STRING
.ber_decoder
;
45 td
->der_encoder
= asn_DEF_OCTET_STRING
.der_encoder
;
46 td
->xer_decoder
= asn_DEF_OCTET_STRING
.xer_decoder
;
47 td
->xer_encoder
= asn_DEF_OCTET_STRING
.xer_encoder
;
48 td
->uper_decoder
= asn_DEF_OCTET_STRING
.uper_decoder
;
49 td
->uper_encoder
= asn_DEF_OCTET_STRING
.uper_encoder
;
50 if(!td
->per_constraints
)
51 td
->per_constraints
= asn_DEF_OCTET_STRING
.per_constraints
;
52 td
->elements
= asn_DEF_OCTET_STRING
.elements
;
53 td
->elements_count
= asn_DEF_OCTET_STRING
.elements_count
;
54 td
->specifics
= asn_DEF_OCTET_STRING
.specifics
;
58 CUG_Interlock_free(asn_TYPE_descriptor_t
*td
,
59 void *struct_ptr
, int contents_only
) {
60 CUG_Interlock_1_inherit_TYPE_descriptor(td
);
61 td
->free_struct(td
, struct_ptr
, contents_only
);
65 CUG_Interlock_print(asn_TYPE_descriptor_t
*td
, const void *struct_ptr
,
66 int ilevel
, asn_app_consume_bytes_f
*cb
, void *app_key
) {
67 CUG_Interlock_1_inherit_TYPE_descriptor(td
);
68 return td
->print_struct(td
, struct_ptr
, ilevel
, cb
, app_key
);
72 CUG_Interlock_decode_ber(asn_codec_ctx_t
*opt_codec_ctx
, asn_TYPE_descriptor_t
*td
,
73 void **structure
, const void *bufptr
, size_t size
, int tag_mode
) {
74 CUG_Interlock_1_inherit_TYPE_descriptor(td
);
75 return td
->ber_decoder(opt_codec_ctx
, td
, structure
, bufptr
, size
, tag_mode
);
79 CUG_Interlock_encode_der(asn_TYPE_descriptor_t
*td
,
80 void *structure
, int tag_mode
, ber_tlv_tag_t tag
,
81 asn_app_consume_bytes_f
*cb
, void *app_key
) {
82 CUG_Interlock_1_inherit_TYPE_descriptor(td
);
83 return td
->der_encoder(td
, structure
, tag_mode
, tag
, cb
, app_key
);
87 CUG_Interlock_decode_xer(asn_codec_ctx_t
*opt_codec_ctx
, asn_TYPE_descriptor_t
*td
,
88 void **structure
, const char *opt_mname
, const void *bufptr
, size_t size
) {
89 CUG_Interlock_1_inherit_TYPE_descriptor(td
);
90 return td
->xer_decoder(opt_codec_ctx
, td
, structure
, opt_mname
, bufptr
, size
);
94 CUG_Interlock_encode_xer(asn_TYPE_descriptor_t
*td
, void *structure
,
95 int ilevel
, enum xer_encoder_flags_e flags
,
96 asn_app_consume_bytes_f
*cb
, void *app_key
) {
97 CUG_Interlock_1_inherit_TYPE_descriptor(td
);
98 return td
->xer_encoder(td
, structure
, ilevel
, flags
, cb
, app_key
);
102 CUG_Interlock_decode_uper(asn_codec_ctx_t
*opt_codec_ctx
, asn_TYPE_descriptor_t
*td
,
103 asn_per_constraints_t
*constraints
, void **structure
, asn_per_data_t
*per_data
) {
104 CUG_Interlock_1_inherit_TYPE_descriptor(td
);
105 return td
->uper_decoder(opt_codec_ctx
, td
, constraints
, structure
, per_data
);
109 CUG_Interlock_encode_uper(asn_TYPE_descriptor_t
*td
,
110 asn_per_constraints_t
*constraints
,
111 void *structure
, asn_per_outp_t
*per_out
) {
112 CUG_Interlock_1_inherit_TYPE_descriptor(td
);
113 return td
->uper_encoder(td
, constraints
, structure
, per_out
);
116 static asn_per_constraints_t asn_PER_type_CUG_Interlock_constr_1
= {
117 { APC_UNCONSTRAINED
, -1, -1, 0, 0 },
118 { APC_CONSTRAINED
, 0, 0, 4, 4 } /* (SIZE(4..4)) */,
119 0, 0 /* No PER value map */
121 static ber_tlv_tag_t asn_DEF_CUG_Interlock_tags_1
[] = {
122 (ASN_TAG_CLASS_UNIVERSAL
| (4 << 2))
124 asn_TYPE_descriptor_t asn_DEF_CUG_Interlock
= {
129 CUG_Interlock_constraint
,
130 CUG_Interlock_decode_ber
,
131 CUG_Interlock_encode_der
,
132 CUG_Interlock_decode_xer
,
133 CUG_Interlock_encode_xer
,
134 CUG_Interlock_decode_uper
,
135 CUG_Interlock_encode_uper
,
136 0, /* Use generic outmost tag fetcher */
137 asn_DEF_CUG_Interlock_tags_1
,
138 sizeof(asn_DEF_CUG_Interlock_tags_1
)
139 /sizeof(asn_DEF_CUG_Interlock_tags_1
[0]), /* 1 */
140 asn_DEF_CUG_Interlock_tags_1
, /* Same as above */
141 sizeof(asn_DEF_CUG_Interlock_tags_1
)
142 /sizeof(asn_DEF_CUG_Interlock_tags_1
[0]), /* 1 */
143 &asn_PER_type_CUG_Interlock_constr_1
,
144 0, 0, /* No members */