blob: 970440d9e1d7ce658089183345cc0664dcdb7db6 [file] [log] [blame]
Lev Walkin5bbff1e2004-06-28 21:13:22 +00001
Lev Walkinb47ddce2004-08-11 05:25:47 +00002/*** <<< INCLUDES [PrimitiveType] >>> ***/
Lev Walkin5bbff1e2004-06-28 21:13:22 +00003
4#include <OCTET_STRING.h>
5
6/*** <<< TYPE-DECLS [PrimitiveType] >>> ***/
7
Lev Walkin5bbff1e2004-06-28 21:13:22 +00008typedef OCTET_STRING_t PrimitiveType_t;
9
Lev Walkin5bbff1e2004-06-28 21:13:22 +000010/*** <<< FUNC-DECLS [PrimitiveType] >>> ***/
11
Lev Walkincaf0d5a2005-03-04 23:48:19 +000012extern asn_TYPE_descriptor_t asn_DEF_PrimitiveType;
13asn_struct_free_f PrimitiveType_free;
14asn_struct_print_f PrimitiveType_print;
15asn_constr_check_f PrimitiveType_constraint;
16ber_type_decoder_f PrimitiveType_decode_ber;
17der_type_encoder_f PrimitiveType_encode_der;
18xer_type_decoder_f PrimitiveType_decode_xer;
19xer_type_encoder_f PrimitiveType_encode_xer;
Lev Walkin5bbff1e2004-06-28 21:13:22 +000020
Lev Walkin2e3055d2004-08-20 13:36:32 +000021/*** <<< CODE [PrimitiveType] >>> ***/
22
Lev Walkincaf0d5a2005-03-04 23:48:19 +000023/*
24 * This type is implemented using OCTET_STRING,
25 * so here we adjust the DEF accordingly.
26 */
Lev Walkincaf0d5a2005-03-04 23:48:19 +000027
28/*** <<< STAT-DEFS [PrimitiveType] >>> ***/
29
Lev Walkina7591b52014-10-12 18:37:35 -070030static const ber_tlv_tag_t asn_DEF_PrimitiveType_tags_1[] = {
Lev Walkincaf0d5a2005-03-04 23:48:19 +000031 (ASN_TAG_CLASS_UNIVERSAL | (4 << 2))
32};
33asn_TYPE_descriptor_t asn_DEF_PrimitiveType = {
34 "PrimitiveType",
35 "PrimitiveType",
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080036 OCTET_STRING_free,
37 OCTET_STRING_print,
38 OCTET_STRING_constraint,
39 OCTET_STRING_decode_ber,
40 OCTET_STRING_encode_der,
41 OCTET_STRING_decode_xer,
42 OCTET_STRING_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -070043 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +040044 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkincaf0d5a2005-03-04 23:48:19 +000045 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +000046 asn_DEF_PrimitiveType_tags_1,
47 sizeof(asn_DEF_PrimitiveType_tags_1)
48 /sizeof(asn_DEF_PrimitiveType_tags_1[0]), /* 1 */
49 asn_DEF_PrimitiveType_tags_1, /* Same as above */
50 sizeof(asn_DEF_PrimitiveType_tags_1)
51 /sizeof(asn_DEF_PrimitiveType_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +040052 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +000053 0, /* No PER visible constraints */
Lev Walkincaf0d5a2005-03-04 23:48:19 +000054 0, 0, /* No members */
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080055 &asn_SPC_OCTET_STRING_specs /* Additional specs */
Lev Walkincaf0d5a2005-03-04 23:48:19 +000056};
Lev Walkin5bbff1e2004-06-28 21:13:22 +000057
Lev Walkin5bbff1e2004-06-28 21:13:22 +000058
Lev Walkinb47ddce2004-08-11 05:25:47 +000059/*** <<< INCLUDES [ConstructedType] >>> ***/
Lev Walkin5bbff1e2004-06-28 21:13:22 +000060
Lev Walkin22b5ed42006-09-13 02:51:20 +000061#include "PrimitiveType.h"
Lev Walkin5bbff1e2004-06-28 21:13:22 +000062#include <constr_SEQUENCE.h>
63
Lev Walkin5bbff1e2004-06-28 21:13:22 +000064/*** <<< TYPE-DECLS [ConstructedType] >>> ***/
65
Lev Walkin5bbff1e2004-06-28 21:13:22 +000066typedef struct ConstructedType {
67 PrimitiveType_t field;
68
69 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +000070 asn_struct_ctx_t _asn_ctx;
Lev Walkin5bbff1e2004-06-28 21:13:22 +000071} ConstructedType_t;
72
Lev Walkinc8285712005-03-04 22:18:20 +000073/*** <<< FUNC-DECLS [ConstructedType] >>> ***/
74
75extern asn_TYPE_descriptor_t asn_DEF_ConstructedType;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080076extern asn_SEQUENCE_specifics_t asn_SPC_ConstructedType_specs_1;
77extern asn_TYPE_member_t asn_MBR_ConstructedType_1[1];
Lev Walkinc8285712005-03-04 22:18:20 +000078
Lev Walkin5bbff1e2004-06-28 21:13:22 +000079/*** <<< STAT-DEFS [ConstructedType] >>> ***/
80
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080081asn_TYPE_member_t asn_MBR_ConstructedType_1[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +000082 { ATF_NOFLAGS, 0, offsetof(struct ConstructedType, field),
Lev Walkin2e3055d2004-08-20 13:36:32 +000083 .tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
84 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +000085 .type = &asn_DEF_PrimitiveType,
Lev Walkinba58e1b2005-01-17 12:20:19 +000086 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040087 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000088 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
89 .default_value = 0,
Lev Walkin2e3055d2004-08-20 13:36:32 +000090 .name = "field"
Lev Walkin5bbff1e2004-06-28 21:13:22 +000091 },
92};
Lev Walkina7591b52014-10-12 18:37:35 -070093static const ber_tlv_tag_t asn_DEF_ConstructedType_tags_1[] = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +000094 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
95};
Lev Walkina7591b52014-10-12 18:37:35 -070096static const asn_TYPE_tag2member_t asn_MAP_ConstructedType_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070097 { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 0, 0, 0 } /* field */
Lev Walkin5bbff1e2004-06-28 21:13:22 +000098};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080099asn_SEQUENCE_specifics_t asn_SPC_ConstructedType_specs_1 = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000100 sizeof(struct ConstructedType),
Lev Walkindfae9752004-09-29 13:19:37 +0000101 offsetof(struct ConstructedType, _asn_ctx),
Lev Walkin59b176e2005-11-26 11:25:14 +0000102 asn_MAP_ConstructedType_tag2el_1,
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000103 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000104 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000105 -1, /* Start extensions */
106 -1 /* Stop extensions */
107};
Lev Walkindfae9752004-09-29 13:19:37 +0000108asn_TYPE_descriptor_t asn_DEF_ConstructedType = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000109 "ConstructedType",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000110 "ConstructedType",
Lev Walkina9cc46e2004-09-22 16:06:28 +0000111 SEQUENCE_free,
112 SEQUENCE_print,
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000113 SEQUENCE_constraint,
114 SEQUENCE_decode_ber,
115 SEQUENCE_encode_der,
Lev Walkin61b40d82004-10-23 15:07:45 +0000116 SEQUENCE_decode_xer,
Lev Walkina9cc46e2004-09-22 16:06:28 +0000117 SEQUENCE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700118 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400119 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000120 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000121 asn_DEF_ConstructedType_tags_1,
122 sizeof(asn_DEF_ConstructedType_tags_1)
123 /sizeof(asn_DEF_ConstructedType_tags_1[0]), /* 1 */
124 asn_DEF_ConstructedType_tags_1, /* Same as above */
125 sizeof(asn_DEF_ConstructedType_tags_1)
126 /sizeof(asn_DEF_ConstructedType_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400127 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000128 0, /* No PER visible constraints */
Lev Walkine0272aa2005-03-04 11:26:08 +0000129 asn_MBR_ConstructedType_1,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000130 1, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000131 &asn_SPC_ConstructedType_specs_1 /* Additional specs */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000132};
133
134
Lev Walkinb47ddce2004-08-11 05:25:47 +0000135/*** <<< INCLUDES [T] >>> ***/
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000136
Lev Walkin22b5ed42006-09-13 02:51:20 +0000137#include "ConstructedType.h"
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000138
139/*** <<< TYPE-DECLS [T] >>> ***/
140
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000141typedef ConstructedType_t T_t;
142
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000143/*** <<< FUNC-DECLS [T] >>> ***/
144
Lev Walkindfae9752004-09-29 13:19:37 +0000145extern asn_TYPE_descriptor_t asn_DEF_T;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000146asn_struct_free_f T_free;
147asn_struct_print_f T_print;
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000148asn_constr_check_f T_constraint;
149ber_type_decoder_f T_decode_ber;
150der_type_encoder_f T_encode_der;
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000151xer_type_decoder_f T_decode_xer;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000152xer_type_encoder_f T_encode_xer;
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000153
Lev Walkin2e3055d2004-08-20 13:36:32 +0000154/*** <<< CODE [T] >>> ***/
155
Lev Walkin2e3055d2004-08-20 13:36:32 +0000156/*
157 * This type is implemented using ConstructedType,
Lev Walkinc3808c12004-09-23 22:14:58 +0000158 * so here we adjust the DEF accordingly.
Lev Walkin2e3055d2004-08-20 13:36:32 +0000159 */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000160
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000161/*** <<< STAT-DEFS [T] >>> ***/
162
Lev Walkina7591b52014-10-12 18:37:35 -0700163static const ber_tlv_tag_t asn_DEF_T_tags_1[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000164 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
165 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000166};
Lev Walkindfae9752004-09-29 13:19:37 +0000167asn_TYPE_descriptor_t asn_DEF_T = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000168 "T",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000169 "T",
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800170 SEQUENCE_free,
171 SEQUENCE_print,
172 SEQUENCE_constraint,
173 SEQUENCE_decode_ber,
174 SEQUENCE_encode_der,
175 SEQUENCE_decode_xer,
176 SEQUENCE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700177 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400178 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000179 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000180 asn_DEF_T_tags_1,
181 sizeof(asn_DEF_T_tags_1)
182 /sizeof(asn_DEF_T_tags_1[0]) - 1, /* 1 */
183 asn_DEF_T_tags_1, /* Same as above */
184 sizeof(asn_DEF_T_tags_1)
185 /sizeof(asn_DEF_T_tags_1[0]), /* 2 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400186 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000187 0, /* No PER visible constraints */
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800188 asn_MBR_ConstructedType_1,
189 1, /* Elements count */
190 &asn_SPC_ConstructedType_specs_1 /* Additional specs */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000191};
192