aboutsummaryrefslogtreecommitdiffstats
path: root/tests/94-set-optionals-OK.asn1.-P
blob: 862a5bb475dba85ee303ceb8e1a6da478d658f4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
/*** <<< INCLUDES [TestSet] >>> ***/

#include <VisibleString.h>
#include <constr_SET.h>

/*** <<< DEPS [TestSet] >>> ***/


/*
 * Method of determining the components presence
 */
typedef enum TestSet_PR {
	TestSet_PR_m0,	/* Member m0 is present */
	TestSet_PR_m1,	/* Member m1 is present */
	TestSet_PR_m2,	/* Member m2 is present */
	TestSet_PR_m3,	/* Member m3 is present */
	TestSet_PR_m4,	/* Member m4 is present */
	TestSet_PR_m5,	/* Member m5 is present */
	TestSet_PR_m6,	/* Member m6 is present */
	TestSet_PR_m7,	/* Member m7 is present */
	TestSet_PR_m8,	/* Member m8 is present */
	TestSet_PR_m9,	/* Member m9 is present */
} TestSet_PR;

/*** <<< TYPE-DECLS [TestSet] >>> ***/

typedef struct TestSet {
	VisibleString_t	 m0;
	VisibleString_t	*m1	/* OPTIONAL */;
	VisibleString_t	 m2;
	VisibleString_t	 m3;
	VisibleString_t	*m4	/* OPTIONAL */;
	VisibleString_t	 m5;
	VisibleString_t	 m6;
	VisibleString_t	 m7;
	VisibleString_t	*m8	/* OPTIONAL */;
	VisibleString_t	 m9;
	/*
	 * This type is extensible,
	 * possible extensions are below.
	 */
	
	/* Presence bitmask: ASN_SET_ISPRESENT(pTestSet, TestSet_PR_x) */
	unsigned int _presence_map
		[((10+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
	
	/* Context for parsing across buffer boundaries */
	asn_struct_ctx_t _asn_ctx;
} TestSet_t;

/*** <<< FUNC-DECLS [TestSet] >>> ***/

extern asn_TYPE_descriptor_t asn_DEF_TestSet;

/*** <<< STAT-DEFS [TestSet] >>> ***/

static asn_TYPE_member_t asn_MBR_TestSet_1[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m0),
		.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		.tag_mode = -1,	/* IMPLICIT tag at current level */
		.type = &asn_DEF_VisibleString,
		.memb_constraints = 0,	/* Defer constraints checking to the member type */
		.per_constraints = 0,	/* PER is not compiled, use -gen-PER */
		.default_value = 0,
		.name = "m0"
		},
	{ ATF_POINTER, 1, offsetof(struct TestSet, m1),
		.tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		.tag_mode = -1,	/* IMPLICIT tag at current level */
		.type = &asn_DEF_VisibleString,
		.memb_constraints = 0,	/* Defer constraints checking to the member type */
		.per_constraints = 0,	/* PER is not compiled, use -gen-PER */
		.default_value = 0,
		.name = "m1"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m2),
		.tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		.tag_mode = -1,	/* IMPLICIT tag at current level */
		.type = &asn_DEF_VisibleString,
		.memb_constraints = 0,	/* Defer constraints checking to the member type */
		.per_constraints = 0,	/* PER is not compiled, use -gen-PER */
		.default_value = 0,
		.name = "m2"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m3),
		.tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
		.tag_mode = -1,	/* IMPLICIT tag at current level */
		.type = &asn_DEF_VisibleString,
		.memb_constraints = 0,	/* Defer constraints checking to the member type */
		.per_constraints = 0,	/* PER is not compiled, use -gen-PER */
		.default_value = 0,
		.name = "m3"
		},
	{ ATF_POINTER, 1, offsetof(struct TestSet, m4),
		.tag = (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
		.tag_mode = -1,	/* IMPLICIT tag at current level */
		.type = &asn_DEF_VisibleString,
		.memb_constraints = 0,	/* Defer constraints checking to the member type */
		.per_constraints = 0,	/* PER is not compiled, use -gen-PER */
		.default_value = 0,
		.name = "m4"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m5),
		.tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
		.tag_mode = -1,	/* IMPLICIT tag at current level */
		.type = &asn_DEF_VisibleString,
		.memb_constraints = 0,	/* Defer constraints checking to the member type */
		.per_constraints = 0,	/* PER is not compiled, use -gen-PER */
		.default_value = 0,
		.name = "m5"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m6),
		.tag = (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
		.tag_mode = -1,	/* IMPLICIT tag at current level */
		.type = &asn_DEF_VisibleString,
		.memb_constraints = 0,	/* Defer constraints checking to the member type */
		.per_constraints = 0,	/* PER is not compiled, use -gen-PER */
		.default_value = 0,
		.name = "m6"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m7),
		.tag = (ASN_TAG_CLASS_CONTEXT | (7 << 2)),
		.tag_mode = -1,	/* IMPLICIT tag at current level */
		.type = &asn_DEF_VisibleString,
		.memb_constraints = 0,	/* Defer constraints checking to the member type */
		.per_constraints = 0,	/* PER is not compiled, use -gen-PER */
		.default_value = 0,
		.name = "m7"
		},
	{ ATF_POINTER, 1, offsetof(struct TestSet, m8),
		.tag = (ASN_TAG_CLASS_CONTEXT | (8 << 2)),
		.tag_mode = -1,	/* IMPLICIT tag at current level */
		.type = &asn_DEF_VisibleString,
		.memb_constraints = 0,	/* Defer constraints checking to the member type */
		.per_constraints = 0,	/* PER is not compiled, use -gen-PER */
		.default_value = 0,
		.name = "m8"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m9),
		.tag = (ASN_TAG_CLASS_CONTEXT | (9 << 2)),
		.tag_mode = -1,	/* IMPLICIT tag at current level */
		.type = &asn_DEF_VisibleString,
		.memb_constraints = 0,	/* Defer constraints checking to the member type */
		.per_constraints = 0,	/* PER is not compiled, use -gen-PER */
		.default_value = 0,
		.name = "m9"
		},
};
static ber_tlv_tag_t asn_DEF_TestSet_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_TestSet_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* m0 */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* m1 */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* m2 */
    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* m3 */
    { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* m4 */
    { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* m5 */
    { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* m6 */
    { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* m7 */
    { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* m8 */
    { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 } /* m9 */
};
static uint8_t asn_MAP_TestSet_mmap_1[(10 + (8 * sizeof(unsigned int)) - 1) / 8] = {
	(1 << 7) | (0 << 6) | (1 << 5) | (1 << 4) | (0 << 3) | (1 << 2) | (1 << 1) | (1 << 0),
	(0 << 7) | (1 << 6)
};
static asn_SET_specifics_t asn_SPC_TestSet_specs_1 = {
	sizeof(struct TestSet),
	offsetof(struct TestSet, _asn_ctx),
	offsetof(struct TestSet, _presence_map),
	asn_MAP_TestSet_tag2el_1,
	10,	/* Count of tags in the map */
	asn_MAP_TestSet_tag2el_1,	/* Same as above */
	10,	/* Count of tags in the CXER map */
	1,	/* Whether extensible */
	(unsigned int *)asn_MAP_TestSet_mmap_1	/* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_TestSet = {
	"TestSet",
	"TestSet",
	SET_free,
	SET_print,
	SET_constraint,
	SET_decode_ber,
	SET_encode_der,
	SET_decode_xer,
	SET_encode_xer,
	0, 0,	/* No PER support, use "-gen-PER" to enable */
	0,	/* Use generic outmost tag fetcher */
	asn_DEF_TestSet_tags_1,
	sizeof(asn_DEF_TestSet_tags_1)
		/sizeof(asn_DEF_TestSet_tags_1[0]), /* 1 */
	asn_DEF_TestSet_tags_1,	/* Same as above */
	sizeof(asn_DEF_TestSet_tags_1)
		/sizeof(asn_DEF_TestSet_tags_1[0]), /* 1 */
	0,	/* No PER visible constraints */
	asn_MBR_TestSet_1,
	10,	/* Elements count */
	&asn_SPC_TestSet_specs_1	/* Additional specs */
};