blob: ea18361d3754d5193778719be8badd89d657d6a8 [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, Chiu1f87ac02017-08-20 01:25:45 +080036 &asn_OP_OCTET_STRING,
Lev Walkin59b176e2005-11-26 11:25:14 +000037 asn_DEF_PrimitiveType_tags_1,
38 sizeof(asn_DEF_PrimitiveType_tags_1)
39 /sizeof(asn_DEF_PrimitiveType_tags_1[0]), /* 1 */
40 asn_DEF_PrimitiveType_tags_1, /* Same as above */
41 sizeof(asn_DEF_PrimitiveType_tags_1)
42 /sizeof(asn_DEF_PrimitiveType_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -070043 { 0, 0, OCTET_STRING_constraint },
Lev Walkincaf0d5a2005-03-04 23:48:19 +000044 0, 0, /* No members */
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080045 &asn_SPC_OCTET_STRING_specs /* Additional specs */
Lev Walkincaf0d5a2005-03-04 23:48:19 +000046};
Lev Walkin5bbff1e2004-06-28 21:13:22 +000047
Lev Walkin5bbff1e2004-06-28 21:13:22 +000048
Lev Walkinb47ddce2004-08-11 05:25:47 +000049/*** <<< INCLUDES [ConstructedType] >>> ***/
Lev Walkin5bbff1e2004-06-28 21:13:22 +000050
Lev Walkin22b5ed42006-09-13 02:51:20 +000051#include "PrimitiveType.h"
Lev Walkin5bbff1e2004-06-28 21:13:22 +000052#include <constr_SEQUENCE.h>
53
Lev Walkin5bbff1e2004-06-28 21:13:22 +000054/*** <<< TYPE-DECLS [ConstructedType] >>> ***/
55
Lev Walkin5bbff1e2004-06-28 21:13:22 +000056typedef struct ConstructedType {
57 PrimitiveType_t field;
58
59 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +000060 asn_struct_ctx_t _asn_ctx;
Lev Walkin5bbff1e2004-06-28 21:13:22 +000061} ConstructedType_t;
62
Lev Walkinc8285712005-03-04 22:18:20 +000063/*** <<< FUNC-DECLS [ConstructedType] >>> ***/
64
65extern asn_TYPE_descriptor_t asn_DEF_ConstructedType;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080066extern asn_SEQUENCE_specifics_t asn_SPC_ConstructedType_specs_1;
67extern asn_TYPE_member_t asn_MBR_ConstructedType_1[1];
Lev Walkinc8285712005-03-04 22:18:20 +000068
Lev Walkin5bbff1e2004-06-28 21:13:22 +000069/*** <<< STAT-DEFS [ConstructedType] >>> ***/
70
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080071asn_TYPE_member_t asn_MBR_ConstructedType_1[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +000072 { ATF_NOFLAGS, 0, offsetof(struct ConstructedType, field),
Lev Walkin2e3055d2004-08-20 13:36:32 +000073 .tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
74 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +000075 .type = &asn_DEF_PrimitiveType,
Lev Walkin67a30122017-08-10 05:48:54 -070076 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -070077 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -070078 0, 0, /* No default value */
Lev Walkin2e3055d2004-08-20 13:36:32 +000079 .name = "field"
Lev Walkin5bbff1e2004-06-28 21:13:22 +000080 },
81};
Lev Walkina7591b52014-10-12 18:37:35 -070082static const ber_tlv_tag_t asn_DEF_ConstructedType_tags_1[] = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +000083 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
84};
Lev Walkina7591b52014-10-12 18:37:35 -070085static const asn_TYPE_tag2member_t asn_MAP_ConstructedType_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070086 { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 0, 0, 0 } /* field */
Lev Walkin5bbff1e2004-06-28 21:13:22 +000087};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080088asn_SEQUENCE_specifics_t asn_SPC_ConstructedType_specs_1 = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +000089 sizeof(struct ConstructedType),
Lev Walkindfae9752004-09-29 13:19:37 +000090 offsetof(struct ConstructedType, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -070091 .tag2el = asn_MAP_ConstructedType_tag2el_1,
92 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +000093 0, 0, 0, /* Optional elements (not needed) */
Lev Walkindf2edbb2017-10-21 13:40:07 -070094 -1, /* First extension addition */
Lev Walkin5bbff1e2004-06-28 21:13:22 +000095};
Lev Walkindfae9752004-09-29 13:19:37 +000096asn_TYPE_descriptor_t asn_DEF_ConstructedType = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +000097 "ConstructedType",
Lev Walkindc06f6b2004-10-20 15:50:55 +000098 "ConstructedType",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +080099 &asn_OP_SEQUENCE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000100 asn_DEF_ConstructedType_tags_1,
101 sizeof(asn_DEF_ConstructedType_tags_1)
102 /sizeof(asn_DEF_ConstructedType_tags_1[0]), /* 1 */
103 asn_DEF_ConstructedType_tags_1, /* Same as above */
104 sizeof(asn_DEF_ConstructedType_tags_1)
105 /sizeof(asn_DEF_ConstructedType_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700106 { 0, 0, SEQUENCE_constraint },
Lev Walkine0272aa2005-03-04 11:26:08 +0000107 asn_MBR_ConstructedType_1,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000108 1, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000109 &asn_SPC_ConstructedType_specs_1 /* Additional specs */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000110};
111
112
Lev Walkinb47ddce2004-08-11 05:25:47 +0000113/*** <<< INCLUDES [T] >>> ***/
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000114
Lev Walkin22b5ed42006-09-13 02:51:20 +0000115#include "ConstructedType.h"
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000116
117/*** <<< TYPE-DECLS [T] >>> ***/
118
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000119typedef ConstructedType_t T_t;
120
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000121/*** <<< FUNC-DECLS [T] >>> ***/
122
Lev Walkindfae9752004-09-29 13:19:37 +0000123extern asn_TYPE_descriptor_t asn_DEF_T;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000124asn_struct_free_f T_free;
125asn_struct_print_f T_print;
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000126asn_constr_check_f T_constraint;
127ber_type_decoder_f T_decode_ber;
128der_type_encoder_f T_encode_der;
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000129xer_type_decoder_f T_decode_xer;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000130xer_type_encoder_f T_encode_xer;
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000131
Lev Walkin2e3055d2004-08-20 13:36:32 +0000132/*** <<< CODE [T] >>> ***/
133
Lev Walkin2e3055d2004-08-20 13:36:32 +0000134/*
135 * This type is implemented using ConstructedType,
Lev Walkinc3808c12004-09-23 22:14:58 +0000136 * so here we adjust the DEF accordingly.
Lev Walkin2e3055d2004-08-20 13:36:32 +0000137 */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000138
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000139/*** <<< STAT-DEFS [T] >>> ***/
140
Lev Walkina7591b52014-10-12 18:37:35 -0700141static const ber_tlv_tag_t asn_DEF_T_tags_1[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000142 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
143 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000144};
Lev Walkindfae9752004-09-29 13:19:37 +0000145asn_TYPE_descriptor_t asn_DEF_T = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000146 "T",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000147 "T",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800148 &asn_OP_SEQUENCE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000149 asn_DEF_T_tags_1,
150 sizeof(asn_DEF_T_tags_1)
151 /sizeof(asn_DEF_T_tags_1[0]) - 1, /* 1 */
152 asn_DEF_T_tags_1, /* Same as above */
153 sizeof(asn_DEF_T_tags_1)
154 /sizeof(asn_DEF_T_tags_1[0]), /* 2 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700155 { 0, 0, SEQUENCE_constraint },
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800156 asn_MBR_ConstructedType_1,
157 1, /* Elements count */
158 &asn_SPC_ConstructedType_specs_1 /* Additional specs */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000159};
160