vlm | 066dc10 | 2005-08-22 12:23:54 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [Sequence] >>> ***/ |
| 3 | |
| 4 | #include <INTEGER.h> |
| 5 | #include <constr_SEQUENCE.h> |
| 6 | |
| 7 | /*** <<< TYPE-DECLS [Sequence] >>> ***/ |
| 8 | |
| 9 | typedef struct Sequence { |
| 10 | INTEGER_t ainl; |
| 11 | INTEGER_t *aptr; |
| 12 | |
| 13 | /* Context for parsing across buffer boundaries */ |
| 14 | asn_struct_ctx_t _asn_ctx; |
| 15 | } Sequence_t; |
| 16 | |
| 17 | /*** <<< FUNC-DECLS [Sequence] >>> ***/ |
| 18 | |
| 19 | extern asn_TYPE_descriptor_t asn_DEF_Sequence; |
| 20 | |
| 21 | /*** <<< STAT-DEFS [Sequence] >>> ***/ |
| 22 | |
| 23 | static asn_TYPE_member_t asn_MBR_Sequence_1[] = { |
| 24 | { ATF_NOFLAGS, 0, offsetof(struct Sequence, ainl), |
| 25 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 26 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 27 | .type = (void *)&asn_DEF_INTEGER, |
| 28 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 29 | .name = "ainl" |
| 30 | }, |
| 31 | { ATF_POINTER, 0, offsetof(struct Sequence, aptr), |
| 32 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 33 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 34 | .type = (void *)&asn_DEF_INTEGER, |
| 35 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 36 | .name = "aptr" |
| 37 | }, |
| 38 | }; |
| 39 | static ber_tlv_tag_t asn_DEF_Sequence_1_tags[] = { |
| 40 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 41 | }; |
| 42 | static asn_TYPE_tag2member_t asn_MAP_Sequence_1_tag2el[] = { |
| 43 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ainl at 15 */ |
| 44 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* aptr at 17 */ |
| 45 | }; |
| 46 | static asn_SEQUENCE_specifics_t asn_SPC_Sequence_1_specs = { |
| 47 | sizeof(struct Sequence), |
| 48 | offsetof(struct Sequence, _asn_ctx), |
| 49 | asn_MAP_Sequence_1_tag2el, |
| 50 | 2, /* Count of tags in the map */ |
| 51 | -1, /* Start extensions */ |
| 52 | -1 /* Stop extensions */ |
| 53 | }; |
| 54 | asn_TYPE_descriptor_t asn_DEF_Sequence = { |
| 55 | "Sequence", |
| 56 | "Sequence", |
| 57 | SEQUENCE_free, |
| 58 | SEQUENCE_print, |
| 59 | SEQUENCE_constraint, |
| 60 | SEQUENCE_decode_ber, |
| 61 | SEQUENCE_encode_der, |
| 62 | SEQUENCE_decode_xer, |
| 63 | SEQUENCE_encode_xer, |
| 64 | 0, /* Use generic outmost tag fetcher */ |
| 65 | asn_DEF_Sequence_1_tags, |
| 66 | sizeof(asn_DEF_Sequence_1_tags) |
| 67 | /sizeof(asn_DEF_Sequence_1_tags[0]), /* 1 */ |
| 68 | asn_DEF_Sequence_1_tags, /* Same as above */ |
| 69 | sizeof(asn_DEF_Sequence_1_tags) |
| 70 | /sizeof(asn_DEF_Sequence_1_tags[0]), /* 1 */ |
| 71 | asn_MBR_Sequence_1, |
| 72 | 2, /* Elements count */ |
| 73 | &asn_SPC_Sequence_1_specs /* Additional specs */ |
| 74 | }; |
| 75 | |
| 76 | |
| 77 | /*** <<< INCLUDES [Set] >>> ***/ |
| 78 | |
| 79 | #include <Sequence.h> |
| 80 | #include <constr_SET.h> |
| 81 | |
| 82 | /*** <<< DEPS [Set] >>> ***/ |
| 83 | |
| 84 | |
| 85 | /* |
| 86 | * Method of determining the components presence |
| 87 | */ |
| 88 | typedef enum Set_PR { |
| 89 | Set_PR_ainl, /* Member ainl is present */ |
| 90 | Set_PR_aptr, /* Member aptr is present */ |
| 91 | } Set_PR; |
| 92 | |
| 93 | /*** <<< FWD-DECLS [Set] >>> ***/ |
| 94 | |
| 95 | struct Sequence; |
| 96 | |
| 97 | /*** <<< TYPE-DECLS [Set] >>> ***/ |
| 98 | |
| 99 | typedef struct Set { |
| 100 | Sequence_t ainl; |
| 101 | struct Sequence *aptr; |
| 102 | |
| 103 | /* Presence bitmask: ASN_SET_ISPRESENT(pSet, Set_PR_x) */ |
| 104 | unsigned int _presence_map |
| 105 | [((2+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))]; |
| 106 | |
| 107 | /* Context for parsing across buffer boundaries */ |
| 108 | asn_struct_ctx_t _asn_ctx; |
| 109 | } Set_t; |
| 110 | |
| 111 | /*** <<< FUNC-DECLS [Set] >>> ***/ |
| 112 | |
| 113 | extern asn_TYPE_descriptor_t asn_DEF_Set; |
| 114 | |
| 115 | /*** <<< POST-INCLUDE [Set] >>> ***/ |
| 116 | |
| 117 | #include <Sequence.h> |
| 118 | |
| 119 | /*** <<< STAT-DEFS [Set] >>> ***/ |
| 120 | |
| 121 | static asn_TYPE_member_t asn_MBR_Set_1[] = { |
| 122 | { ATF_NOFLAGS, 0, offsetof(struct Set, ainl), |
| 123 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 124 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 125 | .type = (void *)&asn_DEF_Sequence, |
| 126 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 127 | .name = "ainl" |
| 128 | }, |
| 129 | { ATF_POINTER, 0, offsetof(struct Set, aptr), |
| 130 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 131 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 132 | .type = (void *)&asn_DEF_Sequence, |
| 133 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 134 | .name = "aptr" |
| 135 | }, |
| 136 | }; |
| 137 | static ber_tlv_tag_t asn_DEF_Set_1_tags[] = { |
| 138 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 139 | }; |
| 140 | static asn_TYPE_tag2member_t asn_MAP_Set_1_tag2el[] = { |
| 141 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ainl at 20 */ |
| 142 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* aptr at 22 */ |
| 143 | }; |
| 144 | static uint8_t asn_MAP_Set_1_mmap[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = { |
| 145 | (1 << 7) | (1 << 6) |
| 146 | }; |
| 147 | static asn_SET_specifics_t asn_SPC_Set_1_specs = { |
| 148 | sizeof(struct Set), |
| 149 | offsetof(struct Set, _asn_ctx), |
| 150 | offsetof(struct Set, _presence_map), |
| 151 | asn_MAP_Set_1_tag2el, |
| 152 | 2, /* Count of tags in the map */ |
| 153 | asn_MAP_Set_1_tag2el, /* Same as above */ |
| 154 | 2, /* Count of tags in the CXER map */ |
| 155 | 0, /* Whether extensible */ |
| 156 | (unsigned int *)asn_MAP_Set_1_mmap /* Mandatory elements map */ |
| 157 | }; |
| 158 | asn_TYPE_descriptor_t asn_DEF_Set = { |
| 159 | "Set", |
| 160 | "Set", |
| 161 | SET_free, |
| 162 | SET_print, |
| 163 | SET_constraint, |
| 164 | SET_decode_ber, |
| 165 | SET_encode_der, |
| 166 | SET_decode_xer, |
| 167 | SET_encode_xer, |
| 168 | 0, /* Use generic outmost tag fetcher */ |
| 169 | asn_DEF_Set_1_tags, |
| 170 | sizeof(asn_DEF_Set_1_tags) |
| 171 | /sizeof(asn_DEF_Set_1_tags[0]), /* 1 */ |
| 172 | asn_DEF_Set_1_tags, /* Same as above */ |
| 173 | sizeof(asn_DEF_Set_1_tags) |
| 174 | /sizeof(asn_DEF_Set_1_tags[0]), /* 1 */ |
| 175 | asn_MBR_Set_1, |
| 176 | 2, /* Elements count */ |
| 177 | &asn_SPC_Set_1_specs /* Additional specs */ |
| 178 | }; |
| 179 | |
| 180 | |
| 181 | /*** <<< INCLUDES [Choice] >>> ***/ |
| 182 | |
| 183 | #include <Sequence.h> |
| 184 | #include <INTEGER.h> |
| 185 | #include <asn_SET_OF.h> |
| 186 | #include <constr_SET_OF.h> |
| 187 | #include <constr_CHOICE.h> |
| 188 | |
| 189 | /*** <<< DEPS [Choice] >>> ***/ |
| 190 | |
| 191 | typedef enum Choice_PR { |
| 192 | Choice_PR_NOTHING, /* No components present */ |
| 193 | Choice_PR_setof, |
| 194 | Choice_PR_aptr, |
| 195 | Choice_PR_ainl, |
| 196 | } Choice_PR; |
| 197 | |
| 198 | /*** <<< FWD-DECLS [Choice] >>> ***/ |
| 199 | |
| 200 | struct Sequence; |
| 201 | |
| 202 | /*** <<< TYPE-DECLS [Choice] >>> ***/ |
| 203 | |
| 204 | typedef struct Choice { |
| 205 | Choice_PR present; |
| 206 | union Choice_u { |
| 207 | struct setof { |
| 208 | A_SET_OF(INTEGER_t) list; |
| 209 | |
| 210 | /* Context for parsing across buffer boundaries */ |
| 211 | asn_struct_ctx_t _asn_ctx; |
| 212 | } *setof; |
| 213 | struct Sequence *aptr; |
| 214 | Sequence_t ainl; |
| 215 | } choice; |
| 216 | |
| 217 | /* Context for parsing across buffer boundaries */ |
| 218 | asn_struct_ctx_t _asn_ctx; |
| 219 | } Choice_t; |
| 220 | |
| 221 | /*** <<< FUNC-DECLS [Choice] >>> ***/ |
| 222 | |
| 223 | extern asn_TYPE_descriptor_t asn_DEF_Choice; |
| 224 | |
| 225 | /*** <<< POST-INCLUDE [Choice] >>> ***/ |
| 226 | |
| 227 | #include <Sequence.h> |
| 228 | |
| 229 | /*** <<< STAT-DEFS [Choice] >>> ***/ |
| 230 | |
| 231 | static asn_TYPE_member_t asn_MBR_setof_2[] = { |
| 232 | { ATF_POINTER, 0, 0, |
| 233 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 234 | .tag_mode = 0, |
| 235 | .type = (void *)&asn_DEF_INTEGER, |
| 236 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 237 | .name = "" |
| 238 | }, |
| 239 | }; |
| 240 | static ber_tlv_tag_t asn_DEF_setof_2_tags[] = { |
| 241 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 242 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 243 | }; |
| 244 | static asn_SET_OF_specifics_t asn_SPC_setof_2_specs = { |
| 245 | sizeof(struct setof), |
| 246 | offsetof(struct setof, _asn_ctx), |
| 247 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 248 | }; |
| 249 | static /* Use -fall-defs-global to expose */ |
| 250 | asn_TYPE_descriptor_t asn_DEF_setof_2 = { |
| 251 | "setof", |
| 252 | "setof", |
| 253 | SET_OF_free, |
| 254 | SET_OF_print, |
| 255 | SET_OF_constraint, |
| 256 | SET_OF_decode_ber, |
| 257 | SET_OF_encode_der, |
| 258 | SET_OF_decode_xer, |
| 259 | SET_OF_encode_xer, |
| 260 | 0, /* Use generic outmost tag fetcher */ |
| 261 | asn_DEF_setof_2_tags, |
| 262 | sizeof(asn_DEF_setof_2_tags) |
| 263 | /sizeof(asn_DEF_setof_2_tags[0]) - 1, /* 1 */ |
| 264 | asn_DEF_setof_2_tags, /* Same as above */ |
| 265 | sizeof(asn_DEF_setof_2_tags) |
| 266 | /sizeof(asn_DEF_setof_2_tags[0]), /* 2 */ |
| 267 | asn_MBR_setof_2, |
| 268 | 1, /* Single element */ |
| 269 | &asn_SPC_setof_2_specs /* Additional specs */ |
| 270 | }; |
| 271 | |
| 272 | static asn_TYPE_member_t asn_MBR_Choice_1[] = { |
| 273 | { ATF_POINTER, 0, offsetof(struct Choice, choice.setof), |
| 274 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 275 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 276 | .type = (void *)&asn_DEF_setof_2, |
| 277 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 278 | .name = "setof" |
| 279 | }, |
| 280 | { ATF_POINTER, 0, offsetof(struct Choice, choice.aptr), |
| 281 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 282 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 283 | .type = (void *)&asn_DEF_Sequence, |
| 284 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 285 | .name = "aptr" |
| 286 | }, |
| 287 | { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ainl), |
| 288 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 289 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 290 | .type = (void *)&asn_DEF_Sequence, |
| 291 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 292 | .name = "ainl" |
| 293 | }, |
| 294 | }; |
| 295 | static asn_TYPE_tag2member_t asn_MAP_Choice_1_tag2el[] = { |
| 296 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* setof at 25 */ |
| 297 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* aptr at 26 */ |
| 298 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ainl at 28 */ |
| 299 | }; |
| 300 | static asn_CHOICE_specifics_t asn_SPC_Choice_1_specs = { |
| 301 | sizeof(struct Choice), |
| 302 | offsetof(struct Choice, _asn_ctx), |
| 303 | offsetof(struct Choice, present), |
| 304 | sizeof(((struct Choice *)0)->present), |
| 305 | asn_MAP_Choice_1_tag2el, |
| 306 | 3, /* Count of tags in the map */ |
| 307 | 0 /* Whether extensible */ |
| 308 | }; |
| 309 | asn_TYPE_descriptor_t asn_DEF_Choice = { |
| 310 | "Choice", |
| 311 | "Choice", |
| 312 | CHOICE_free, |
| 313 | CHOICE_print, |
| 314 | CHOICE_constraint, |
| 315 | CHOICE_decode_ber, |
| 316 | CHOICE_encode_der, |
| 317 | CHOICE_decode_xer, |
| 318 | CHOICE_encode_xer, |
| 319 | CHOICE_outmost_tag, |
| 320 | 0, /* No effective tags (pointer) */ |
| 321 | 0, /* No effective tags (count) */ |
| 322 | 0, /* No tags (pointer) */ |
| 323 | 0, /* No tags (count) */ |
| 324 | asn_MBR_Choice_1, |
| 325 | 3, /* Elements count */ |
| 326 | &asn_SPC_Choice_1_specs /* Additional specs */ |
| 327 | }; |
| 328 | |