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