| 1 |
|
| 2 |
/*** <<< INCLUDES [TestSet] >>> ***/ |
| 3 |
|
| 4 |
#include <VisibleString.h> |
| 5 |
#include <constr_SET.h> |
| 6 |
|
| 7 |
/*** <<< DEPS [TestSet] >>> ***/ |
| 8 |
|
| 9 |
|
| 10 |
/* |
| 11 |
* Method of determining the components presence |
| 12 |
*/ |
| 13 |
typedef enum TestSet_PR { |
| 14 |
TestSet_PR_m0, /* Member m0 is present */ |
| 15 |
TestSet_PR_m1, /* Member m1 is present */ |
| 16 |
TestSet_PR_m2, /* Member m2 is present */ |
| 17 |
TestSet_PR_m3, /* Member m3 is present */ |
| 18 |
TestSet_PR_m4, /* Member m4 is present */ |
| 19 |
TestSet_PR_m5, /* Member m5 is present */ |
| 20 |
TestSet_PR_m6, /* Member m6 is present */ |
| 21 |
TestSet_PR_m7, /* Member m7 is present */ |
| 22 |
TestSet_PR_m8, /* Member m8 is present */ |
| 23 |
TestSet_PR_m9, /* Member m9 is present */ |
| 24 |
} TestSet_PR; |
| 25 |
|
| 26 |
/*** <<< TYPE-DECLS [TestSet] >>> ***/ |
| 27 |
|
| 28 |
typedef struct TestSet { |
| 29 |
VisibleString_t m0; |
| 30 |
VisibleString_t *m1 /* OPTIONAL */; |
| 31 |
VisibleString_t m2; |
| 32 |
VisibleString_t m3; |
| 33 |
VisibleString_t *m4 /* OPTIONAL */; |
| 34 |
VisibleString_t m5; |
| 35 |
VisibleString_t m6; |
| 36 |
VisibleString_t m7; |
| 37 |
VisibleString_t *m8 /* OPTIONAL */; |
| 38 |
VisibleString_t m9; |
| 39 |
/* |
| 40 |
* This type is extensible, |
| 41 |
* possible extensions are below. |
| 42 |
*/ |
| 43 |
|
| 44 |
/* Presence bitmask: ASN_SET_ISPRESENT(pTestSet, TestSet_PR_x) */ |
| 45 |
unsigned int _presence_map |
| 46 |
[((10+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))]; |
| 47 |
|
| 48 |
/* Context for parsing across buffer boundaries */ |
| 49 |
asn_struct_ctx_t _asn_ctx; |
| 50 |
} TestSet_t; |
| 51 |
|
| 52 |
/*** <<< FUNC-DECLS [TestSet] >>> ***/ |
| 53 |
|
| 54 |
extern asn_TYPE_descriptor_t asn_DEF_TestSet; |
| 55 |
|
| 56 |
/*** <<< STAT-DEFS [TestSet] >>> ***/ |
| 57 |
|
| 58 |
static asn_TYPE_member_t asn_MBR_TestSet_1[] = { |
| 59 |
{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m0), |
| 60 |
.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 61 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 62 |
.type = &asn_DEF_VisibleString, |
| 63 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 64 |
.per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 65 |
.default_value = 0, |
| 66 |
.name = "m0" |
| 67 |
}, |
| 68 |
{ ATF_POINTER, 1, offsetof(struct TestSet, m1), |
| 69 |
.tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 70 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 71 |
.type = &asn_DEF_VisibleString, |
| 72 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 73 |
.per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 74 |
.default_value = 0, |
| 75 |
.name = "m1" |
| 76 |
}, |
| 77 |
{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m2), |
| 78 |
.tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 79 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 80 |
.type = &asn_DEF_VisibleString, |
| 81 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 82 |
.per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 83 |
.default_value = 0, |
| 84 |
.name = "m2" |
| 85 |
}, |
| 86 |
{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m3), |
| 87 |
.tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 88 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 89 |
.type = &asn_DEF_VisibleString, |
| 90 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 91 |
.per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 92 |
.default_value = 0, |
| 93 |
.name = "m3" |
| 94 |
}, |
| 95 |
{ ATF_POINTER, 1, offsetof(struct TestSet, m4), |
| 96 |
.tag = (ASN_TAG_CLASS_CONTEXT | (4 << 2)), |
| 97 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 98 |
.type = &asn_DEF_VisibleString, |
| 99 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 100 |
.per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 101 |
.default_value = 0, |
| 102 |
.name = "m4" |
| 103 |
}, |
| 104 |
{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m5), |
| 105 |
.tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)), |
| 106 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 107 |
.type = &asn_DEF_VisibleString, |
| 108 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 109 |
.per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 110 |
.default_value = 0, |
| 111 |
.name = "m5" |
| 112 |
}, |
| 113 |
{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m6), |
| 114 |
.tag = (ASN_TAG_CLASS_CONTEXT | (6 << 2)), |
| 115 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 116 |
.type = &asn_DEF_VisibleString, |
| 117 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 118 |
.per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 119 |
.default_value = 0, |
| 120 |
.name = "m6" |
| 121 |
}, |
| 122 |
{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m7), |
| 123 |
.tag = (ASN_TAG_CLASS_CONTEXT | (7 << 2)), |
| 124 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 125 |
.type = &asn_DEF_VisibleString, |
| 126 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 127 |
.per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 128 |
.default_value = 0, |
| 129 |
.name = "m7" |
| 130 |
}, |
| 131 |
{ ATF_POINTER, 1, offsetof(struct TestSet, m8), |
| 132 |
.tag = (ASN_TAG_CLASS_CONTEXT | (8 << 2)), |
| 133 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 134 |
.type = &asn_DEF_VisibleString, |
| 135 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 136 |
.per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 137 |
.default_value = 0, |
| 138 |
.name = "m8" |
| 139 |
}, |
| 140 |
{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m9), |
| 141 |
.tag = (ASN_TAG_CLASS_CONTEXT | (9 << 2)), |
| 142 |
.tag_mode = -1, /* IMPLICIT tag at current level */ |
| 143 |
.type = &asn_DEF_VisibleString, |
| 144 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 145 |
.per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 146 |
.default_value = 0, |
| 147 |
.name = "m9" |
| 148 |
}, |
| 149 |
}; |
| 150 |
static const ber_tlv_tag_t asn_DEF_TestSet_tags_1[] = { |
| 151 |
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 152 |
}; |
| 153 |
static const asn_TYPE_tag2member_t asn_MAP_TestSet_tag2el_1[] = { |
| 154 |
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* m0 */ |
| 155 |
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* m1 */ |
| 156 |
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* m2 */ |
| 157 |
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* m3 */ |
| 158 |
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* m4 */ |
| 159 |
{ (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* m5 */ |
| 160 |
{ (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* m6 */ |
| 161 |
{ (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* m7 */ |
| 162 |
{ (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* m8 */ |
| 163 |
{ (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 } /* m9 */ |
| 164 |
}; |
| 165 |
static const uint8_t asn_MAP_TestSet_mmap_1[(10 + (8 * sizeof(unsigned int)) - 1) / 8] = { |
| 166 |
(1 << 7) | (0 << 6) | (1 << 5) | (1 << 4) | (0 << 3) | (1 << 2) | (1 << 1) | (1 << 0), |
| 167 |
(0 << 7) | (1 << 6) |
| 168 |
}; |
| 169 |
static asn_SET_specifics_t asn_SPC_TestSet_specs_1 = { |
| 170 |
sizeof(struct TestSet), |
| 171 |
offsetof(struct TestSet, _asn_ctx), |
| 172 |
offsetof(struct TestSet, _presence_map), |
| 173 |
asn_MAP_TestSet_tag2el_1, |
| 174 |
10, /* Count of tags in the map */ |
| 175 |
asn_MAP_TestSet_tag2el_1, /* Same as above */ |
| 176 |
10, /* Count of tags in the CXER map */ |
| 177 |
1, /* Whether extensible */ |
| 178 |
(unsigned int *)asn_MAP_TestSet_mmap_1 /* Mandatory elements map */ |
| 179 |
}; |
| 180 |
asn_TYPE_descriptor_t asn_DEF_TestSet = { |
| 181 |
"TestSet", |
| 182 |
"TestSet", |
| 183 |
SET_free, |
| 184 |
SET_print, |
| 185 |
SET_constraint, |
| 186 |
SET_decode_ber, |
| 187 |
SET_encode_der, |
| 188 |
SET_decode_xer, |
| 189 |
SET_encode_xer, |
| 190 |
0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 191 |
0, /* Use generic outmost tag fetcher */ |
| 192 |
asn_DEF_TestSet_tags_1, |
| 193 |
sizeof(asn_DEF_TestSet_tags_1) |
| 194 |
/sizeof(asn_DEF_TestSet_tags_1[0]), /* 1 */ |
| 195 |
asn_DEF_TestSet_tags_1, /* Same as above */ |
| 196 |
sizeof(asn_DEF_TestSet_tags_1) |
| 197 |
/sizeof(asn_DEF_TestSet_tags_1[0]), /* 1 */ |
| 198 |
0, /* No PER visible constraints */ |
| 199 |
asn_MBR_TestSet_1, |
| 200 |
10, /* Elements count */ |
| 201 |
&asn_SPC_TestSet_specs_1 /* Additional specs */ |
| 202 |
}; |
| 203 |
|