Debian Codegraph @

tests/30-set-OK.asn1.-Pfwide-types

raw
1
2 /*** <<< INCLUDES [T] >>> ***/
3
4 #include <INTEGER.h>
5 #include <IA5String.h>
6 #include <BOOLEAN.h>
7 #include <constr_SET.h>
8
9 /*** <<< DEPS [T] >>> ***/
10
11
12 /*
13 * Method of determining the components presence
14 */
15 typedef enum T_PR {
16 T_PR_i, /* Member i is present */
17 T_PR_s, /* Member s is present */
18 T_PR_b, /* Member b is present */
19 } T_PR;
20
21 /*** <<< TYPE-DECLS [T] >>> ***/
22
23 typedef struct T {
24 INTEGER_t i;
25 IA5String_t s;
26 /*
27 * This type is extensible,
28 * possible extensions are below.
29 */
30 BOOLEAN_t *b;
31
32 /* Presence bitmask: ASN_SET_ISPRESENT(pT, T_PR_x) */
33 unsigned int _presence_map
34 [((3+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
35
36 /* Context for parsing across buffer boundaries */
37 asn_struct_ctx_t _asn_ctx;
38 } T_t;
39
40 /*** <<< FUNC-DECLS [T] >>> ***/
41
42 extern asn_TYPE_descriptor_t asn_DEF_T;
43
44 /*** <<< STAT-DEFS [T] >>> ***/
45
46 static asn_TYPE_member_t asn_MBR_T_1[] = {
47 { ATF_NOFLAGS, 0, offsetof(struct T, i),
48 .tag = (ASN_TAG_CLASS_APPLICATION | (3 << 2)),
49 .tag_mode = -1, /* IMPLICIT tag at current level */
50 .type = &asn_DEF_INTEGER,
51 .memb_constraints = 0, /* Defer constraints checking to the member type */
52 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
53 .default_value = 0,
54 .name = "i"
55 },
56 { ATF_NOFLAGS, 0, offsetof(struct T, s),
57 .tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)),
58 .tag_mode = 0,
59 .type = &asn_DEF_IA5String,
60 .memb_constraints = 0, /* Defer constraints checking to the member type */
61 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
62 .default_value = 0,
63 .name = "s"
64 },
65 { ATF_POINTER, 1, offsetof(struct T, b),
66 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
67 .tag_mode = -1, /* IMPLICIT tag at current level */
68 .type = &asn_DEF_BOOLEAN,
69 .memb_constraints = 0, /* Defer constraints checking to the member type */
70 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
71 .default_value = 0,
72 .name = "b"
73 },
74 };
75 static const ber_tlv_tag_t asn_DEF_T_tags_1[] = {
76 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
77 };
78 static const asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = {
79 { (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), 1, 0, 0 }, /* s */
80 { (ASN_TAG_CLASS_APPLICATION | (3 << 2)), 0, 0, 0 }, /* i */
81 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* b */
82 };
83 static const uint8_t asn_MAP_T_mmap_1[(3 + (8 * sizeof(unsigned int)) - 1) / 8] = {
84 (1 << 7) | (1 << 6) | (0 << 5)
85 };
86 static asn_SET_specifics_t asn_SPC_T_specs_1 = {
87 sizeof(struct T),
88 offsetof(struct T, _asn_ctx),
89 offsetof(struct T, _presence_map),
90 asn_MAP_T_tag2el_1,
91 3, /* Count of tags in the map */
92 asn_MAP_T_tag2el_1, /* Same as above */
93 3, /* Count of tags in the CXER map */
94 1, /* Whether extensible */
95 (unsigned int *)asn_MAP_T_mmap_1 /* Mandatory elements map */
96 };
97 asn_TYPE_descriptor_t asn_DEF_T = {
98 "T",
99 "T",
100 SET_free,
101 SET_print,
102 SET_constraint,
103 SET_decode_ber,
104 SET_encode_der,
105 SET_decode_xer,
106 SET_encode_xer,
107 0, 0, /* No PER support, use "-gen-PER" to enable */
108 0, /* Use generic outmost tag fetcher */
109 asn_DEF_T_tags_1,
110 sizeof(asn_DEF_T_tags_1)
111 /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
112 asn_DEF_T_tags_1, /* Same as above */
113 sizeof(asn_DEF_T_tags_1)
114 /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
115 0, /* No PER visible constraints */
116 asn_MBR_T_1,
117 3, /* Elements count */
118 &asn_SPC_T_specs_1 /* Additional specs */
119 };
120