vlm | e287319 | 2005-10-05 08:59:03 +0000 | [diff] [blame^] | 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 | .name = "m0" |
| 65 | }, |
| 66 | { ATF_POINTER, 1, offsetof(struct TestSet, m1), |
| 67 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 68 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 69 | .type = &asn_DEF_VisibleString, |
| 70 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 71 | .name = "m1" |
| 72 | }, |
| 73 | { ATF_NOFLAGS, 0, offsetof(struct TestSet, m2), |
| 74 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 75 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 76 | .type = &asn_DEF_VisibleString, |
| 77 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 78 | .name = "m2" |
| 79 | }, |
| 80 | { ATF_NOFLAGS, 0, offsetof(struct TestSet, m3), |
| 81 | .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 82 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 83 | .type = &asn_DEF_VisibleString, |
| 84 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 85 | .name = "m3" |
| 86 | }, |
| 87 | { ATF_POINTER, 1, offsetof(struct TestSet, m4), |
| 88 | .tag = (ASN_TAG_CLASS_CONTEXT | (4 << 2)), |
| 89 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 90 | .type = &asn_DEF_VisibleString, |
| 91 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 92 | .name = "m4" |
| 93 | }, |
| 94 | { ATF_NOFLAGS, 0, offsetof(struct TestSet, m5), |
| 95 | .tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)), |
| 96 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 97 | .type = &asn_DEF_VisibleString, |
| 98 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 99 | .name = "m5" |
| 100 | }, |
| 101 | { ATF_NOFLAGS, 0, offsetof(struct TestSet, m6), |
| 102 | .tag = (ASN_TAG_CLASS_CONTEXT | (6 << 2)), |
| 103 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 104 | .type = &asn_DEF_VisibleString, |
| 105 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 106 | .name = "m6" |
| 107 | }, |
| 108 | { ATF_NOFLAGS, 0, offsetof(struct TestSet, m7), |
| 109 | .tag = (ASN_TAG_CLASS_CONTEXT | (7 << 2)), |
| 110 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 111 | .type = &asn_DEF_VisibleString, |
| 112 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 113 | .name = "m7" |
| 114 | }, |
| 115 | { ATF_POINTER, 1, offsetof(struct TestSet, m8), |
| 116 | .tag = (ASN_TAG_CLASS_CONTEXT | (8 << 2)), |
| 117 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 118 | .type = &asn_DEF_VisibleString, |
| 119 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 120 | .name = "m8" |
| 121 | }, |
| 122 | { ATF_NOFLAGS, 0, offsetof(struct TestSet, m9), |
| 123 | .tag = (ASN_TAG_CLASS_CONTEXT | (9 << 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 | .name = "m9" |
| 128 | }, |
| 129 | }; |
| 130 | static ber_tlv_tag_t asn_DEF_TestSet_1_tags[] = { |
| 131 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 132 | }; |
| 133 | static asn_TYPE_tag2member_t asn_MAP_TestSet_1_tag2el[] = { |
| 134 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* m0 at 15 */ |
| 135 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* m1 at 16 */ |
| 136 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* m2 at 17 */ |
| 137 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* m3 at 18 */ |
| 138 | { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* m4 at 19 */ |
| 139 | { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* m5 at 20 */ |
| 140 | { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* m6 at 21 */ |
| 141 | { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* m7 at 22 */ |
| 142 | { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* m8 at 23 */ |
| 143 | { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 } /* m9 at 24 */ |
| 144 | }; |
| 145 | static uint8_t asn_MAP_TestSet_1_mmap[(10 + (8 * sizeof(unsigned int)) - 1) / 8] = { |
| 146 | (1 << 7) | (0 << 6) | (1 << 5) | (1 << 4) | (0 << 3) | (1 << 2) | (1 << 1) | (1 << 0), |
| 147 | (0 << 7) | (1 << 6) |
| 148 | }; |
| 149 | static asn_SET_specifics_t asn_SPC_TestSet_1_specs = { |
| 150 | sizeof(struct TestSet), |
| 151 | offsetof(struct TestSet, _asn_ctx), |
| 152 | offsetof(struct TestSet, _presence_map), |
| 153 | asn_MAP_TestSet_1_tag2el, |
| 154 | 10, /* Count of tags in the map */ |
| 155 | asn_MAP_TestSet_1_tag2el, /* Same as above */ |
| 156 | 10, /* Count of tags in the CXER map */ |
| 157 | 1, /* Whether extensible */ |
| 158 | (unsigned int *)asn_MAP_TestSet_1_mmap /* Mandatory elements map */ |
| 159 | }; |
| 160 | asn_TYPE_descriptor_t asn_DEF_TestSet = { |
| 161 | "TestSet", |
| 162 | "TestSet", |
| 163 | SET_free, |
| 164 | SET_print, |
| 165 | SET_constraint, |
| 166 | SET_decode_ber, |
| 167 | SET_encode_der, |
| 168 | SET_decode_xer, |
| 169 | SET_encode_xer, |
| 170 | 0, /* Use generic outmost tag fetcher */ |
| 171 | asn_DEF_TestSet_1_tags, |
| 172 | sizeof(asn_DEF_TestSet_1_tags) |
| 173 | /sizeof(asn_DEF_TestSet_1_tags[0]), /* 1 */ |
| 174 | asn_DEF_TestSet_1_tags, /* Same as above */ |
| 175 | sizeof(asn_DEF_TestSet_1_tags) |
| 176 | /sizeof(asn_DEF_TestSet_1_tags[0]), /* 1 */ |
| 177 | asn_MBR_TestSet_1, |
| 178 | 10, /* Elements count */ |
| 179 | &asn_SPC_TestSet_1_specs /* Additional specs */ |
| 180 | }; |
| 181 | |