asn1c/tests/39-sequence-of-OK.asn1.-P

202 lines
5.1 KiB
Plaintext
Raw Normal View History

2004-06-03 03:38:44 +00:00
2004-08-11 05:22:22 +00:00
/*** <<< INCLUDES [T] >>> ***/
2004-06-03 03:38:44 +00:00
#include <INTEGER.h>
#include <T2.h>
#include <asn_SEQUENCE_OF.h>
2004-08-11 05:22:22 +00:00
#include <constr_SEQUENCE_OF.h>
2004-06-03 03:38:44 +00:00
#include <constr_SEQUENCE.h>
2004-08-11 05:22:22 +00:00
/*** <<< DEPS [T] >>> ***/
2004-09-29 13:19:37 +00:00
extern asn_TYPE_descriptor_t asn_DEF_T;
2004-06-03 03:38:44 +00:00
/*** <<< TYPE-DECLS [T] >>> ***/
typedef struct T {
2005-01-30 18:34:07 +00:00
INTEGER_t Int;
2004-06-03 03:38:44 +00:00
struct collection {
2004-09-17 06:32:12 +00:00
A_SEQUENCE_OF(T2_t) list;
2004-06-03 03:38:44 +00:00
/* Context for parsing across buffer boundaries */
2004-09-29 13:19:37 +00:00
asn_struct_ctx_t _asn_ctx;
2004-06-03 03:38:44 +00:00
} collection;
/* Context for parsing across buffer boundaries */
2004-09-29 13:19:37 +00:00
asn_struct_ctx_t _asn_ctx;
2004-06-03 03:38:44 +00:00
} T_t;
/*** <<< STAT-DEFS [T] >>> ***/
2004-09-29 13:19:37 +00:00
static asn_TYPE_member_t asn_MBR_collection[] = {
{ ATF_NOFLAGS, 0, 0,
2004-08-20 13:36:32 +00:00
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0,
2004-09-29 13:19:37 +00:00
.type = (void *)&asn_DEF_T2,
2005-01-17 12:20:19 +00:00
.memb_constraints = 0, /* Defer constraints checking to the member type */
2004-08-20 13:36:32 +00:00
.name = ""
2004-06-03 03:38:44 +00:00
},
2004-08-20 13:36:32 +00:00
};
2004-09-29 13:19:37 +00:00
static ber_tlv_tag_t asn_DEF_collection_tags[] = {
2004-08-20 13:36:32 +00:00
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
2004-09-29 13:19:37 +00:00
static asn_SET_OF_specifics_t asn_DEF_collection_specs = {
2004-08-20 13:36:32 +00:00
sizeof(struct collection),
2004-09-29 13:19:37 +00:00
offsetof(struct collection, _asn_ctx),
2004-09-22 16:06:28 +00:00
0, /* XER encoding is XMLDelimitedItemList */
2004-08-20 13:36:32 +00:00
};
2004-09-07 06:44:29 +00:00
static /* Use -fall-defs-global to expose */
2004-09-29 13:19:37 +00:00
asn_TYPE_descriptor_t asn_DEF_collection = {
2004-10-20 15:50:55 +00:00
"collection",
2004-08-20 13:36:32 +00:00
"collection",
2004-09-22 16:06:28 +00:00
SEQUENCE_OF_free,
SEQUENCE_OF_print,
2004-08-20 13:36:32 +00:00
SEQUENCE_OF_constraint,
SEQUENCE_OF_decode_ber,
SEQUENCE_OF_encode_der,
2005-02-14 20:31:31 +00:00
SEQUENCE_OF_decode_xer,
2004-09-22 16:06:28 +00:00
SEQUENCE_OF_encode_xer,
2004-08-20 13:36:32 +00:00
0, /* Use generic outmost tag fetcher */
2004-09-29 13:19:37 +00:00
asn_DEF_collection_tags,
sizeof(asn_DEF_collection_tags)
/sizeof(asn_DEF_collection_tags[0]), /* 1 */
asn_DEF_collection_tags, /* Same as above */
sizeof(asn_DEF_collection_tags)
/sizeof(asn_DEF_collection_tags[0]), /* 1 */
asn_MBR_collection,
2004-08-20 13:36:32 +00:00
1, /* Single element */
2004-09-29 13:19:37 +00:00
&asn_DEF_collection_specs /* Additional specs */
2004-08-20 13:36:32 +00:00
};
2004-09-29 13:19:37 +00:00
static asn_TYPE_member_t asn_MBR_T[] = {
2005-01-30 18:34:07 +00:00
{ ATF_NOFLAGS, 0, offsetof(struct T, Int),
2004-08-20 13:36:32 +00:00
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0,
2004-09-29 13:19:37 +00:00
.type = (void *)&asn_DEF_INTEGER,
2005-01-17 12:20:19 +00:00
.memb_constraints = 0, /* Defer constraints checking to the member type */
2004-08-20 13:36:32 +00:00
.name = "int"
},
{ ATF_NOFLAGS, 0, offsetof(struct T, collection),
2004-08-20 13:36:32 +00:00
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0,
2004-09-29 13:19:37 +00:00
.type = (void *)&asn_DEF_collection,
2005-01-17 12:20:19 +00:00
.memb_constraints = 0, /* Defer constraints checking to the member type */
2004-08-20 13:36:32 +00:00
.name = "collection"
2004-06-03 03:38:44 +00:00
},
};
2004-09-29 13:19:37 +00:00
static ber_tlv_tag_t asn_DEF_T_tags[] = {
2004-06-03 03:38:44 +00:00
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
2004-09-29 13:19:37 +00:00
static asn_TYPE_tag2member_t asn_DEF_T_tag2el[] = {
2004-06-14 13:09:45 +00:00
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* int at 15 */
2005-02-25 08:19:34 +00:00
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* collection at 17 */
2004-06-06 07:20:52 +00:00
};
2004-09-29 13:19:37 +00:00
static asn_SEQUENCE_specifics_t asn_DEF_T_specs = {
2004-06-03 03:38:44 +00:00
sizeof(struct T),
2004-09-29 13:19:37 +00:00
offsetof(struct T, _asn_ctx),
asn_DEF_T_tag2el,
2004-06-06 07:20:52 +00:00
2, /* Count of tags in the map */
2004-06-03 03:38:44 +00:00
-1, /* Start extensions */
-1 /* Stop extensions */
};
2004-09-29 13:19:37 +00:00
asn_TYPE_descriptor_t asn_DEF_T = {
2004-10-20 15:50:55 +00:00
"T",
2004-06-03 03:38:44 +00:00
"T",
2004-09-22 16:06:28 +00:00
SEQUENCE_free,
SEQUENCE_print,
2004-06-03 03:38:44 +00:00
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
2004-10-23 15:07:45 +00:00
SEQUENCE_decode_xer,
2004-09-22 16:06:28 +00:00
SEQUENCE_encode_xer,
2004-06-03 03:38:44 +00:00
0, /* Use generic outmost tag fetcher */
2004-09-29 13:19:37 +00:00
asn_DEF_T_tags,
sizeof(asn_DEF_T_tags)
/sizeof(asn_DEF_T_tags[0]), /* 1 */
asn_DEF_T_tags, /* Same as above */
sizeof(asn_DEF_T_tags)
/sizeof(asn_DEF_T_tags[0]), /* 1 */
asn_MBR_T,
2004-08-20 13:36:32 +00:00
2, /* Elements count */
2004-09-29 13:19:37 +00:00
&asn_DEF_T_specs /* Additional specs */
2004-06-03 03:38:44 +00:00
};
2004-08-11 05:22:22 +00:00
/*** <<< INCLUDES [T2] >>> ***/
2004-06-03 03:38:44 +00:00
#include <BOOLEAN.h>
#include <UTF8String.h>
#include <constr_SEQUENCE.h>
2004-08-11 05:22:22 +00:00
/*** <<< DEPS [T2] >>> ***/
2004-09-29 13:19:37 +00:00
extern asn_TYPE_descriptor_t asn_DEF_T2;
2004-06-03 03:38:44 +00:00
/*** <<< TYPE-DECLS [T2] >>> ***/
typedef struct T2 {
BOOLEAN_t flag;
UTF8String_t str;
/* Context for parsing across buffer boundaries */
2004-09-29 13:19:37 +00:00
asn_struct_ctx_t _asn_ctx;
2004-06-03 03:38:44 +00:00
} T2_t;
/*** <<< STAT-DEFS [T2] >>> ***/
2004-09-29 13:19:37 +00:00
static asn_TYPE_member_t asn_MBR_T2[] = {
{ ATF_NOFLAGS, 0, offsetof(struct T2, flag),
2004-08-20 13:36:32 +00:00
.tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
.tag_mode = 0,
2004-09-29 13:19:37 +00:00
.type = (void *)&asn_DEF_BOOLEAN,
2005-01-17 12:20:19 +00:00
.memb_constraints = 0, /* Defer constraints checking to the member type */
2004-08-20 13:36:32 +00:00
.name = "flag"
2004-06-03 03:38:44 +00:00
},
{ ATF_NOFLAGS, 0, offsetof(struct T2, str),
2004-08-20 13:36:32 +00:00
.tag = (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
.tag_mode = 0,
2004-09-29 13:19:37 +00:00
.type = (void *)&asn_DEF_UTF8String,
2005-01-17 12:20:19 +00:00
.memb_constraints = 0, /* Defer constraints checking to the member type */
2004-08-20 13:36:32 +00:00
.name = "str"
2004-06-03 03:38:44 +00:00
},
};
2004-09-29 13:19:37 +00:00
static ber_tlv_tag_t asn_DEF_T2_tags[] = {
2004-06-03 03:38:44 +00:00
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
2004-09-29 13:19:37 +00:00
static asn_TYPE_tag2member_t asn_DEF_T2_tag2el[] = {
2004-06-14 13:09:45 +00:00
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* flag at 20 */
2005-02-25 08:19:34 +00:00
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 } /* str at 21 */
2004-06-06 07:20:52 +00:00
};
2004-09-29 13:19:37 +00:00
static asn_SEQUENCE_specifics_t asn_DEF_T2_specs = {
2004-06-03 03:38:44 +00:00
sizeof(struct T2),
2004-09-29 13:19:37 +00:00
offsetof(struct T2, _asn_ctx),
asn_DEF_T2_tag2el,
2004-06-06 07:20:52 +00:00
2, /* Count of tags in the map */
2004-06-03 03:38:44 +00:00
-1, /* Start extensions */
-1 /* Stop extensions */
};
2004-09-29 13:19:37 +00:00
asn_TYPE_descriptor_t asn_DEF_T2 = {
2004-10-20 15:50:55 +00:00
"T2",
2004-06-03 03:38:44 +00:00
"T2",
2004-09-22 16:06:28 +00:00
SEQUENCE_free,
SEQUENCE_print,
2004-06-03 03:38:44 +00:00
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
2004-10-23 15:07:45 +00:00
SEQUENCE_decode_xer,
2004-09-22 16:06:28 +00:00
SEQUENCE_encode_xer,
2004-06-03 03:38:44 +00:00
0, /* Use generic outmost tag fetcher */
2004-09-29 13:19:37 +00:00
asn_DEF_T2_tags,
sizeof(asn_DEF_T2_tags)
/sizeof(asn_DEF_T2_tags[0]), /* 1 */
asn_DEF_T2_tags, /* Same as above */
sizeof(asn_DEF_T2_tags)
/sizeof(asn_DEF_T2_tags[0]), /* 1 */
asn_MBR_T2,
2004-08-20 13:36:32 +00:00
2, /* Elements count */
2004-09-29 13:19:37 +00:00
&asn_DEF_T2_specs /* Additional specs */
2004-06-03 03:38:44 +00:00
};