asn1c/tests/46-redefine-OK.asn1.-PR

196 lines
5.5 KiB
Plaintext

/*** <<< INCLUDES [PrimitiveType] >>> ***/
#include <OCTET_STRING.h>
/*** <<< TYPE-DECLS [PrimitiveType] >>> ***/
typedef OCTET_STRING_t PrimitiveType_t;
/*** <<< FUNC-DECLS [PrimitiveType] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_PrimitiveType;
asn_struct_free_f PrimitiveType_free;
asn_struct_print_f PrimitiveType_print;
asn_constr_check_f PrimitiveType_constraint;
ber_type_decoder_f PrimitiveType_decode_ber;
der_type_encoder_f PrimitiveType_encode_der;
xer_type_decoder_f PrimitiveType_decode_xer;
xer_type_encoder_f PrimitiveType_encode_xer;
/*** <<< CODE [PrimitiveType] >>> ***/
/*
* This type is implemented using OCTET_STRING,
* so here we adjust the DEF accordingly.
*/
/*** <<< STAT-DEFS [PrimitiveType] >>> ***/
static const ber_tlv_tag_t asn_DEF_PrimitiveType_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2))
};
asn_TYPE_descriptor_t asn_DEF_PrimitiveType = {
"PrimitiveType",
"PrimitiveType",
OCTET_STRING_free,
OCTET_STRING_print,
OCTET_STRING_compare,
OCTET_STRING_constraint,
OCTET_STRING_decode_ber,
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer,
OCTET_STRING_encode_xer,
0, 0, /* No OER support, use "-gen-OER" to enable */
0, 0, /* No PER support, use "-gen-PER" to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_PrimitiveType_tags_1,
sizeof(asn_DEF_PrimitiveType_tags_1)
/sizeof(asn_DEF_PrimitiveType_tags_1[0]), /* 1 */
asn_DEF_PrimitiveType_tags_1, /* Same as above */
sizeof(asn_DEF_PrimitiveType_tags_1)
/sizeof(asn_DEF_PrimitiveType_tags_1[0]), /* 1 */
0, /* No OER visible constraints */
0, /* No PER visible constraints */
0, 0, /* No members */
&asn_SPC_OCTET_STRING_specs /* Additional specs */
};
/*** <<< INCLUDES [ConstructedType] >>> ***/
#include "PrimitiveType.h"
#include <constr_SEQUENCE.h>
/*** <<< TYPE-DECLS [ConstructedType] >>> ***/
typedef struct ConstructedType {
PrimitiveType_t field;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ConstructedType_t;
/*** <<< FUNC-DECLS [ConstructedType] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_ConstructedType;
extern asn_SEQUENCE_specifics_t asn_SPC_ConstructedType_specs_1;
extern asn_TYPE_member_t asn_MBR_ConstructedType_1[1];
/*** <<< STAT-DEFS [ConstructedType] >>> ***/
asn_TYPE_member_t asn_MBR_ConstructedType_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct ConstructedType, field),
.tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_PrimitiveType,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.oer_constraints = 0, /* OER is not compiled, use -gen-OER */
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
.name = "field"
},
};
static const ber_tlv_tag_t asn_DEF_ConstructedType_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_ConstructedType_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 0, 0, 0 } /* field */
};
asn_SEQUENCE_specifics_t asn_SPC_ConstructedType_specs_1 = {
sizeof(struct ConstructedType),
offsetof(struct ConstructedType, _asn_ctx),
asn_MAP_ConstructedType_tag2el_1,
1, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
asn_TYPE_descriptor_t asn_DEF_ConstructedType = {
"ConstructedType",
"ConstructedType",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_compare,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, 0, /* No OER support, use "-gen-OER" to enable */
0, 0, /* No PER support, use "-gen-PER" to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_ConstructedType_tags_1,
sizeof(asn_DEF_ConstructedType_tags_1)
/sizeof(asn_DEF_ConstructedType_tags_1[0]), /* 1 */
asn_DEF_ConstructedType_tags_1, /* Same as above */
sizeof(asn_DEF_ConstructedType_tags_1)
/sizeof(asn_DEF_ConstructedType_tags_1[0]), /* 1 */
0, /* No OER visible constraints */
0, /* No PER visible constraints */
asn_MBR_ConstructedType_1,
1, /* Elements count */
&asn_SPC_ConstructedType_specs_1 /* Additional specs */
};
/*** <<< INCLUDES [T] >>> ***/
#include "ConstructedType.h"
/*** <<< TYPE-DECLS [T] >>> ***/
typedef ConstructedType_t T_t;
/*** <<< FUNC-DECLS [T] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_T;
asn_struct_free_f T_free;
asn_struct_print_f T_print;
asn_constr_check_f T_constraint;
ber_type_decoder_f T_decode_ber;
der_type_encoder_f T_encode_der;
xer_type_decoder_f T_decode_xer;
xer_type_encoder_f T_encode_xer;
/*** <<< CODE [T] >>> ***/
/*
* This type is implemented using ConstructedType,
* so here we adjust the DEF accordingly.
*/
/*** <<< STAT-DEFS [T] >>> ***/
static const ber_tlv_tag_t asn_DEF_T_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_TYPE_descriptor_t asn_DEF_T = {
"T",
"T",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_compare,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, 0, /* No OER support, use "-gen-OER" to enable */
0, 0, /* No PER support, use "-gen-PER" to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_T_tags_1,
sizeof(asn_DEF_T_tags_1)
/sizeof(asn_DEF_T_tags_1[0]) - 1, /* 1 */
asn_DEF_T_tags_1, /* Same as above */
sizeof(asn_DEF_T_tags_1)
/sizeof(asn_DEF_T_tags_1[0]), /* 2 */
0, /* No OER visible constraints */
0, /* No PER visible constraints */
asn_MBR_ConstructedType_1,
1, /* Elements count */
&asn_SPC_ConstructedType_specs_1 /* Additional specs */
};