vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [PDU] >>> ***/ |
| 3 | |
| 4 | #include <Sequence.h> |
| 5 | #include <Set.h> |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 6 | #include <SequenceOf.h> |
| 7 | #include <ExtensibleSet.h> |
| 8 | #include <ExtensibleSequence.h> |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 9 | #include <ExtensibleSequence2.h> |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 10 | #include <SetOfNULL.h> |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 11 | #include <SetOfREAL.h> |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 12 | #include <SetOfEnums.h> |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 13 | #include <NamedSetOfNULL.h> |
| 14 | #include <NamedSetOfREAL.h> |
| 15 | #include <NamedSetOfEnums.h> |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 16 | #include <SeqOfZuka.h> |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 17 | #include <SetOfChoice.h> |
| 18 | #include <NamedSetOfChoice.h> |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 19 | #include <constr_CHOICE.h> |
| 20 | |
| 21 | /*** <<< DEPS [PDU] >>> ***/ |
| 22 | |
| 23 | typedef enum PDU_PR { |
| 24 | PDU_PR_NOTHING, /* No components present */ |
| 25 | PDU_PR_sequence, |
| 26 | PDU_PR_set, |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 27 | PDU_PR_sequenceOf, |
| 28 | PDU_PR_extensibleSet, |
| 29 | PDU_PR_extensibleSequence, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 30 | PDU_PR_extensibleSequence2, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 31 | PDU_PR_setOfNULL, |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 32 | PDU_PR_setOfREAL, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 33 | PDU_PR_setOfEnums, |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 34 | PDU_PR_namedSetOfNULL, |
| 35 | PDU_PR_namedSetOfREAL, |
| 36 | PDU_PR_namedSetOfEnums, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 37 | PDU_PR_seqOfZuka, |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 38 | PDU_PR_setOfChoice, |
| 39 | PDU_PR_namedSetOfChoice, |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 40 | /* Extensions may appear below */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 41 | } PDU_PR; |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 42 | |
| 43 | /*** <<< TYPE-DECLS [PDU] >>> ***/ |
| 44 | |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 45 | typedef struct PDU { |
| 46 | PDU_PR present; |
vlm | 2e77428 | 2005-08-14 15:03:31 +0000 | [diff] [blame] | 47 | union PDU_u { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 48 | Sequence_t sequence; |
| 49 | Set_t set; |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 50 | SequenceOf_t sequenceOf; |
| 51 | ExtensibleSet_t extensibleSet; |
| 52 | ExtensibleSequence_t extensibleSequence; |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 53 | ExtensibleSequence2_t extensibleSequence2; |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 54 | SetOfNULL_t setOfNULL; |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 55 | SetOfREAL_t setOfREAL; |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 56 | SetOfEnums_t setOfEnums; |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 57 | NamedSetOfNULL_t namedSetOfNULL; |
| 58 | NamedSetOfREAL_t namedSetOfREAL; |
| 59 | NamedSetOfEnums_t namedSetOfEnums; |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 60 | SeqOfZuka_t seqOfZuka; |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 61 | SetOfChoice_t setOfChoice; |
| 62 | NamedSetOfChoice_t namedSetOfChoice; |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 63 | /* |
| 64 | * This type is extensible, |
| 65 | * possible extensions are below. |
| 66 | */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 67 | } choice; |
| 68 | |
| 69 | /* Context for parsing across buffer boundaries */ |
| 70 | asn_struct_ctx_t _asn_ctx; |
| 71 | } PDU_t; |
| 72 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 73 | /*** <<< FUNC-DECLS [PDU] >>> ***/ |
| 74 | |
| 75 | extern asn_TYPE_descriptor_t asn_DEF_PDU; |
| 76 | |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 77 | /*** <<< STAT-DEFS [PDU] >>> ***/ |
| 78 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 79 | static asn_TYPE_member_t asn_MBR_PDU_1[] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 80 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.sequence), |
| 81 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 82 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 83 | .type = &asn_DEF_Sequence, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 84 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 85 | .name = "sequence" |
| 86 | }, |
| 87 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.set), |
| 88 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 89 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 90 | .type = &asn_DEF_Set, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 91 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 92 | .name = "set" |
| 93 | }, |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 94 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.sequenceOf), |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 95 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 96 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 97 | .type = &asn_DEF_SequenceOf, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 98 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 99 | .name = "sequenceOf" |
| 100 | }, |
| 101 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.extensibleSet), |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 102 | .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 103 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 104 | .type = &asn_DEF_ExtensibleSet, |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 105 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 106 | .name = "extensibleSet" |
| 107 | }, |
| 108 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.extensibleSequence), |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 109 | .tag = (ASN_TAG_CLASS_CONTEXT | (4 << 2)), |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 110 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 111 | .type = &asn_DEF_ExtensibleSequence, |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 112 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 113 | .name = "extensibleSequence" |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 114 | }, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 115 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.extensibleSequence2), |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 116 | .tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)), |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 117 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 118 | .type = &asn_DEF_ExtensibleSequence2, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 119 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 120 | .name = "extensibleSequence2" |
| 121 | }, |
| 122 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.setOfNULL), |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 123 | .tag = (ASN_TAG_CLASS_CONTEXT | (6 << 2)), |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 124 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 125 | .type = &asn_DEF_SetOfNULL, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 126 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 127 | .name = "setOfNULL" |
| 128 | }, |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 129 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.setOfREAL), |
| 130 | .tag = (ASN_TAG_CLASS_CONTEXT | (7 << 2)), |
| 131 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 132 | .type = &asn_DEF_SetOfREAL, |
| 133 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 134 | .name = "setOfREAL" |
| 135 | }, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 136 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.setOfEnums), |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 137 | .tag = (ASN_TAG_CLASS_CONTEXT | (8 << 2)), |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 138 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 139 | .type = &asn_DEF_SetOfEnums, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 140 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 141 | .name = "setOfEnums" |
| 142 | }, |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 143 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.namedSetOfNULL), |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 144 | .tag = (ASN_TAG_CLASS_CONTEXT | (9 << 2)), |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 145 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 146 | .type = &asn_DEF_NamedSetOfNULL, |
| 147 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 148 | .name = "namedSetOfNULL" |
| 149 | }, |
| 150 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.namedSetOfREAL), |
| 151 | .tag = (ASN_TAG_CLASS_CONTEXT | (10 << 2)), |
| 152 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 153 | .type = &asn_DEF_NamedSetOfREAL, |
| 154 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 155 | .name = "namedSetOfREAL" |
| 156 | }, |
| 157 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.namedSetOfEnums), |
| 158 | .tag = (ASN_TAG_CLASS_CONTEXT | (11 << 2)), |
| 159 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 160 | .type = &asn_DEF_NamedSetOfEnums, |
| 161 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 162 | .name = "namedSetOfEnums" |
| 163 | }, |
| 164 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.seqOfZuka), |
| 165 | .tag = (ASN_TAG_CLASS_CONTEXT | (12 << 2)), |
| 166 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 167 | .type = &asn_DEF_SeqOfZuka, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 168 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 169 | .name = "seqOfZuka" |
| 170 | }, |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 171 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.setOfChoice), |
| 172 | .tag = (ASN_TAG_CLASS_CONTEXT | (13 << 2)), |
| 173 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 174 | .type = &asn_DEF_SetOfChoice, |
| 175 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 176 | .name = "setOfChoice" |
| 177 | }, |
| 178 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.namedSetOfChoice), |
| 179 | .tag = (ASN_TAG_CLASS_CONTEXT | (14 << 2)), |
| 180 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 181 | .type = &asn_DEF_NamedSetOfChoice, |
| 182 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 183 | .name = "namedSetOfChoice" |
| 184 | }, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 185 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 186 | static asn_TYPE_tag2member_t asn_MAP_PDU_1_tag2el[] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 187 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sequence at 19 */ |
| 188 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* set at 20 */ |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 189 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* sequenceOf at 21 */ |
| 190 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* extensibleSet at 22 */ |
| 191 | { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* extensibleSequence at 23 */ |
| 192 | { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* extensibleSequence2 at 24 */ |
| 193 | { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* setOfNULL at 25 */ |
| 194 | { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* setOfREAL at 26 */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 195 | { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* setOfEnums at 27 */ |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 196 | { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* namedSetOfNULL at 28 */ |
| 197 | { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 10, 0, 0 }, /* namedSetOfREAL at 29 */ |
| 198 | { (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 11, 0, 0 }, /* namedSetOfEnums at 30 */ |
| 199 | { (ASN_TAG_CLASS_CONTEXT | (12 << 2)), 12, 0, 0 }, /* seqOfZuka at 31 */ |
| 200 | { (ASN_TAG_CLASS_CONTEXT | (13 << 2)), 13, 0, 0 }, /* setOfChoice at 32 */ |
| 201 | { (ASN_TAG_CLASS_CONTEXT | (14 << 2)), 14, 0, 0 } /* namedSetOfChoice at 33 */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 202 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 203 | static asn_CHOICE_specifics_t asn_SPC_PDU_1_specs = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 204 | sizeof(struct PDU), |
| 205 | offsetof(struct PDU, _asn_ctx), |
| 206 | offsetof(struct PDU, present), |
| 207 | sizeof(((struct PDU *)0)->present), |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 208 | asn_MAP_PDU_1_tag2el, |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 209 | 15, /* Count of tags in the map */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 210 | 1 /* Whether extensible */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 211 | }; |
| 212 | asn_TYPE_descriptor_t asn_DEF_PDU = { |
| 213 | "PDU", |
| 214 | "PDU", |
| 215 | CHOICE_free, |
| 216 | CHOICE_print, |
| 217 | CHOICE_constraint, |
| 218 | CHOICE_decode_ber, |
| 219 | CHOICE_encode_der, |
| 220 | CHOICE_decode_xer, |
| 221 | CHOICE_encode_xer, |
| 222 | CHOICE_outmost_tag, |
| 223 | 0, /* No effective tags (pointer) */ |
| 224 | 0, /* No effective tags (count) */ |
| 225 | 0, /* No tags (pointer) */ |
| 226 | 0, /* No tags (count) */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 227 | asn_MBR_PDU_1, |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 228 | 15, /* Elements count */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 229 | &asn_SPC_PDU_1_specs /* Additional specs */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 230 | }; |
| 231 | |
| 232 | |
| 233 | /*** <<< INCLUDES [Sequence] >>> ***/ |
| 234 | |
| 235 | #include <INTEGER.h> |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 236 | #include <BIT_STRING.h> |
| 237 | #include <UTF8String.h> |
| 238 | #include <constr_SEQUENCE.h> |
| 239 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 240 | /*** <<< FWD-DECLS [Sequence] >>> ***/ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 241 | |
vlm | 5feb752 | 2005-03-04 23:50:56 +0000 | [diff] [blame] | 242 | struct Sequence; |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 243 | |
| 244 | /*** <<< TYPE-DECLS [Sequence] >>> ***/ |
| 245 | |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 246 | typedef struct Sequence { |
| 247 | INTEGER_t integer; |
| 248 | struct Sequence *sequence /* OPTIONAL */; |
| 249 | BIT_STRING_t *bits /* OPTIONAL */; |
| 250 | UTF8String_t string; |
| 251 | |
| 252 | /* Context for parsing across buffer boundaries */ |
| 253 | asn_struct_ctx_t _asn_ctx; |
| 254 | } Sequence_t; |
| 255 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 256 | /*** <<< FUNC-DECLS [Sequence] >>> ***/ |
| 257 | |
| 258 | extern asn_TYPE_descriptor_t asn_DEF_Sequence; |
| 259 | |
| 260 | /*** <<< POST-INCLUDE [Sequence] >>> ***/ |
| 261 | |
| 262 | #include <Sequence.h> |
| 263 | |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 264 | /*** <<< STAT-DEFS [Sequence] >>> ***/ |
| 265 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 266 | static asn_TYPE_member_t asn_MBR_Sequence_1[] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 267 | { ATF_NOFLAGS, 0, offsetof(struct Sequence, integer), |
| 268 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 269 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 270 | .type = &asn_DEF_INTEGER, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 271 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 272 | .name = "integer" |
| 273 | }, |
| 274 | { ATF_POINTER, 2, offsetof(struct Sequence, sequence), |
| 275 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 276 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 277 | .type = &asn_DEF_Sequence, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 278 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 279 | .name = "sequence" |
| 280 | }, |
| 281 | { ATF_POINTER, 1, offsetof(struct Sequence, bits), |
| 282 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 283 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 284 | .type = &asn_DEF_BIT_STRING, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 285 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 286 | .name = "bits" |
| 287 | }, |
| 288 | { ATF_NOFLAGS, 0, offsetof(struct Sequence, string), |
| 289 | .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 290 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 291 | .type = &asn_DEF_UTF8String, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 292 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 293 | .name = "string" |
| 294 | }, |
| 295 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 296 | static ber_tlv_tag_t asn_DEF_Sequence_1_tags[] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 297 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 298 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 299 | static asn_TYPE_tag2member_t asn_MAP_Sequence_1_tag2el[] = { |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 300 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* integer at 38 */ |
| 301 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* sequence at 39 */ |
| 302 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* bits at 40 */ |
| 303 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* string at 41 */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 304 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 305 | static asn_SEQUENCE_specifics_t asn_SPC_Sequence_1_specs = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 306 | sizeof(struct Sequence), |
| 307 | offsetof(struct Sequence, _asn_ctx), |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 308 | asn_MAP_Sequence_1_tag2el, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 309 | 4, /* Count of tags in the map */ |
| 310 | -1, /* Start extensions */ |
| 311 | -1 /* Stop extensions */ |
| 312 | }; |
| 313 | asn_TYPE_descriptor_t asn_DEF_Sequence = { |
| 314 | "Sequence", |
| 315 | "Sequence", |
| 316 | SEQUENCE_free, |
| 317 | SEQUENCE_print, |
| 318 | SEQUENCE_constraint, |
| 319 | SEQUENCE_decode_ber, |
| 320 | SEQUENCE_encode_der, |
| 321 | SEQUENCE_decode_xer, |
| 322 | SEQUENCE_encode_xer, |
| 323 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 324 | asn_DEF_Sequence_1_tags, |
| 325 | sizeof(asn_DEF_Sequence_1_tags) |
| 326 | /sizeof(asn_DEF_Sequence_1_tags[0]), /* 1 */ |
| 327 | asn_DEF_Sequence_1_tags, /* Same as above */ |
| 328 | sizeof(asn_DEF_Sequence_1_tags) |
| 329 | /sizeof(asn_DEF_Sequence_1_tags[0]), /* 1 */ |
| 330 | asn_MBR_Sequence_1, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 331 | 4, /* Elements count */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 332 | &asn_SPC_Sequence_1_specs /* Additional specs */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 333 | }; |
| 334 | |
| 335 | |
| 336 | /*** <<< INCLUDES [Set] >>> ***/ |
| 337 | |
| 338 | #include <RELATIVE-OID.h> |
| 339 | #include <OCTET_STRING.h> |
| 340 | #include <constr_SET.h> |
| 341 | |
| 342 | /*** <<< DEPS [Set] >>> ***/ |
| 343 | |
| 344 | |
| 345 | /* |
| 346 | * Method of determining the components presence |
| 347 | */ |
| 348 | typedef enum Set_PR { |
| 349 | Set_PR_roid, /* Member roid is present */ |
| 350 | Set_PR_opaque, /* Member opaque is present */ |
| 351 | } Set_PR; |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 352 | |
| 353 | /*** <<< TYPE-DECLS [Set] >>> ***/ |
| 354 | |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 355 | typedef struct Set { |
| 356 | RELATIVE_OID_t roid; |
| 357 | OCTET_STRING_t *opaque /* OPTIONAL */; |
| 358 | |
| 359 | /* Presence bitmask: ASN_SET_ISPRESENT(pSet, Set_PR_x) */ |
| 360 | unsigned int _presence_map |
| 361 | [((2+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))]; |
| 362 | |
| 363 | /* Context for parsing across buffer boundaries */ |
| 364 | asn_struct_ctx_t _asn_ctx; |
| 365 | } Set_t; |
| 366 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 367 | /*** <<< FUNC-DECLS [Set] >>> ***/ |
| 368 | |
| 369 | extern asn_TYPE_descriptor_t asn_DEF_Set; |
| 370 | |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 371 | /*** <<< STAT-DEFS [Set] >>> ***/ |
| 372 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 373 | static asn_TYPE_member_t asn_MBR_Set_1[] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 374 | { ATF_NOFLAGS, 0, offsetof(struct Set, roid), |
| 375 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 376 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 377 | .type = &asn_DEF_RELATIVE_OID, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 378 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 379 | .name = "roid" |
| 380 | }, |
| 381 | { ATF_POINTER, 1, offsetof(struct Set, opaque), |
| 382 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 383 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 384 | .type = &asn_DEF_OCTET_STRING, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 385 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 386 | .name = "opaque" |
| 387 | }, |
| 388 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 389 | static ber_tlv_tag_t asn_DEF_Set_1_tags[] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 390 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 391 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 392 | static asn_TYPE_tag2member_t asn_MAP_Set_1_tag2el[] = { |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 393 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* roid at 45 */ |
| 394 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* opaque at 46 */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 395 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 396 | static uint8_t asn_MAP_Set_1_mmap[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 397 | (1 << 7) | (0 << 6) |
| 398 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 399 | static asn_SET_specifics_t asn_SPC_Set_1_specs = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 400 | sizeof(struct Set), |
| 401 | offsetof(struct Set, _asn_ctx), |
| 402 | offsetof(struct Set, _presence_map), |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 403 | asn_MAP_Set_1_tag2el, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 404 | 2, /* Count of tags in the map */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 405 | asn_MAP_Set_1_tag2el, /* Same as above */ |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 406 | 2, /* Count of tags in the CXER map */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 407 | 0, /* Whether extensible */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 408 | (unsigned int *)asn_MAP_Set_1_mmap /* Mandatory elements map */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 409 | }; |
| 410 | asn_TYPE_descriptor_t asn_DEF_Set = { |
| 411 | "Set", |
| 412 | "Set", |
| 413 | SET_free, |
| 414 | SET_print, |
| 415 | SET_constraint, |
| 416 | SET_decode_ber, |
| 417 | SET_encode_der, |
| 418 | SET_decode_xer, |
| 419 | SET_encode_xer, |
| 420 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 421 | asn_DEF_Set_1_tags, |
| 422 | sizeof(asn_DEF_Set_1_tags) |
| 423 | /sizeof(asn_DEF_Set_1_tags[0]), /* 1 */ |
| 424 | asn_DEF_Set_1_tags, /* Same as above */ |
| 425 | sizeof(asn_DEF_Set_1_tags) |
| 426 | /sizeof(asn_DEF_Set_1_tags[0]), /* 1 */ |
| 427 | asn_MBR_Set_1, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 428 | 2, /* Elements count */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 429 | &asn_SPC_Set_1_specs /* Additional specs */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 430 | }; |
| 431 | |
| 432 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 433 | /*** <<< INCLUDES [ExtensibleSet] >>> ***/ |
| 434 | |
| 435 | #include <UTF8String.h> |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 436 | #include <ENUMERATED.h> |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 437 | #include <constr_SET.h> |
| 438 | |
| 439 | /*** <<< DEPS [ExtensibleSet] >>> ***/ |
| 440 | |
| 441 | |
| 442 | /* |
| 443 | * Method of determining the components presence |
| 444 | */ |
| 445 | typedef enum ExtensibleSet_PR { |
| 446 | ExtensibleSet_PR_string, /* Member string is present */ |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 447 | ExtensibleSet_PR_enum, /* Member enum is present */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 448 | } ExtensibleSet_PR; |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 449 | typedef enum Enum { |
| 450 | enum_b = 0, |
| 451 | enum_a = 1 |
| 452 | } enum_e; |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 453 | |
| 454 | /*** <<< TYPE-DECLS [ExtensibleSet] >>> ***/ |
| 455 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 456 | typedef struct ExtensibleSet { |
| 457 | UTF8String_t *string /* OPTIONAL */; |
| 458 | /* |
| 459 | * This type is extensible, |
| 460 | * possible extensions are below. |
| 461 | */ |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 462 | ENUMERATED_t *Enum; |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 463 | |
| 464 | /* Presence bitmask: ASN_SET_ISPRESENT(pExtensibleSet, ExtensibleSet_PR_x) */ |
| 465 | unsigned int _presence_map |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 466 | [((2+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))]; |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 467 | |
| 468 | /* Context for parsing across buffer boundaries */ |
| 469 | asn_struct_ctx_t _asn_ctx; |
| 470 | } ExtensibleSet_t; |
| 471 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 472 | /*** <<< FUNC-DECLS [ExtensibleSet] >>> ***/ |
| 473 | |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 474 | /* extern asn_TYPE_descriptor_t asn_DEF_enum_4; // (Use -fall-defs-global to expose) */ |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 475 | extern asn_TYPE_descriptor_t asn_DEF_ExtensibleSet; |
| 476 | |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 477 | /*** <<< CODE [ExtensibleSet] >>> ***/ |
| 478 | |
| 479 | static int |
| 480 | enum_4_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 481 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 482 | /* Replace with underlying type checker */ |
| 483 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
| 484 | return td->check_constraints(td, sptr, app_errlog, app_key); |
| 485 | } |
| 486 | |
| 487 | /* |
| 488 | * This type is implemented using ENUMERATED, |
| 489 | * so here we adjust the DEF accordingly. |
| 490 | */ |
| 491 | static void |
| 492 | enum_4_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 493 | td->free_struct = asn_DEF_ENUMERATED.free_struct; |
| 494 | td->print_struct = asn_DEF_ENUMERATED.print_struct; |
| 495 | td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder; |
| 496 | td->der_encoder = asn_DEF_ENUMERATED.der_encoder; |
| 497 | td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder; |
| 498 | td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder; |
| 499 | td->elements = asn_DEF_ENUMERATED.elements; |
| 500 | td->elements_count = asn_DEF_ENUMERATED.elements_count; |
vlm | 541def9 | 2005-03-29 19:05:37 +0000 | [diff] [blame] | 501 | /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */ |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 502 | } |
| 503 | |
| 504 | static void |
| 505 | enum_4_free(asn_TYPE_descriptor_t *td, |
| 506 | void *struct_ptr, int contents_only) { |
| 507 | enum_4_inherit_TYPE_descriptor(td); |
| 508 | td->free_struct(td, struct_ptr, contents_only); |
| 509 | } |
| 510 | |
| 511 | static int |
| 512 | enum_4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 513 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 514 | enum_4_inherit_TYPE_descriptor(td); |
| 515 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 516 | } |
| 517 | |
| 518 | static asn_dec_rval_t |
| 519 | enum_4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
vlm | c04faea | 2005-03-17 21:57:19 +0000 | [diff] [blame] | 520 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 521 | enum_4_inherit_TYPE_descriptor(td); |
| 522 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 523 | } |
| 524 | |
| 525 | static asn_enc_rval_t |
| 526 | enum_4_encode_der(asn_TYPE_descriptor_t *td, |
| 527 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 528 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 529 | enum_4_inherit_TYPE_descriptor(td); |
| 530 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 531 | } |
| 532 | |
| 533 | static asn_dec_rval_t |
| 534 | enum_4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
vlm | c04faea | 2005-03-17 21:57:19 +0000 | [diff] [blame] | 535 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 536 | enum_4_inherit_TYPE_descriptor(td); |
| 537 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 538 | } |
| 539 | |
| 540 | static asn_enc_rval_t |
| 541 | enum_4_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 542 | int ilevel, enum xer_encoder_flags_e flags, |
| 543 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 544 | enum_4_inherit_TYPE_descriptor(td); |
| 545 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 546 | } |
| 547 | |
| 548 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 549 | /*** <<< STAT-DEFS [ExtensibleSet] >>> ***/ |
| 550 | |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 551 | static asn_INTEGER_enum_map_t asn_MAP_enum_4_value2enum[] = { |
| 552 | { 0, 1, "b" }, |
| 553 | { 1, 1, "a" } |
| 554 | }; |
| 555 | static unsigned int asn_MAP_enum_4_enum2value[] = { |
| 556 | 1, /* a(1) */ |
| 557 | 0 /* b(0) */ |
| 558 | }; |
| 559 | static asn_INTEGER_specifics_t asn_SPC_enum_4_specs = { |
| 560 | asn_MAP_enum_4_value2enum, /* "tag" => N; sorted by tag */ |
| 561 | asn_MAP_enum_4_enum2value, /* N => "tag"; sorted by N */ |
| 562 | 2, /* Number of elements in the maps */ |
| 563 | 0, /* Enumeration is not extensible */ |
| 564 | 1 /* Strict enumeration */ |
| 565 | }; |
| 566 | static ber_tlv_tag_t asn_DEF_enum_4_tags[] = { |
| 567 | (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 568 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 569 | }; |
| 570 | static /* Use -fall-defs-global to expose */ |
| 571 | asn_TYPE_descriptor_t asn_DEF_enum_4 = { |
| 572 | "enum", |
| 573 | "enum", |
| 574 | enum_4_free, |
| 575 | enum_4_print, |
| 576 | enum_4_constraint, |
| 577 | enum_4_decode_ber, |
| 578 | enum_4_encode_der, |
| 579 | enum_4_decode_xer, |
| 580 | enum_4_encode_xer, |
| 581 | 0, /* Use generic outmost tag fetcher */ |
| 582 | asn_DEF_enum_4_tags, |
| 583 | sizeof(asn_DEF_enum_4_tags) |
| 584 | /sizeof(asn_DEF_enum_4_tags[0]) - 1, /* 1 */ |
| 585 | asn_DEF_enum_4_tags, /* Same as above */ |
| 586 | sizeof(asn_DEF_enum_4_tags) |
| 587 | /sizeof(asn_DEF_enum_4_tags[0]), /* 2 */ |
| 588 | 0, 0, /* Defined elsewhere */ |
| 589 | &asn_SPC_enum_4_specs /* Additional specs */ |
| 590 | }; |
| 591 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 592 | static asn_TYPE_member_t asn_MBR_ExtensibleSet_1[] = { |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 593 | { ATF_POINTER, 2, offsetof(struct ExtensibleSet, string), |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 594 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 595 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 596 | .type = &asn_DEF_UTF8String, |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 597 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 598 | .name = "string" |
| 599 | }, |
vlm | 6c4a850 | 2005-08-18 13:38:19 +0000 | [diff] [blame] | 600 | { ATF_POINTER, 1, offsetof(struct ExtensibleSet, Enum), |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 601 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 602 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 603 | .type = &asn_DEF_enum_4, |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 604 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 605 | .name = "enum" |
| 606 | }, |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 607 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 608 | static ber_tlv_tag_t asn_DEF_ExtensibleSet_1_tags[] = { |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 609 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 610 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 611 | static asn_TYPE_tag2member_t asn_MAP_ExtensibleSet_1_tag2el[] = { |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 612 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* string at 50 */ |
| 613 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* enum at 52 */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 614 | }; |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 615 | static uint8_t asn_MAP_ExtensibleSet_1_mmap[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = { |
| 616 | (0 << 7) | (0 << 6) |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 617 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 618 | static asn_SET_specifics_t asn_SPC_ExtensibleSet_1_specs = { |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 619 | sizeof(struct ExtensibleSet), |
| 620 | offsetof(struct ExtensibleSet, _asn_ctx), |
| 621 | offsetof(struct ExtensibleSet, _presence_map), |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 622 | asn_MAP_ExtensibleSet_1_tag2el, |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 623 | 2, /* Count of tags in the map */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 624 | asn_MAP_ExtensibleSet_1_tag2el, /* Same as above */ |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 625 | 2, /* Count of tags in the CXER map */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 626 | 1, /* Whether extensible */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 627 | (unsigned int *)asn_MAP_ExtensibleSet_1_mmap /* Mandatory elements map */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 628 | }; |
| 629 | asn_TYPE_descriptor_t asn_DEF_ExtensibleSet = { |
| 630 | "ExtensibleSet", |
| 631 | "ExtensibleSet", |
| 632 | SET_free, |
| 633 | SET_print, |
| 634 | SET_constraint, |
| 635 | SET_decode_ber, |
| 636 | SET_encode_der, |
| 637 | SET_decode_xer, |
| 638 | SET_encode_xer, |
| 639 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 640 | asn_DEF_ExtensibleSet_1_tags, |
| 641 | sizeof(asn_DEF_ExtensibleSet_1_tags) |
| 642 | /sizeof(asn_DEF_ExtensibleSet_1_tags[0]), /* 1 */ |
| 643 | asn_DEF_ExtensibleSet_1_tags, /* Same as above */ |
| 644 | sizeof(asn_DEF_ExtensibleSet_1_tags) |
| 645 | /sizeof(asn_DEF_ExtensibleSet_1_tags[0]), /* 1 */ |
| 646 | asn_MBR_ExtensibleSet_1, |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 647 | 2, /* Elements count */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 648 | &asn_SPC_ExtensibleSet_1_specs /* Additional specs */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 649 | }; |
| 650 | |
| 651 | |
| 652 | /*** <<< INCLUDES [ExtensibleSequence] >>> ***/ |
| 653 | |
| 654 | #include <UTF8String.h> |
| 655 | #include <INTEGER.h> |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 656 | #include <GeneralizedTime.h> |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 657 | #include <constr_SEQUENCE.h> |
| 658 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 659 | /*** <<< TYPE-DECLS [ExtensibleSequence] >>> ***/ |
| 660 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 661 | typedef struct ExtensibleSequence { |
| 662 | UTF8String_t *string /* OPTIONAL */; |
| 663 | /* |
| 664 | * This type is extensible, |
| 665 | * possible extensions are below. |
| 666 | */ |
| 667 | INTEGER_t *integer /* OPTIONAL */; |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 668 | GeneralizedTime_t *gtime; |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 669 | |
| 670 | /* Context for parsing across buffer boundaries */ |
| 671 | asn_struct_ctx_t _asn_ctx; |
| 672 | } ExtensibleSequence_t; |
| 673 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 674 | /*** <<< FUNC-DECLS [ExtensibleSequence] >>> ***/ |
| 675 | |
| 676 | extern asn_TYPE_descriptor_t asn_DEF_ExtensibleSequence; |
| 677 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 678 | /*** <<< STAT-DEFS [ExtensibleSequence] >>> ***/ |
| 679 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 680 | static asn_TYPE_member_t asn_MBR_ExtensibleSequence_1[] = { |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 681 | { ATF_POINTER, 3, offsetof(struct ExtensibleSequence, string), |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 682 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 683 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 684 | .type = &asn_DEF_UTF8String, |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 685 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 686 | .name = "string" |
| 687 | }, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 688 | { ATF_POINTER, 2, offsetof(struct ExtensibleSequence, integer), |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 689 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 690 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 691 | .type = &asn_DEF_INTEGER, |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 692 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 693 | .name = "integer" |
| 694 | }, |
vlm | 6c4a850 | 2005-08-18 13:38:19 +0000 | [diff] [blame] | 695 | { ATF_POINTER, 1, offsetof(struct ExtensibleSequence, gtime), |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 696 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 697 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 698 | .type = &asn_DEF_GeneralizedTime, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 699 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 700 | .name = "gtime" |
| 701 | }, |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 702 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 703 | static ber_tlv_tag_t asn_DEF_ExtensibleSequence_1_tags[] = { |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 704 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 705 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 706 | static asn_TYPE_tag2member_t asn_MAP_ExtensibleSequence_1_tag2el[] = { |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 707 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* string at 56 */ |
| 708 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* integer at 58 */ |
| 709 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* gtime at 59 */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 710 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 711 | static asn_SEQUENCE_specifics_t asn_SPC_ExtensibleSequence_1_specs = { |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 712 | sizeof(struct ExtensibleSequence), |
| 713 | offsetof(struct ExtensibleSequence, _asn_ctx), |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 714 | asn_MAP_ExtensibleSequence_1_tag2el, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 715 | 3, /* Count of tags in the map */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 716 | 0, /* Start extensions */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 717 | 4 /* Stop extensions */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 718 | }; |
| 719 | asn_TYPE_descriptor_t asn_DEF_ExtensibleSequence = { |
| 720 | "ExtensibleSequence", |
| 721 | "ExtensibleSequence", |
| 722 | SEQUENCE_free, |
| 723 | SEQUENCE_print, |
| 724 | SEQUENCE_constraint, |
| 725 | SEQUENCE_decode_ber, |
| 726 | SEQUENCE_encode_der, |
| 727 | SEQUENCE_decode_xer, |
| 728 | SEQUENCE_encode_xer, |
| 729 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 730 | asn_DEF_ExtensibleSequence_1_tags, |
| 731 | sizeof(asn_DEF_ExtensibleSequence_1_tags) |
| 732 | /sizeof(asn_DEF_ExtensibleSequence_1_tags[0]), /* 1 */ |
| 733 | asn_DEF_ExtensibleSequence_1_tags, /* Same as above */ |
| 734 | sizeof(asn_DEF_ExtensibleSequence_1_tags) |
| 735 | /sizeof(asn_DEF_ExtensibleSequence_1_tags[0]), /* 1 */ |
| 736 | asn_MBR_ExtensibleSequence_1, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 737 | 3, /* Elements count */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 738 | &asn_SPC_ExtensibleSequence_1_specs /* Additional specs */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 739 | }; |
| 740 | |
| 741 | |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 742 | /*** <<< INCLUDES [ExtensibleSequence2] >>> ***/ |
| 743 | |
| 744 | #include <UTF8String.h> |
| 745 | #include <INTEGER.h> |
| 746 | #include <constr_SEQUENCE.h> |
| 747 | |
| 748 | /*** <<< TYPE-DECLS [ExtensibleSequence2] >>> ***/ |
| 749 | |
| 750 | typedef struct ExtensibleSequence2 { |
| 751 | UTF8String_t *string /* OPTIONAL */; |
| 752 | /* |
| 753 | * This type is extensible, |
| 754 | * possible extensions are below. |
| 755 | */ |
| 756 | INTEGER_t *integer /* OPTIONAL */; |
| 757 | |
| 758 | /* Context for parsing across buffer boundaries */ |
| 759 | asn_struct_ctx_t _asn_ctx; |
| 760 | } ExtensibleSequence2_t; |
| 761 | |
| 762 | /*** <<< FUNC-DECLS [ExtensibleSequence2] >>> ***/ |
| 763 | |
| 764 | extern asn_TYPE_descriptor_t asn_DEF_ExtensibleSequence2; |
| 765 | |
| 766 | /*** <<< STAT-DEFS [ExtensibleSequence2] >>> ***/ |
| 767 | |
| 768 | static asn_TYPE_member_t asn_MBR_ExtensibleSequence2_1[] = { |
| 769 | { ATF_POINTER, 2, offsetof(struct ExtensibleSequence2, string), |
| 770 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 771 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 772 | .type = &asn_DEF_UTF8String, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 773 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 774 | .name = "string" |
| 775 | }, |
| 776 | { ATF_POINTER, 1, offsetof(struct ExtensibleSequence2, integer), |
| 777 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 778 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 779 | .type = &asn_DEF_INTEGER, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 780 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 781 | .name = "integer" |
| 782 | }, |
| 783 | }; |
| 784 | static ber_tlv_tag_t asn_DEF_ExtensibleSequence2_1_tags[] = { |
| 785 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 786 | }; |
| 787 | static asn_TYPE_tag2member_t asn_MAP_ExtensibleSequence2_1_tag2el[] = { |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 788 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* string at 63 */ |
| 789 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* integer at 65 */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 790 | }; |
| 791 | static asn_SEQUENCE_specifics_t asn_SPC_ExtensibleSequence2_1_specs = { |
| 792 | sizeof(struct ExtensibleSequence2), |
| 793 | offsetof(struct ExtensibleSequence2, _asn_ctx), |
| 794 | asn_MAP_ExtensibleSequence2_1_tag2el, |
| 795 | 2, /* Count of tags in the map */ |
| 796 | 0, /* Start extensions */ |
| 797 | 3 /* Stop extensions */ |
| 798 | }; |
| 799 | asn_TYPE_descriptor_t asn_DEF_ExtensibleSequence2 = { |
| 800 | "ExtensibleSequence2", |
| 801 | "ExtensibleSequence2", |
| 802 | SEQUENCE_free, |
| 803 | SEQUENCE_print, |
| 804 | SEQUENCE_constraint, |
| 805 | SEQUENCE_decode_ber, |
| 806 | SEQUENCE_encode_der, |
| 807 | SEQUENCE_decode_xer, |
| 808 | SEQUENCE_encode_xer, |
| 809 | 0, /* Use generic outmost tag fetcher */ |
| 810 | asn_DEF_ExtensibleSequence2_1_tags, |
| 811 | sizeof(asn_DEF_ExtensibleSequence2_1_tags) |
| 812 | /sizeof(asn_DEF_ExtensibleSequence2_1_tags[0]), /* 1 */ |
| 813 | asn_DEF_ExtensibleSequence2_1_tags, /* Same as above */ |
| 814 | sizeof(asn_DEF_ExtensibleSequence2_1_tags) |
| 815 | /sizeof(asn_DEF_ExtensibleSequence2_1_tags[0]), /* 1 */ |
| 816 | asn_MBR_ExtensibleSequence2_1, |
| 817 | 2, /* Elements count */ |
| 818 | &asn_SPC_ExtensibleSequence2_1_specs /* Additional specs */ |
| 819 | }; |
| 820 | |
| 821 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 822 | /*** <<< INCLUDES [SetOfNULL] >>> ***/ |
| 823 | |
| 824 | #include <NULL.h> |
| 825 | #include <asn_SET_OF.h> |
| 826 | #include <constr_SET_OF.h> |
| 827 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 828 | /*** <<< TYPE-DECLS [SetOfNULL] >>> ***/ |
| 829 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 830 | typedef struct SetOfNULL { |
| 831 | A_SET_OF(NULL_t) list; |
| 832 | |
| 833 | /* Context for parsing across buffer boundaries */ |
| 834 | asn_struct_ctx_t _asn_ctx; |
| 835 | } SetOfNULL_t; |
| 836 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 837 | /*** <<< FUNC-DECLS [SetOfNULL] >>> ***/ |
| 838 | |
| 839 | extern asn_TYPE_descriptor_t asn_DEF_SetOfNULL; |
| 840 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 841 | /*** <<< STAT-DEFS [SetOfNULL] >>> ***/ |
| 842 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 843 | static asn_TYPE_member_t asn_MBR_SetOfNULL_1[] = { |
vlm | 2cebdf3 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 844 | { ATF_POINTER, 0, 0, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 845 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), |
| 846 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 847 | .type = &asn_DEF_NULL, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 848 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 849 | .name = "" |
| 850 | }, |
| 851 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 852 | static ber_tlv_tag_t asn_DEF_SetOfNULL_1_tags[] = { |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 853 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 854 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 855 | static asn_SET_OF_specifics_t asn_SPC_SetOfNULL_1_specs = { |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 856 | sizeof(struct SetOfNULL), |
| 857 | offsetof(struct SetOfNULL, _asn_ctx), |
| 858 | 1, /* XER encoding is XMLValueList */ |
| 859 | }; |
| 860 | asn_TYPE_descriptor_t asn_DEF_SetOfNULL = { |
| 861 | "SetOfNULL", |
| 862 | "SetOfNULL", |
| 863 | SET_OF_free, |
| 864 | SET_OF_print, |
| 865 | SET_OF_constraint, |
| 866 | SET_OF_decode_ber, |
| 867 | SET_OF_encode_der, |
| 868 | SET_OF_decode_xer, |
| 869 | SET_OF_encode_xer, |
| 870 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 871 | asn_DEF_SetOfNULL_1_tags, |
| 872 | sizeof(asn_DEF_SetOfNULL_1_tags) |
| 873 | /sizeof(asn_DEF_SetOfNULL_1_tags[0]), /* 1 */ |
| 874 | asn_DEF_SetOfNULL_1_tags, /* Same as above */ |
| 875 | sizeof(asn_DEF_SetOfNULL_1_tags) |
| 876 | /sizeof(asn_DEF_SetOfNULL_1_tags[0]), /* 1 */ |
| 877 | asn_MBR_SetOfNULL_1, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 878 | 1, /* Single element */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 879 | &asn_SPC_SetOfNULL_1_specs /* Additional specs */ |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 880 | }; |
| 881 | |
| 882 | |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 883 | /*** <<< INCLUDES [SetOfREAL] >>> ***/ |
| 884 | |
| 885 | #include <REAL.h> |
| 886 | #include <asn_SET_OF.h> |
| 887 | #include <constr_SET_OF.h> |
| 888 | |
| 889 | /*** <<< TYPE-DECLS [SetOfREAL] >>> ***/ |
| 890 | |
| 891 | typedef struct SetOfREAL { |
| 892 | A_SET_OF(REAL_t) list; |
| 893 | |
| 894 | /* Context for parsing across buffer boundaries */ |
| 895 | asn_struct_ctx_t _asn_ctx; |
| 896 | } SetOfREAL_t; |
| 897 | |
| 898 | /*** <<< FUNC-DECLS [SetOfREAL] >>> ***/ |
| 899 | |
| 900 | extern asn_TYPE_descriptor_t asn_DEF_SetOfREAL; |
| 901 | |
| 902 | /*** <<< STAT-DEFS [SetOfREAL] >>> ***/ |
| 903 | |
| 904 | static asn_TYPE_member_t asn_MBR_SetOfREAL_1[] = { |
| 905 | { ATF_POINTER, 0, 0, |
| 906 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), |
| 907 | .tag_mode = 0, |
| 908 | .type = &asn_DEF_REAL, |
| 909 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 910 | .name = "" |
| 911 | }, |
| 912 | }; |
| 913 | static ber_tlv_tag_t asn_DEF_SetOfREAL_1_tags[] = { |
| 914 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 915 | }; |
| 916 | static asn_SET_OF_specifics_t asn_SPC_SetOfREAL_1_specs = { |
| 917 | sizeof(struct SetOfREAL), |
| 918 | offsetof(struct SetOfREAL, _asn_ctx), |
| 919 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 920 | }; |
| 921 | asn_TYPE_descriptor_t asn_DEF_SetOfREAL = { |
| 922 | "SetOfREAL", |
| 923 | "SetOfREAL", |
| 924 | SET_OF_free, |
| 925 | SET_OF_print, |
| 926 | SET_OF_constraint, |
| 927 | SET_OF_decode_ber, |
| 928 | SET_OF_encode_der, |
| 929 | SET_OF_decode_xer, |
| 930 | SET_OF_encode_xer, |
| 931 | 0, /* Use generic outmost tag fetcher */ |
| 932 | asn_DEF_SetOfREAL_1_tags, |
| 933 | sizeof(asn_DEF_SetOfREAL_1_tags) |
| 934 | /sizeof(asn_DEF_SetOfREAL_1_tags[0]), /* 1 */ |
| 935 | asn_DEF_SetOfREAL_1_tags, /* Same as above */ |
| 936 | sizeof(asn_DEF_SetOfREAL_1_tags) |
| 937 | /sizeof(asn_DEF_SetOfREAL_1_tags[0]), /* 1 */ |
| 938 | asn_MBR_SetOfREAL_1, |
| 939 | 1, /* Single element */ |
| 940 | &asn_SPC_SetOfREAL_1_specs /* Additional specs */ |
| 941 | }; |
| 942 | |
| 943 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 944 | /*** <<< INCLUDES [SetOfEnums] >>> ***/ |
| 945 | |
| 946 | #include <ENUMERATED.h> |
| 947 | #include <asn_SET_OF.h> |
| 948 | #include <constr_SET_OF.h> |
| 949 | |
| 950 | /*** <<< DEPS [SetOfEnums] >>> ***/ |
| 951 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 952 | typedef enum Member { |
| 953 | Member_one = 0, |
| 954 | Member_oneMore = 1 |
| 955 | } Member_e; |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 956 | |
| 957 | /*** <<< TYPE-DECLS [SetOfEnums] >>> ***/ |
| 958 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 959 | typedef struct SetOfEnums { |
| 960 | A_SET_OF(ENUMERATED_t) list; |
| 961 | |
| 962 | /* Context for parsing across buffer boundaries */ |
| 963 | asn_struct_ctx_t _asn_ctx; |
| 964 | } SetOfEnums_t; |
| 965 | |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 966 | /*** <<< FUNC-DECLS [SetOfEnums] >>> ***/ |
| 967 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 968 | /* extern asn_TYPE_descriptor_t asn_DEF_Member_2; // (Use -fall-defs-global to expose) */ |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 969 | extern asn_TYPE_descriptor_t asn_DEF_SetOfEnums; |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 970 | |
| 971 | /*** <<< CODE [SetOfEnums] >>> ***/ |
| 972 | |
| 973 | static int |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 974 | Member_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 975 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 976 | /* Replace with underlying type checker */ |
| 977 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
| 978 | return td->check_constraints(td, sptr, app_errlog, app_key); |
| 979 | } |
| 980 | |
| 981 | /* |
| 982 | * This type is implemented using ENUMERATED, |
| 983 | * so here we adjust the DEF accordingly. |
| 984 | */ |
| 985 | static void |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 986 | Member_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 987 | td->free_struct = asn_DEF_ENUMERATED.free_struct; |
| 988 | td->print_struct = asn_DEF_ENUMERATED.print_struct; |
| 989 | td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder; |
| 990 | td->der_encoder = asn_DEF_ENUMERATED.der_encoder; |
| 991 | td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder; |
| 992 | td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder; |
| 993 | td->elements = asn_DEF_ENUMERATED.elements; |
| 994 | td->elements_count = asn_DEF_ENUMERATED.elements_count; |
vlm | 541def9 | 2005-03-29 19:05:37 +0000 | [diff] [blame] | 995 | /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */ |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 996 | } |
| 997 | |
| 998 | static void |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 999 | Member_2_free(asn_TYPE_descriptor_t *td, |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1000 | void *struct_ptr, int contents_only) { |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1001 | Member_2_inherit_TYPE_descriptor(td); |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1002 | td->free_struct(td, struct_ptr, contents_only); |
| 1003 | } |
| 1004 | |
| 1005 | static int |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1006 | Member_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1007 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1008 | Member_2_inherit_TYPE_descriptor(td); |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1009 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1010 | } |
| 1011 | |
| 1012 | static asn_dec_rval_t |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1013 | Member_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
vlm | c04faea | 2005-03-17 21:57:19 +0000 | [diff] [blame] | 1014 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1015 | Member_2_inherit_TYPE_descriptor(td); |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1016 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1017 | } |
| 1018 | |
| 1019 | static asn_enc_rval_t |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1020 | Member_2_encode_der(asn_TYPE_descriptor_t *td, |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1021 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1022 | asn_app_consume_bytes_f *cb, void *app_key) { |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1023 | Member_2_inherit_TYPE_descriptor(td); |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1024 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1025 | } |
| 1026 | |
| 1027 | static asn_dec_rval_t |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1028 | Member_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
vlm | c04faea | 2005-03-17 21:57:19 +0000 | [diff] [blame] | 1029 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1030 | Member_2_inherit_TYPE_descriptor(td); |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1031 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1032 | } |
| 1033 | |
| 1034 | static asn_enc_rval_t |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1035 | Member_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1036 | int ilevel, enum xer_encoder_flags_e flags, |
| 1037 | asn_app_consume_bytes_f *cb, void *app_key) { |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1038 | Member_2_inherit_TYPE_descriptor(td); |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1039 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1040 | } |
| 1041 | |
| 1042 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1043 | /*** <<< STAT-DEFS [SetOfEnums] >>> ***/ |
| 1044 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1045 | static asn_INTEGER_enum_map_t asn_MAP_Member_2_value2enum[] = { |
vlm | 56a1f3e | 2005-02-25 11:08:02 +0000 | [diff] [blame] | 1046 | { 0, 3, "one" }, |
| 1047 | { 1, 7, "oneMore" } |
| 1048 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1049 | static unsigned int asn_MAP_Member_2_enum2value[] = { |
vlm | 56a1f3e | 2005-02-25 11:08:02 +0000 | [diff] [blame] | 1050 | 0, /* one(0) */ |
| 1051 | 1 /* oneMore(1) */ |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1052 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1053 | static asn_INTEGER_specifics_t asn_SPC_Member_2_specs = { |
| 1054 | asn_MAP_Member_2_value2enum, /* "tag" => N; sorted by tag */ |
| 1055 | asn_MAP_Member_2_enum2value, /* N => "tag"; sorted by N */ |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1056 | 2, /* Number of elements in the maps */ |
vlm | c018f36 | 2005-02-25 11:47:59 +0000 | [diff] [blame] | 1057 | 0, /* Enumeration is not extensible */ |
| 1058 | 1 /* Strict enumeration */ |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1059 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1060 | static ber_tlv_tag_t asn_DEF_Member_2_tags[] = { |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1061 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 1062 | }; |
| 1063 | static /* Use -fall-defs-global to expose */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1064 | asn_TYPE_descriptor_t asn_DEF_Member_2 = { |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1065 | "", |
| 1066 | "", |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1067 | Member_2_free, |
| 1068 | Member_2_print, |
| 1069 | Member_2_constraint, |
| 1070 | Member_2_decode_ber, |
| 1071 | Member_2_encode_der, |
| 1072 | Member_2_decode_xer, |
| 1073 | Member_2_encode_xer, |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1074 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1075 | asn_DEF_Member_2_tags, |
| 1076 | sizeof(asn_DEF_Member_2_tags) |
| 1077 | /sizeof(asn_DEF_Member_2_tags[0]), /* 1 */ |
| 1078 | asn_DEF_Member_2_tags, /* Same as above */ |
| 1079 | sizeof(asn_DEF_Member_2_tags) |
| 1080 | /sizeof(asn_DEF_Member_2_tags[0]), /* 1 */ |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1081 | 0, 0, /* Defined elsewhere */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1082 | &asn_SPC_Member_2_specs /* Additional specs */ |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1083 | }; |
| 1084 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1085 | static asn_TYPE_member_t asn_MBR_SetOfEnums_1[] = { |
vlm | 2cebdf3 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 1086 | { ATF_POINTER, 0, 0, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1087 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), |
| 1088 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 1089 | .type = &asn_DEF_Member_2, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1090 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1091 | .name = "" |
| 1092 | }, |
| 1093 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1094 | static ber_tlv_tag_t asn_DEF_SetOfEnums_1_tags[] = { |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1095 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 1096 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1097 | static asn_SET_OF_specifics_t asn_SPC_SetOfEnums_1_specs = { |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1098 | sizeof(struct SetOfEnums), |
| 1099 | offsetof(struct SetOfEnums, _asn_ctx), |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1100 | 1, /* XER encoding is XMLValueList */ |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1101 | }; |
| 1102 | asn_TYPE_descriptor_t asn_DEF_SetOfEnums = { |
| 1103 | "SetOfEnums", |
| 1104 | "SetOfEnums", |
| 1105 | SET_OF_free, |
| 1106 | SET_OF_print, |
| 1107 | SET_OF_constraint, |
| 1108 | SET_OF_decode_ber, |
| 1109 | SET_OF_encode_der, |
| 1110 | SET_OF_decode_xer, |
| 1111 | SET_OF_encode_xer, |
| 1112 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1113 | asn_DEF_SetOfEnums_1_tags, |
| 1114 | sizeof(asn_DEF_SetOfEnums_1_tags) |
| 1115 | /sizeof(asn_DEF_SetOfEnums_1_tags[0]), /* 1 */ |
| 1116 | asn_DEF_SetOfEnums_1_tags, /* Same as above */ |
| 1117 | sizeof(asn_DEF_SetOfEnums_1_tags) |
| 1118 | /sizeof(asn_DEF_SetOfEnums_1_tags[0]), /* 1 */ |
| 1119 | asn_MBR_SetOfEnums_1, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1120 | 1, /* Single element */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1121 | &asn_SPC_SetOfEnums_1_specs /* Additional specs */ |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1122 | }; |
| 1123 | |
| 1124 | |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 1125 | /*** <<< INCLUDES [NamedSetOfNULL] >>> ***/ |
| 1126 | |
| 1127 | #include <NULL.h> |
| 1128 | #include <asn_SET_OF.h> |
| 1129 | #include <constr_SET_OF.h> |
| 1130 | |
| 1131 | /*** <<< TYPE-DECLS [NamedSetOfNULL] >>> ***/ |
| 1132 | |
| 1133 | typedef struct NamedSetOfNULL { |
| 1134 | A_SET_OF(NULL_t) list; |
| 1135 | |
| 1136 | /* Context for parsing across buffer boundaries */ |
| 1137 | asn_struct_ctx_t _asn_ctx; |
| 1138 | } NamedSetOfNULL_t; |
| 1139 | |
| 1140 | /*** <<< FUNC-DECLS [NamedSetOfNULL] >>> ***/ |
| 1141 | |
| 1142 | extern asn_TYPE_descriptor_t asn_DEF_NamedSetOfNULL; |
| 1143 | |
| 1144 | /*** <<< STAT-DEFS [NamedSetOfNULL] >>> ***/ |
| 1145 | |
| 1146 | static asn_TYPE_member_t asn_MBR_NamedSetOfNULL_1[] = { |
| 1147 | { ATF_POINTER, 0, 0, |
| 1148 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), |
| 1149 | .tag_mode = 0, |
| 1150 | .type = &asn_DEF_NULL, |
| 1151 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1152 | .name = "y" |
| 1153 | }, |
| 1154 | }; |
| 1155 | static ber_tlv_tag_t asn_DEF_NamedSetOfNULL_1_tags[] = { |
| 1156 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 1157 | }; |
| 1158 | static asn_SET_OF_specifics_t asn_SPC_NamedSetOfNULL_1_specs = { |
| 1159 | sizeof(struct NamedSetOfNULL), |
| 1160 | offsetof(struct NamedSetOfNULL, _asn_ctx), |
| 1161 | 1, /* XER encoding is XMLValueList */ |
| 1162 | }; |
| 1163 | asn_TYPE_descriptor_t asn_DEF_NamedSetOfNULL = { |
| 1164 | "NamedSetOfNULL", |
| 1165 | "NamedSetOfNULL", |
| 1166 | SET_OF_free, |
| 1167 | SET_OF_print, |
| 1168 | SET_OF_constraint, |
| 1169 | SET_OF_decode_ber, |
| 1170 | SET_OF_encode_der, |
| 1171 | SET_OF_decode_xer, |
| 1172 | SET_OF_encode_xer, |
| 1173 | 0, /* Use generic outmost tag fetcher */ |
| 1174 | asn_DEF_NamedSetOfNULL_1_tags, |
| 1175 | sizeof(asn_DEF_NamedSetOfNULL_1_tags) |
| 1176 | /sizeof(asn_DEF_NamedSetOfNULL_1_tags[0]), /* 1 */ |
| 1177 | asn_DEF_NamedSetOfNULL_1_tags, /* Same as above */ |
| 1178 | sizeof(asn_DEF_NamedSetOfNULL_1_tags) |
| 1179 | /sizeof(asn_DEF_NamedSetOfNULL_1_tags[0]), /* 1 */ |
| 1180 | asn_MBR_NamedSetOfNULL_1, |
| 1181 | 1, /* Single element */ |
| 1182 | &asn_SPC_NamedSetOfNULL_1_specs /* Additional specs */ |
| 1183 | }; |
| 1184 | |
| 1185 | |
| 1186 | /*** <<< INCLUDES [NamedSetOfREAL] >>> ***/ |
| 1187 | |
| 1188 | #include <REAL.h> |
| 1189 | #include <asn_SET_OF.h> |
| 1190 | #include <constr_SET_OF.h> |
| 1191 | |
| 1192 | /*** <<< TYPE-DECLS [NamedSetOfREAL] >>> ***/ |
| 1193 | |
| 1194 | typedef struct NamedSetOfREAL { |
| 1195 | A_SET_OF(REAL_t) list; |
| 1196 | |
| 1197 | /* Context for parsing across buffer boundaries */ |
| 1198 | asn_struct_ctx_t _asn_ctx; |
| 1199 | } NamedSetOfREAL_t; |
| 1200 | |
| 1201 | /*** <<< FUNC-DECLS [NamedSetOfREAL] >>> ***/ |
| 1202 | |
| 1203 | extern asn_TYPE_descriptor_t asn_DEF_NamedSetOfREAL; |
| 1204 | |
| 1205 | /*** <<< STAT-DEFS [NamedSetOfREAL] >>> ***/ |
| 1206 | |
| 1207 | static asn_TYPE_member_t asn_MBR_NamedSetOfREAL_1[] = { |
| 1208 | { ATF_POINTER, 0, 0, |
| 1209 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), |
| 1210 | .tag_mode = 0, |
| 1211 | .type = &asn_DEF_REAL, |
| 1212 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1213 | .name = "name" |
| 1214 | }, |
| 1215 | }; |
| 1216 | static ber_tlv_tag_t asn_DEF_NamedSetOfREAL_1_tags[] = { |
| 1217 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 1218 | }; |
| 1219 | static asn_SET_OF_specifics_t asn_SPC_NamedSetOfREAL_1_specs = { |
| 1220 | sizeof(struct NamedSetOfREAL), |
| 1221 | offsetof(struct NamedSetOfREAL, _asn_ctx), |
| 1222 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 1223 | }; |
| 1224 | asn_TYPE_descriptor_t asn_DEF_NamedSetOfREAL = { |
| 1225 | "NamedSetOfREAL", |
| 1226 | "NamedSetOfREAL", |
| 1227 | SET_OF_free, |
| 1228 | SET_OF_print, |
| 1229 | SET_OF_constraint, |
| 1230 | SET_OF_decode_ber, |
| 1231 | SET_OF_encode_der, |
| 1232 | SET_OF_decode_xer, |
| 1233 | SET_OF_encode_xer, |
| 1234 | 0, /* Use generic outmost tag fetcher */ |
| 1235 | asn_DEF_NamedSetOfREAL_1_tags, |
| 1236 | sizeof(asn_DEF_NamedSetOfREAL_1_tags) |
| 1237 | /sizeof(asn_DEF_NamedSetOfREAL_1_tags[0]), /* 1 */ |
| 1238 | asn_DEF_NamedSetOfREAL_1_tags, /* Same as above */ |
| 1239 | sizeof(asn_DEF_NamedSetOfREAL_1_tags) |
| 1240 | /sizeof(asn_DEF_NamedSetOfREAL_1_tags[0]), /* 1 */ |
| 1241 | asn_MBR_NamedSetOfREAL_1, |
| 1242 | 1, /* Single element */ |
| 1243 | &asn_SPC_NamedSetOfREAL_1_specs /* Additional specs */ |
| 1244 | }; |
| 1245 | |
| 1246 | |
| 1247 | /*** <<< INCLUDES [NamedSetOfEnums] >>> ***/ |
| 1248 | |
| 1249 | #include <ENUMERATED.h> |
| 1250 | #include <asn_SET_OF.h> |
| 1251 | #include <constr_SET_OF.h> |
| 1252 | |
| 1253 | /*** <<< DEPS [NamedSetOfEnums] >>> ***/ |
| 1254 | |
| 1255 | typedef enum name { |
| 1256 | name_one = 0, |
| 1257 | name_oneMore = 1 |
| 1258 | } name_e; |
| 1259 | |
| 1260 | /*** <<< TYPE-DECLS [NamedSetOfEnums] >>> ***/ |
| 1261 | |
| 1262 | typedef struct NamedSetOfEnums { |
| 1263 | A_SET_OF(ENUMERATED_t) list; |
| 1264 | |
| 1265 | /* Context for parsing across buffer boundaries */ |
| 1266 | asn_struct_ctx_t _asn_ctx; |
| 1267 | } NamedSetOfEnums_t; |
| 1268 | |
| 1269 | /*** <<< FUNC-DECLS [NamedSetOfEnums] >>> ***/ |
| 1270 | |
| 1271 | /* extern asn_TYPE_descriptor_t asn_DEF_name_2; // (Use -fall-defs-global to expose) */ |
| 1272 | extern asn_TYPE_descriptor_t asn_DEF_NamedSetOfEnums; |
| 1273 | |
| 1274 | /*** <<< CODE [NamedSetOfEnums] >>> ***/ |
| 1275 | |
| 1276 | static int |
| 1277 | name_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1278 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 1279 | /* Replace with underlying type checker */ |
| 1280 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
| 1281 | return td->check_constraints(td, sptr, app_errlog, app_key); |
| 1282 | } |
| 1283 | |
| 1284 | /* |
| 1285 | * This type is implemented using ENUMERATED, |
| 1286 | * so here we adjust the DEF accordingly. |
| 1287 | */ |
| 1288 | static void |
| 1289 | name_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 1290 | td->free_struct = asn_DEF_ENUMERATED.free_struct; |
| 1291 | td->print_struct = asn_DEF_ENUMERATED.print_struct; |
| 1292 | td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder; |
| 1293 | td->der_encoder = asn_DEF_ENUMERATED.der_encoder; |
| 1294 | td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder; |
| 1295 | td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder; |
| 1296 | td->elements = asn_DEF_ENUMERATED.elements; |
| 1297 | td->elements_count = asn_DEF_ENUMERATED.elements_count; |
| 1298 | /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */ |
| 1299 | } |
| 1300 | |
| 1301 | static void |
| 1302 | name_2_free(asn_TYPE_descriptor_t *td, |
| 1303 | void *struct_ptr, int contents_only) { |
| 1304 | name_2_inherit_TYPE_descriptor(td); |
| 1305 | td->free_struct(td, struct_ptr, contents_only); |
| 1306 | } |
| 1307 | |
| 1308 | static int |
| 1309 | name_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1310 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1311 | name_2_inherit_TYPE_descriptor(td); |
| 1312 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1313 | } |
| 1314 | |
| 1315 | static asn_dec_rval_t |
| 1316 | name_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1317 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1318 | name_2_inherit_TYPE_descriptor(td); |
| 1319 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1320 | } |
| 1321 | |
| 1322 | static asn_enc_rval_t |
| 1323 | name_2_encode_der(asn_TYPE_descriptor_t *td, |
| 1324 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1325 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1326 | name_2_inherit_TYPE_descriptor(td); |
| 1327 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1328 | } |
| 1329 | |
| 1330 | static asn_dec_rval_t |
| 1331 | name_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1332 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1333 | name_2_inherit_TYPE_descriptor(td); |
| 1334 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1335 | } |
| 1336 | |
| 1337 | static asn_enc_rval_t |
| 1338 | name_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1339 | int ilevel, enum xer_encoder_flags_e flags, |
| 1340 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1341 | name_2_inherit_TYPE_descriptor(td); |
| 1342 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1343 | } |
| 1344 | |
| 1345 | |
| 1346 | /*** <<< STAT-DEFS [NamedSetOfEnums] >>> ***/ |
| 1347 | |
| 1348 | static asn_INTEGER_enum_map_t asn_MAP_name_2_value2enum[] = { |
| 1349 | { 0, 3, "one" }, |
| 1350 | { 1, 7, "oneMore" } |
| 1351 | }; |
| 1352 | static unsigned int asn_MAP_name_2_enum2value[] = { |
| 1353 | 0, /* one(0) */ |
| 1354 | 1 /* oneMore(1) */ |
| 1355 | }; |
| 1356 | static asn_INTEGER_specifics_t asn_SPC_name_2_specs = { |
| 1357 | asn_MAP_name_2_value2enum, /* "tag" => N; sorted by tag */ |
| 1358 | asn_MAP_name_2_enum2value, /* N => "tag"; sorted by N */ |
| 1359 | 2, /* Number of elements in the maps */ |
| 1360 | 0, /* Enumeration is not extensible */ |
| 1361 | 1 /* Strict enumeration */ |
| 1362 | }; |
| 1363 | static ber_tlv_tag_t asn_DEF_name_2_tags[] = { |
| 1364 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 1365 | }; |
| 1366 | static /* Use -fall-defs-global to expose */ |
| 1367 | asn_TYPE_descriptor_t asn_DEF_name_2 = { |
| 1368 | "", |
| 1369 | "", |
| 1370 | name_2_free, |
| 1371 | name_2_print, |
| 1372 | name_2_constraint, |
| 1373 | name_2_decode_ber, |
| 1374 | name_2_encode_der, |
| 1375 | name_2_decode_xer, |
| 1376 | name_2_encode_xer, |
| 1377 | 0, /* Use generic outmost tag fetcher */ |
| 1378 | asn_DEF_name_2_tags, |
| 1379 | sizeof(asn_DEF_name_2_tags) |
| 1380 | /sizeof(asn_DEF_name_2_tags[0]), /* 1 */ |
| 1381 | asn_DEF_name_2_tags, /* Same as above */ |
| 1382 | sizeof(asn_DEF_name_2_tags) |
| 1383 | /sizeof(asn_DEF_name_2_tags[0]), /* 1 */ |
| 1384 | 0, 0, /* Defined elsewhere */ |
| 1385 | &asn_SPC_name_2_specs /* Additional specs */ |
| 1386 | }; |
| 1387 | |
| 1388 | static asn_TYPE_member_t asn_MBR_NamedSetOfEnums_1[] = { |
| 1389 | { ATF_POINTER, 0, 0, |
| 1390 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), |
| 1391 | .tag_mode = 0, |
| 1392 | .type = &asn_DEF_name_2, |
| 1393 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1394 | .name = "name" |
| 1395 | }, |
| 1396 | }; |
| 1397 | static ber_tlv_tag_t asn_DEF_NamedSetOfEnums_1_tags[] = { |
| 1398 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 1399 | }; |
| 1400 | static asn_SET_OF_specifics_t asn_SPC_NamedSetOfEnums_1_specs = { |
| 1401 | sizeof(struct NamedSetOfEnums), |
| 1402 | offsetof(struct NamedSetOfEnums, _asn_ctx), |
| 1403 | 1, /* XER encoding is XMLValueList */ |
| 1404 | }; |
| 1405 | asn_TYPE_descriptor_t asn_DEF_NamedSetOfEnums = { |
| 1406 | "NamedSetOfEnums", |
| 1407 | "NamedSetOfEnums", |
| 1408 | SET_OF_free, |
| 1409 | SET_OF_print, |
| 1410 | SET_OF_constraint, |
| 1411 | SET_OF_decode_ber, |
| 1412 | SET_OF_encode_der, |
| 1413 | SET_OF_decode_xer, |
| 1414 | SET_OF_encode_xer, |
| 1415 | 0, /* Use generic outmost tag fetcher */ |
| 1416 | asn_DEF_NamedSetOfEnums_1_tags, |
| 1417 | sizeof(asn_DEF_NamedSetOfEnums_1_tags) |
| 1418 | /sizeof(asn_DEF_NamedSetOfEnums_1_tags[0]), /* 1 */ |
| 1419 | asn_DEF_NamedSetOfEnums_1_tags, /* Same as above */ |
| 1420 | sizeof(asn_DEF_NamedSetOfEnums_1_tags) |
| 1421 | /sizeof(asn_DEF_NamedSetOfEnums_1_tags[0]), /* 1 */ |
| 1422 | asn_MBR_NamedSetOfEnums_1, |
| 1423 | 1, /* Single element */ |
| 1424 | &asn_SPC_NamedSetOfEnums_1_specs /* Additional specs */ |
| 1425 | }; |
| 1426 | |
| 1427 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 1428 | /*** <<< INCLUDES [SequenceOf] >>> ***/ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1429 | |
| 1430 | #include <INTEGER.h> |
| 1431 | #include <asn_SEQUENCE_OF.h> |
| 1432 | #include <constr_SEQUENCE_OF.h> |
| 1433 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 1434 | /*** <<< TYPE-DECLS [SequenceOf] >>> ***/ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1435 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 1436 | typedef struct SequenceOf { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1437 | A_SEQUENCE_OF(INTEGER_t) list; |
| 1438 | |
| 1439 | /* Context for parsing across buffer boundaries */ |
| 1440 | asn_struct_ctx_t _asn_ctx; |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 1441 | } SequenceOf_t; |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1442 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 1443 | /*** <<< FUNC-DECLS [SequenceOf] >>> ***/ |
| 1444 | |
| 1445 | extern asn_TYPE_descriptor_t asn_DEF_SequenceOf; |
| 1446 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 1447 | /*** <<< STAT-DEFS [SequenceOf] >>> ***/ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1448 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1449 | static asn_TYPE_member_t asn_MBR_SequenceOf_1[] = { |
vlm | 2cebdf3 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 1450 | { ATF_POINTER, 0, 0, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1451 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 1452 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 1453 | .type = &asn_DEF_INTEGER, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1454 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1455 | .name = "id" |
| 1456 | }, |
| 1457 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1458 | static ber_tlv_tag_t asn_DEF_SequenceOf_1_tags[] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1459 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 1460 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1461 | static asn_SET_OF_specifics_t asn_SPC_SequenceOf_1_specs = { |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 1462 | sizeof(struct SequenceOf), |
| 1463 | offsetof(struct SequenceOf, _asn_ctx), |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1464 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 1465 | }; |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 1466 | asn_TYPE_descriptor_t asn_DEF_SequenceOf = { |
| 1467 | "SequenceOf", |
| 1468 | "SequenceOf", |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1469 | SEQUENCE_OF_free, |
| 1470 | SEQUENCE_OF_print, |
| 1471 | SEQUENCE_OF_constraint, |
| 1472 | SEQUENCE_OF_decode_ber, |
| 1473 | SEQUENCE_OF_encode_der, |
| 1474 | SEQUENCE_OF_decode_xer, |
| 1475 | SEQUENCE_OF_encode_xer, |
| 1476 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1477 | asn_DEF_SequenceOf_1_tags, |
| 1478 | sizeof(asn_DEF_SequenceOf_1_tags) |
| 1479 | /sizeof(asn_DEF_SequenceOf_1_tags[0]), /* 1 */ |
| 1480 | asn_DEF_SequenceOf_1_tags, /* Same as above */ |
| 1481 | sizeof(asn_DEF_SequenceOf_1_tags) |
| 1482 | /sizeof(asn_DEF_SequenceOf_1_tags[0]), /* 1 */ |
| 1483 | asn_MBR_SequenceOf_1, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1484 | 1, /* Single element */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1485 | &asn_SPC_SequenceOf_1_specs /* Additional specs */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1486 | }; |
| 1487 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1488 | |
| 1489 | /*** <<< INCLUDES [SeqOfZuka] >>> ***/ |
| 1490 | |
| 1491 | #include <NULL.h> |
| 1492 | #include <asn_SEQUENCE_OF.h> |
| 1493 | #include <constr_SEQUENCE_OF.h> |
| 1494 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1495 | /*** <<< TYPE-DECLS [SeqOfZuka] >>> ***/ |
| 1496 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1497 | typedef struct SeqOfZuka { |
| 1498 | A_SEQUENCE_OF(NULL_t) list; |
| 1499 | |
| 1500 | /* Context for parsing across buffer boundaries */ |
| 1501 | asn_struct_ctx_t _asn_ctx; |
| 1502 | } SeqOfZuka_t; |
| 1503 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 1504 | /*** <<< FUNC-DECLS [SeqOfZuka] >>> ***/ |
| 1505 | |
| 1506 | extern asn_TYPE_descriptor_t asn_DEF_SeqOfZuka; |
| 1507 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1508 | /*** <<< STAT-DEFS [SeqOfZuka] >>> ***/ |
| 1509 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1510 | static asn_TYPE_member_t asn_MBR_SeqOfZuka_1[] = { |
vlm | 2cebdf3 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 1511 | { ATF_POINTER, 0, 0, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1512 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), |
| 1513 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 1514 | .type = &asn_DEF_NULL, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1515 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1516 | .name = "zuka" |
| 1517 | }, |
| 1518 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1519 | static ber_tlv_tag_t asn_DEF_SeqOfZuka_1_tags[] = { |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1520 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 1521 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1522 | static asn_SET_OF_specifics_t asn_SPC_SeqOfZuka_1_specs = { |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1523 | sizeof(struct SeqOfZuka), |
| 1524 | offsetof(struct SeqOfZuka, _asn_ctx), |
| 1525 | 1, /* XER encoding is XMLValueList */ |
| 1526 | }; |
| 1527 | asn_TYPE_descriptor_t asn_DEF_SeqOfZuka = { |
| 1528 | "SeqOfZuka", |
| 1529 | "SeqOfZuka", |
| 1530 | SEQUENCE_OF_free, |
| 1531 | SEQUENCE_OF_print, |
| 1532 | SEQUENCE_OF_constraint, |
| 1533 | SEQUENCE_OF_decode_ber, |
| 1534 | SEQUENCE_OF_encode_der, |
| 1535 | SEQUENCE_OF_decode_xer, |
| 1536 | SEQUENCE_OF_encode_xer, |
| 1537 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1538 | asn_DEF_SeqOfZuka_1_tags, |
| 1539 | sizeof(asn_DEF_SeqOfZuka_1_tags) |
| 1540 | /sizeof(asn_DEF_SeqOfZuka_1_tags[0]), /* 1 */ |
| 1541 | asn_DEF_SeqOfZuka_1_tags, /* Same as above */ |
| 1542 | sizeof(asn_DEF_SeqOfZuka_1_tags) |
| 1543 | /sizeof(asn_DEF_SeqOfZuka_1_tags[0]), /* 1 */ |
| 1544 | asn_MBR_SeqOfZuka_1, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1545 | 1, /* Single element */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1546 | &asn_SPC_SeqOfZuka_1_specs /* Additional specs */ |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1547 | }; |
| 1548 | |
vlm | fbc0bbb | 2005-11-07 15:26:47 +0000 | [diff] [blame^] | 1549 | |
| 1550 | /*** <<< INCLUDES [SetOfChoice] >>> ***/ |
| 1551 | |
| 1552 | #include <asn_SET_OF.h> |
| 1553 | #include <constr_SET_OF.h> |
| 1554 | |
| 1555 | /*** <<< FWD-DECLS [SetOfChoice] >>> ***/ |
| 1556 | |
| 1557 | struct SimpleChoice; |
| 1558 | |
| 1559 | /*** <<< TYPE-DECLS [SetOfChoice] >>> ***/ |
| 1560 | |
| 1561 | typedef struct SetOfChoice { |
| 1562 | A_SET_OF(struct SimpleChoice) list; |
| 1563 | |
| 1564 | /* Context for parsing across buffer boundaries */ |
| 1565 | asn_struct_ctx_t _asn_ctx; |
| 1566 | } SetOfChoice_t; |
| 1567 | |
| 1568 | /*** <<< FUNC-DECLS [SetOfChoice] >>> ***/ |
| 1569 | |
| 1570 | extern asn_TYPE_descriptor_t asn_DEF_SetOfChoice; |
| 1571 | |
| 1572 | /*** <<< POST-INCLUDE [SetOfChoice] >>> ***/ |
| 1573 | |
| 1574 | #include <SimpleChoice.h> |
| 1575 | |
| 1576 | /*** <<< STAT-DEFS [SetOfChoice] >>> ***/ |
| 1577 | |
| 1578 | static asn_TYPE_member_t asn_MBR_SetOfChoice_1[] = { |
| 1579 | { ATF_POINTER, 0, 0, |
| 1580 | .tag = -1 /* Ambiguous tag (CHOICE?) */, |
| 1581 | .tag_mode = 0, |
| 1582 | .type = &asn_DEF_SimpleChoice, |
| 1583 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1584 | .name = "" |
| 1585 | }, |
| 1586 | }; |
| 1587 | static ber_tlv_tag_t asn_DEF_SetOfChoice_1_tags[] = { |
| 1588 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 1589 | }; |
| 1590 | static asn_SET_OF_specifics_t asn_SPC_SetOfChoice_1_specs = { |
| 1591 | sizeof(struct SetOfChoice), |
| 1592 | offsetof(struct SetOfChoice, _asn_ctx), |
| 1593 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 1594 | }; |
| 1595 | asn_TYPE_descriptor_t asn_DEF_SetOfChoice = { |
| 1596 | "SetOfChoice", |
| 1597 | "SetOfChoice", |
| 1598 | SET_OF_free, |
| 1599 | SET_OF_print, |
| 1600 | SET_OF_constraint, |
| 1601 | SET_OF_decode_ber, |
| 1602 | SET_OF_encode_der, |
| 1603 | SET_OF_decode_xer, |
| 1604 | SET_OF_encode_xer, |
| 1605 | 0, /* Use generic outmost tag fetcher */ |
| 1606 | asn_DEF_SetOfChoice_1_tags, |
| 1607 | sizeof(asn_DEF_SetOfChoice_1_tags) |
| 1608 | /sizeof(asn_DEF_SetOfChoice_1_tags[0]), /* 1 */ |
| 1609 | asn_DEF_SetOfChoice_1_tags, /* Same as above */ |
| 1610 | sizeof(asn_DEF_SetOfChoice_1_tags) |
| 1611 | /sizeof(asn_DEF_SetOfChoice_1_tags[0]), /* 1 */ |
| 1612 | asn_MBR_SetOfChoice_1, |
| 1613 | 1, /* Single element */ |
| 1614 | &asn_SPC_SetOfChoice_1_specs /* Additional specs */ |
| 1615 | }; |
| 1616 | |
| 1617 | |
| 1618 | /*** <<< INCLUDES [NamedSetOfChoice] >>> ***/ |
| 1619 | |
| 1620 | #include <asn_SET_OF.h> |
| 1621 | #include <constr_SET_OF.h> |
| 1622 | |
| 1623 | /*** <<< FWD-DECLS [NamedSetOfChoice] >>> ***/ |
| 1624 | |
| 1625 | struct SimpleChoice; |
| 1626 | |
| 1627 | /*** <<< TYPE-DECLS [NamedSetOfChoice] >>> ***/ |
| 1628 | |
| 1629 | typedef struct NamedSetOfChoice { |
| 1630 | A_SET_OF(struct SimpleChoice) list; |
| 1631 | |
| 1632 | /* Context for parsing across buffer boundaries */ |
| 1633 | asn_struct_ctx_t _asn_ctx; |
| 1634 | } NamedSetOfChoice_t; |
| 1635 | |
| 1636 | /*** <<< FUNC-DECLS [NamedSetOfChoice] >>> ***/ |
| 1637 | |
| 1638 | extern asn_TYPE_descriptor_t asn_DEF_NamedSetOfChoice; |
| 1639 | |
| 1640 | /*** <<< POST-INCLUDE [NamedSetOfChoice] >>> ***/ |
| 1641 | |
| 1642 | #include <SimpleChoice.h> |
| 1643 | |
| 1644 | /*** <<< STAT-DEFS [NamedSetOfChoice] >>> ***/ |
| 1645 | |
| 1646 | static asn_TYPE_member_t asn_MBR_NamedSetOfChoice_1[] = { |
| 1647 | { ATF_POINTER, 0, 0, |
| 1648 | .tag = -1 /* Ambiguous tag (CHOICE?) */, |
| 1649 | .tag_mode = 0, |
| 1650 | .type = &asn_DEF_SimpleChoice, |
| 1651 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1652 | .name = "whatever" |
| 1653 | }, |
| 1654 | }; |
| 1655 | static ber_tlv_tag_t asn_DEF_NamedSetOfChoice_1_tags[] = { |
| 1656 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 1657 | }; |
| 1658 | static asn_SET_OF_specifics_t asn_SPC_NamedSetOfChoice_1_specs = { |
| 1659 | sizeof(struct NamedSetOfChoice), |
| 1660 | offsetof(struct NamedSetOfChoice, _asn_ctx), |
| 1661 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 1662 | }; |
| 1663 | asn_TYPE_descriptor_t asn_DEF_NamedSetOfChoice = { |
| 1664 | "NamedSetOfChoice", |
| 1665 | "NamedSetOfChoice", |
| 1666 | SET_OF_free, |
| 1667 | SET_OF_print, |
| 1668 | SET_OF_constraint, |
| 1669 | SET_OF_decode_ber, |
| 1670 | SET_OF_encode_der, |
| 1671 | SET_OF_decode_xer, |
| 1672 | SET_OF_encode_xer, |
| 1673 | 0, /* Use generic outmost tag fetcher */ |
| 1674 | asn_DEF_NamedSetOfChoice_1_tags, |
| 1675 | sizeof(asn_DEF_NamedSetOfChoice_1_tags) |
| 1676 | /sizeof(asn_DEF_NamedSetOfChoice_1_tags[0]), /* 1 */ |
| 1677 | asn_DEF_NamedSetOfChoice_1_tags, /* Same as above */ |
| 1678 | sizeof(asn_DEF_NamedSetOfChoice_1_tags) |
| 1679 | /sizeof(asn_DEF_NamedSetOfChoice_1_tags[0]), /* 1 */ |
| 1680 | asn_MBR_NamedSetOfChoice_1, |
| 1681 | 1, /* Single element */ |
| 1682 | &asn_SPC_NamedSetOfChoice_1_specs /* Additional specs */ |
| 1683 | }; |
| 1684 | |
| 1685 | |
| 1686 | /*** <<< INCLUDES [SimpleChoice] >>> ***/ |
| 1687 | |
| 1688 | #include <NULL.h> |
| 1689 | #include <INTEGER.h> |
| 1690 | #include <constr_CHOICE.h> |
| 1691 | |
| 1692 | /*** <<< DEPS [SimpleChoice] >>> ***/ |
| 1693 | |
| 1694 | typedef enum SimpleChoice_PR { |
| 1695 | SimpleChoice_PR_NOTHING, /* No components present */ |
| 1696 | SimpleChoice_PR_a, |
| 1697 | SimpleChoice_PR_b, |
| 1698 | } SimpleChoice_PR; |
| 1699 | |
| 1700 | /*** <<< TYPE-DECLS [SimpleChoice] >>> ***/ |
| 1701 | |
| 1702 | typedef struct SimpleChoice { |
| 1703 | SimpleChoice_PR present; |
| 1704 | union SimpleChoice_u { |
| 1705 | NULL_t a; |
| 1706 | INTEGER_t b; |
| 1707 | } choice; |
| 1708 | |
| 1709 | /* Context for parsing across buffer boundaries */ |
| 1710 | asn_struct_ctx_t _asn_ctx; |
| 1711 | } SimpleChoice_t; |
| 1712 | |
| 1713 | /*** <<< FUNC-DECLS [SimpleChoice] >>> ***/ |
| 1714 | |
| 1715 | extern asn_TYPE_descriptor_t asn_DEF_SimpleChoice; |
| 1716 | |
| 1717 | /*** <<< STAT-DEFS [SimpleChoice] >>> ***/ |
| 1718 | |
| 1719 | static asn_TYPE_member_t asn_MBR_SimpleChoice_1[] = { |
| 1720 | { ATF_NOFLAGS, 0, offsetof(struct SimpleChoice, choice.a), |
| 1721 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 1722 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1723 | .type = &asn_DEF_NULL, |
| 1724 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1725 | .name = "a" |
| 1726 | }, |
| 1727 | { ATF_NOFLAGS, 0, offsetof(struct SimpleChoice, choice.b), |
| 1728 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 1729 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1730 | .type = &asn_DEF_INTEGER, |
| 1731 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1732 | .name = "b" |
| 1733 | }, |
| 1734 | }; |
| 1735 | static asn_TYPE_tag2member_t asn_MAP_SimpleChoice_1_tag2el[] = { |
| 1736 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 79 */ |
| 1737 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* b at 79 */ |
| 1738 | }; |
| 1739 | static asn_CHOICE_specifics_t asn_SPC_SimpleChoice_1_specs = { |
| 1740 | sizeof(struct SimpleChoice), |
| 1741 | offsetof(struct SimpleChoice, _asn_ctx), |
| 1742 | offsetof(struct SimpleChoice, present), |
| 1743 | sizeof(((struct SimpleChoice *)0)->present), |
| 1744 | asn_MAP_SimpleChoice_1_tag2el, |
| 1745 | 2, /* Count of tags in the map */ |
| 1746 | 0 /* Whether extensible */ |
| 1747 | }; |
| 1748 | asn_TYPE_descriptor_t asn_DEF_SimpleChoice = { |
| 1749 | "SimpleChoice", |
| 1750 | "SimpleChoice", |
| 1751 | CHOICE_free, |
| 1752 | CHOICE_print, |
| 1753 | CHOICE_constraint, |
| 1754 | CHOICE_decode_ber, |
| 1755 | CHOICE_encode_der, |
| 1756 | CHOICE_decode_xer, |
| 1757 | CHOICE_encode_xer, |
| 1758 | CHOICE_outmost_tag, |
| 1759 | 0, /* No effective tags (pointer) */ |
| 1760 | 0, /* No effective tags (count) */ |
| 1761 | 0, /* No tags (pointer) */ |
| 1762 | 0, /* No tags (count) */ |
| 1763 | asn_MBR_SimpleChoice_1, |
| 1764 | 2, /* Elements count */ |
| 1765 | &asn_SPC_SimpleChoice_1_specs /* Additional specs */ |
| 1766 | }; |
| 1767 | |