blob: ff3e78f05b5a39273e325e7000e43efdcd8e1650 [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,
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080037 OCTET_STRING_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +000038 asn_DEF_PrimitiveType_tags_1,
39 sizeof(asn_DEF_PrimitiveType_tags_1)
40 /sizeof(asn_DEF_PrimitiveType_tags_1[0]), /* 1 */
41 asn_DEF_PrimitiveType_tags_1, /* Same as above */
42 sizeof(asn_DEF_PrimitiveType_tags_1)
43 /sizeof(asn_DEF_PrimitiveType_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +040044 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +000045 0, /* No PER visible constraints */
Lev Walkincaf0d5a2005-03-04 23:48:19 +000046 0, 0, /* No members */
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080047 &asn_SPC_OCTET_STRING_specs /* Additional specs */
Lev Walkincaf0d5a2005-03-04 23:48:19 +000048};
Lev Walkin5bbff1e2004-06-28 21:13:22 +000049
Lev Walkin5bbff1e2004-06-28 21:13:22 +000050
Lev Walkinb47ddce2004-08-11 05:25:47 +000051/*** <<< INCLUDES [ConstructedType] >>> ***/
Lev Walkin5bbff1e2004-06-28 21:13:22 +000052
Lev Walkin22b5ed42006-09-13 02:51:20 +000053#include "PrimitiveType.h"
Lev Walkin5bbff1e2004-06-28 21:13:22 +000054#include <constr_SEQUENCE.h>
55
Lev Walkin5bbff1e2004-06-28 21:13:22 +000056/*** <<< TYPE-DECLS [ConstructedType] >>> ***/
57
Lev Walkin5bbff1e2004-06-28 21:13:22 +000058typedef struct ConstructedType {
59 PrimitiveType_t field;
60
61 /* Context for parsing across buffer boundaries */
Lev Walkindfae9752004-09-29 13:19:37 +000062 asn_struct_ctx_t _asn_ctx;
Lev Walkin5bbff1e2004-06-28 21:13:22 +000063} ConstructedType_t;
64
Lev Walkinc8285712005-03-04 22:18:20 +000065/*** <<< FUNC-DECLS [ConstructedType] >>> ***/
66
67extern asn_TYPE_descriptor_t asn_DEF_ConstructedType;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080068extern asn_SEQUENCE_specifics_t asn_SPC_ConstructedType_specs_1;
69extern asn_TYPE_member_t asn_MBR_ConstructedType_1[1];
Lev Walkinc8285712005-03-04 22:18:20 +000070
Lev Walkin5bbff1e2004-06-28 21:13:22 +000071/*** <<< STAT-DEFS [ConstructedType] >>> ***/
72
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080073asn_TYPE_member_t asn_MBR_ConstructedType_1[] = {
Lev Walkincc93b0f2004-09-10 09:18:20 +000074 { ATF_NOFLAGS, 0, offsetof(struct ConstructedType, field),
Lev Walkin2e3055d2004-08-20 13:36:32 +000075 .tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
76 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +000077 .type = &asn_DEF_PrimitiveType,
Lev Walkin67a30122017-08-10 05:48:54 -070078 .type_selector = 0,
Lev Walkinba58e1b2005-01-17 12:20:19 +000079 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040080 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000081 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
82 .default_value = 0,
Lev Walkin2e3055d2004-08-20 13:36:32 +000083 .name = "field"
Lev Walkin5bbff1e2004-06-28 21:13:22 +000084 },
85};
Lev Walkina7591b52014-10-12 18:37:35 -070086static const ber_tlv_tag_t asn_DEF_ConstructedType_tags_1[] = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +000087 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
88};
Lev Walkina7591b52014-10-12 18:37:35 -070089static const asn_TYPE_tag2member_t asn_MAP_ConstructedType_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070090 { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 0, 0, 0 } /* field */
Lev Walkin5bbff1e2004-06-28 21:13:22 +000091};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080092asn_SEQUENCE_specifics_t asn_SPC_ConstructedType_specs_1 = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +000093 sizeof(struct ConstructedType),
Lev Walkindfae9752004-09-29 13:19:37 +000094 offsetof(struct ConstructedType, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -070095 .tag2el = asn_MAP_ConstructedType_tag2el_1,
96 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +000097 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin5bbff1e2004-06-28 21:13:22 +000098 -1, /* Start extensions */
99 -1 /* Stop extensions */
100};
Lev Walkindfae9752004-09-29 13:19:37 +0000101asn_TYPE_descriptor_t asn_DEF_ConstructedType = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000102 "ConstructedType",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000103 "ConstructedType",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800104 &asn_OP_SEQUENCE,
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000105 SEQUENCE_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000106 asn_DEF_ConstructedType_tags_1,
107 sizeof(asn_DEF_ConstructedType_tags_1)
108 /sizeof(asn_DEF_ConstructedType_tags_1[0]), /* 1 */
109 asn_DEF_ConstructedType_tags_1, /* Same as above */
110 sizeof(asn_DEF_ConstructedType_tags_1)
111 /sizeof(asn_DEF_ConstructedType_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400112 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000113 0, /* No PER visible constraints */
Lev Walkine0272aa2005-03-04 11:26:08 +0000114 asn_MBR_ConstructedType_1,
Lev Walkin2e3055d2004-08-20 13:36:32 +0000115 1, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000116 &asn_SPC_ConstructedType_specs_1 /* Additional specs */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000117};
118
119
Lev Walkinb47ddce2004-08-11 05:25:47 +0000120/*** <<< INCLUDES [T] >>> ***/
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000121
Lev Walkin22b5ed42006-09-13 02:51:20 +0000122#include "ConstructedType.h"
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000123
124/*** <<< TYPE-DECLS [T] >>> ***/
125
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000126typedef ConstructedType_t T_t;
127
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000128/*** <<< FUNC-DECLS [T] >>> ***/
129
Lev Walkindfae9752004-09-29 13:19:37 +0000130extern asn_TYPE_descriptor_t asn_DEF_T;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000131asn_struct_free_f T_free;
132asn_struct_print_f T_print;
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000133asn_constr_check_f T_constraint;
134ber_type_decoder_f T_decode_ber;
135der_type_encoder_f T_encode_der;
Lev Walkin0ebe8b32004-10-23 13:26:56 +0000136xer_type_decoder_f T_decode_xer;
Lev Walkina9cc46e2004-09-22 16:06:28 +0000137xer_type_encoder_f T_encode_xer;
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000138
Lev Walkin2e3055d2004-08-20 13:36:32 +0000139/*** <<< CODE [T] >>> ***/
140
Lev Walkin2e3055d2004-08-20 13:36:32 +0000141/*
142 * This type is implemented using ConstructedType,
Lev Walkinc3808c12004-09-23 22:14:58 +0000143 * so here we adjust the DEF accordingly.
Lev Walkin2e3055d2004-08-20 13:36:32 +0000144 */
Lev Walkin2e3055d2004-08-20 13:36:32 +0000145
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000146/*** <<< STAT-DEFS [T] >>> ***/
147
Lev Walkina7591b52014-10-12 18:37:35 -0700148static const ber_tlv_tag_t asn_DEF_T_tags_1[] = {
Lev Walkin188ed2c2004-09-13 08:31:01 +0000149 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
150 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000151};
Lev Walkindfae9752004-09-29 13:19:37 +0000152asn_TYPE_descriptor_t asn_DEF_T = {
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000153 "T",
Lev Walkindc06f6b2004-10-20 15:50:55 +0000154 "T",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800155 &asn_OP_SEQUENCE,
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800156 SEQUENCE_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000157 asn_DEF_T_tags_1,
158 sizeof(asn_DEF_T_tags_1)
159 /sizeof(asn_DEF_T_tags_1[0]) - 1, /* 1 */
160 asn_DEF_T_tags_1, /* Same as above */
161 sizeof(asn_DEF_T_tags_1)
162 /sizeof(asn_DEF_T_tags_1[0]), /* 2 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400163 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000164 0, /* No PER visible constraints */
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800165 asn_MBR_ConstructedType_1,
166 1, /* Elements count */
167 &asn_SPC_ConstructedType_specs_1 /* Additional specs */
Lev Walkin5bbff1e2004-06-28 21:13:22 +0000168};
169