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 */ |
| 619 | 1 /* Strict enumeration */ |
| 620 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 621 | static ber_tlv_tag_t asn_DEF_enum_tags_4[] = { |
Lev Walkin | c92a746 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 622 | (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 623 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 624 | }; |
| 625 | static /* Use -fall-defs-global to expose */ |
| 626 | asn_TYPE_descriptor_t asn_DEF_enum_4 = { |
| 627 | "enum", |
| 628 | "enum", |
| 629 | enum_4_free, |
| 630 | enum_4_print, |
| 631 | enum_4_constraint, |
| 632 | enum_4_decode_ber, |
| 633 | enum_4_encode_der, |
| 634 | enum_4_decode_xer, |
| 635 | enum_4_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 636 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | c92a746 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 637 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 638 | asn_DEF_enum_tags_4, |
| 639 | sizeof(asn_DEF_enum_tags_4) |
| 640 | /sizeof(asn_DEF_enum_tags_4[0]) - 1, /* 1 */ |
| 641 | asn_DEF_enum_tags_4, /* Same as above */ |
| 642 | sizeof(asn_DEF_enum_tags_4) |
| 643 | /sizeof(asn_DEF_enum_tags_4[0]), /* 2 */ |
| 644 | 0, /* No PER visible constraints */ |
Lev Walkin | c92a746 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 645 | 0, 0, /* Defined elsewhere */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 646 | &asn_SPC_enum_specs_4 /* Additional specs */ |
Lev Walkin | c92a746 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 647 | }; |
| 648 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 649 | static asn_TYPE_member_t asn_MBR_ExtensibleSet_1[] = { |
Lev Walkin | c92a746 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 650 | { ATF_POINTER, 2, offsetof(struct ExtensibleSet, string), |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 651 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 652 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 653 | .type = &asn_DEF_UTF8String, |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 654 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 655 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 656 | .default_value = 0, |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 657 | .name = "string" |
| 658 | }, |
Lev Walkin | b85a813 | 2005-08-18 13:38:19 +0000 | [diff] [blame] | 659 | { ATF_POINTER, 1, offsetof(struct ExtensibleSet, Enum), |
Lev Walkin | c92a746 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 660 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 661 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 662 | .type = &asn_DEF_enum_4, |
Lev Walkin | c92a746 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 663 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 664 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 665 | .default_value = 0, |
Lev Walkin | c92a746 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 666 | .name = "enum" |
| 667 | }, |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 668 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 669 | static ber_tlv_tag_t asn_DEF_ExtensibleSet_tags_1[] = { |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 670 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 671 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 672 | static asn_TYPE_tag2member_t asn_MAP_ExtensibleSet_tag2el_1[] = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 673 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* string at 50 */ |
| 674 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* enum at 52 */ |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 675 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 676 | 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] | 677 | (0 << 7) | (0 << 6) |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 678 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 679 | static asn_SET_specifics_t asn_SPC_ExtensibleSet_specs_1 = { |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 680 | sizeof(struct ExtensibleSet), |
| 681 | offsetof(struct ExtensibleSet, _asn_ctx), |
| 682 | offsetof(struct ExtensibleSet, _presence_map), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 683 | asn_MAP_ExtensibleSet_tag2el_1, |
Lev Walkin | c92a746 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 684 | 2, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 685 | asn_MAP_ExtensibleSet_tag2el_1, /* Same as above */ |
Lev Walkin | c92a746 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 686 | 2, /* Count of tags in the CXER map */ |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 687 | 1, /* Whether extensible */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 688 | (unsigned int *)asn_MAP_ExtensibleSet_mmap_1 /* Mandatory elements map */ |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 689 | }; |
| 690 | asn_TYPE_descriptor_t asn_DEF_ExtensibleSet = { |
| 691 | "ExtensibleSet", |
| 692 | "ExtensibleSet", |
| 693 | SET_free, |
| 694 | SET_print, |
| 695 | SET_constraint, |
| 696 | SET_decode_ber, |
| 697 | SET_encode_der, |
| 698 | SET_decode_xer, |
| 699 | SET_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 700 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 701 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 702 | asn_DEF_ExtensibleSet_tags_1, |
| 703 | sizeof(asn_DEF_ExtensibleSet_tags_1) |
| 704 | /sizeof(asn_DEF_ExtensibleSet_tags_1[0]), /* 1 */ |
| 705 | asn_DEF_ExtensibleSet_tags_1, /* Same as above */ |
| 706 | sizeof(asn_DEF_ExtensibleSet_tags_1) |
| 707 | /sizeof(asn_DEF_ExtensibleSet_tags_1[0]), /* 1 */ |
| 708 | 0, /* No PER visible constraints */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 709 | asn_MBR_ExtensibleSet_1, |
Lev Walkin | c92a746 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 710 | 2, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 711 | &asn_SPC_ExtensibleSet_specs_1 /* Additional specs */ |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 712 | }; |
| 713 | |
| 714 | |
| 715 | /*** <<< INCLUDES [ExtensibleSequence] >>> ***/ |
| 716 | |
| 717 | #include <UTF8String.h> |
| 718 | #include <INTEGER.h> |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 719 | #include <GeneralizedTime.h> |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 720 | #include <constr_SEQUENCE.h> |
| 721 | |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 722 | /*** <<< TYPE-DECLS [ExtensibleSequence] >>> ***/ |
| 723 | |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 724 | typedef struct ExtensibleSequence { |
| 725 | UTF8String_t *string /* OPTIONAL */; |
| 726 | /* |
| 727 | * This type is extensible, |
| 728 | * possible extensions are below. |
| 729 | */ |
| 730 | INTEGER_t *integer /* OPTIONAL */; |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 731 | GeneralizedTime_t *gtime; |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 732 | |
| 733 | /* Context for parsing across buffer boundaries */ |
| 734 | asn_struct_ctx_t _asn_ctx; |
| 735 | } ExtensibleSequence_t; |
| 736 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 737 | /*** <<< FUNC-DECLS [ExtensibleSequence] >>> ***/ |
| 738 | |
| 739 | extern asn_TYPE_descriptor_t asn_DEF_ExtensibleSequence; |
| 740 | |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 741 | /*** <<< STAT-DEFS [ExtensibleSequence] >>> ***/ |
| 742 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 743 | static asn_TYPE_member_t asn_MBR_ExtensibleSequence_1[] = { |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 744 | { ATF_POINTER, 3, offsetof(struct ExtensibleSequence, string), |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 745 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 746 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 747 | .type = &asn_DEF_UTF8String, |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 748 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 749 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 750 | .default_value = 0, |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 751 | .name = "string" |
| 752 | }, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 753 | { ATF_POINTER, 2, offsetof(struct ExtensibleSequence, integer), |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 754 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 755 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 756 | .type = &asn_DEF_INTEGER, |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 757 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 758 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 759 | .default_value = 0, |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 760 | .name = "integer" |
| 761 | }, |
Lev Walkin | b85a813 | 2005-08-18 13:38:19 +0000 | [diff] [blame] | 762 | { ATF_POINTER, 1, offsetof(struct ExtensibleSequence, gtime), |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 763 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 764 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 765 | .type = &asn_DEF_GeneralizedTime, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 766 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 767 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 768 | .default_value = 0, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 769 | .name = "gtime" |
| 770 | }, |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 771 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 772 | static ber_tlv_tag_t asn_DEF_ExtensibleSequence_tags_1[] = { |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 773 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 774 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 775 | static asn_TYPE_tag2member_t asn_MAP_ExtensibleSequence_tag2el_1[] = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 776 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* string at 56 */ |
| 777 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* integer at 58 */ |
| 778 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* gtime at 59 */ |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 779 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 780 | static asn_SEQUENCE_specifics_t asn_SPC_ExtensibleSequence_specs_1 = { |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 781 | sizeof(struct ExtensibleSequence), |
| 782 | offsetof(struct ExtensibleSequence, _asn_ctx), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 783 | asn_MAP_ExtensibleSequence_tag2el_1, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 784 | 3, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 785 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 786 | 0, /* Start extensions */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 787 | 4 /* Stop extensions */ |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 788 | }; |
| 789 | asn_TYPE_descriptor_t asn_DEF_ExtensibleSequence = { |
| 790 | "ExtensibleSequence", |
| 791 | "ExtensibleSequence", |
| 792 | SEQUENCE_free, |
| 793 | SEQUENCE_print, |
| 794 | SEQUENCE_constraint, |
| 795 | SEQUENCE_decode_ber, |
| 796 | SEQUENCE_encode_der, |
| 797 | SEQUENCE_decode_xer, |
| 798 | SEQUENCE_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 799 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 800 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 801 | asn_DEF_ExtensibleSequence_tags_1, |
| 802 | sizeof(asn_DEF_ExtensibleSequence_tags_1) |
| 803 | /sizeof(asn_DEF_ExtensibleSequence_tags_1[0]), /* 1 */ |
| 804 | asn_DEF_ExtensibleSequence_tags_1, /* Same as above */ |
| 805 | sizeof(asn_DEF_ExtensibleSequence_tags_1) |
| 806 | /sizeof(asn_DEF_ExtensibleSequence_tags_1[0]), /* 1 */ |
| 807 | 0, /* No PER visible constraints */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 808 | asn_MBR_ExtensibleSequence_1, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 809 | 3, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 810 | &asn_SPC_ExtensibleSequence_specs_1 /* Additional specs */ |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 811 | }; |
| 812 | |
| 813 | |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 814 | /*** <<< INCLUDES [ExtensibleSequence2] >>> ***/ |
| 815 | |
| 816 | #include <UTF8String.h> |
| 817 | #include <INTEGER.h> |
| 818 | #include <constr_SEQUENCE.h> |
| 819 | |
| 820 | /*** <<< TYPE-DECLS [ExtensibleSequence2] >>> ***/ |
| 821 | |
| 822 | typedef struct ExtensibleSequence2 { |
| 823 | UTF8String_t *string /* OPTIONAL */; |
| 824 | /* |
| 825 | * This type is extensible, |
| 826 | * possible extensions are below. |
| 827 | */ |
| 828 | INTEGER_t *integer /* OPTIONAL */; |
| 829 | |
| 830 | /* Context for parsing across buffer boundaries */ |
| 831 | asn_struct_ctx_t _asn_ctx; |
| 832 | } ExtensibleSequence2_t; |
| 833 | |
| 834 | /*** <<< FUNC-DECLS [ExtensibleSequence2] >>> ***/ |
| 835 | |
| 836 | extern asn_TYPE_descriptor_t asn_DEF_ExtensibleSequence2; |
| 837 | |
| 838 | /*** <<< STAT-DEFS [ExtensibleSequence2] >>> ***/ |
| 839 | |
| 840 | static asn_TYPE_member_t asn_MBR_ExtensibleSequence2_1[] = { |
| 841 | { ATF_POINTER, 2, offsetof(struct ExtensibleSequence2, string), |
| 842 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 843 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 844 | .type = &asn_DEF_UTF8String, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 845 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 846 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 847 | .default_value = 0, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 848 | .name = "string" |
| 849 | }, |
| 850 | { ATF_POINTER, 1, offsetof(struct ExtensibleSequence2, integer), |
| 851 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 852 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 853 | .type = &asn_DEF_INTEGER, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 854 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 855 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 856 | .default_value = 0, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 857 | .name = "integer" |
| 858 | }, |
| 859 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 860 | static ber_tlv_tag_t asn_DEF_ExtensibleSequence2_tags_1[] = { |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 861 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 862 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 863 | static asn_TYPE_tag2member_t asn_MAP_ExtensibleSequence2_tag2el_1[] = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 864 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* string at 63 */ |
| 865 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* integer at 65 */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 866 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 867 | static asn_SEQUENCE_specifics_t asn_SPC_ExtensibleSequence2_specs_1 = { |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 868 | sizeof(struct ExtensibleSequence2), |
| 869 | offsetof(struct ExtensibleSequence2, _asn_ctx), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 870 | asn_MAP_ExtensibleSequence2_tag2el_1, |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 871 | 2, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 872 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 873 | 0, /* Start extensions */ |
| 874 | 3 /* Stop extensions */ |
| 875 | }; |
| 876 | asn_TYPE_descriptor_t asn_DEF_ExtensibleSequence2 = { |
| 877 | "ExtensibleSequence2", |
| 878 | "ExtensibleSequence2", |
| 879 | SEQUENCE_free, |
| 880 | SEQUENCE_print, |
| 881 | SEQUENCE_constraint, |
| 882 | SEQUENCE_decode_ber, |
| 883 | SEQUENCE_encode_der, |
| 884 | SEQUENCE_decode_xer, |
| 885 | SEQUENCE_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 886 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 887 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 888 | asn_DEF_ExtensibleSequence2_tags_1, |
| 889 | sizeof(asn_DEF_ExtensibleSequence2_tags_1) |
| 890 | /sizeof(asn_DEF_ExtensibleSequence2_tags_1[0]), /* 1 */ |
| 891 | asn_DEF_ExtensibleSequence2_tags_1, /* Same as above */ |
| 892 | sizeof(asn_DEF_ExtensibleSequence2_tags_1) |
| 893 | /sizeof(asn_DEF_ExtensibleSequence2_tags_1[0]), /* 1 */ |
| 894 | 0, /* No PER visible constraints */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 895 | asn_MBR_ExtensibleSequence2_1, |
| 896 | 2, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 897 | &asn_SPC_ExtensibleSequence2_specs_1 /* Additional specs */ |
Lev Walkin | 1575040 | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 898 | }; |
| 899 | |
| 900 | |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 901 | /*** <<< INCLUDES [SetOfNULL] >>> ***/ |
| 902 | |
| 903 | #include <NULL.h> |
| 904 | #include <asn_SET_OF.h> |
| 905 | #include <constr_SET_OF.h> |
| 906 | |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 907 | /*** <<< TYPE-DECLS [SetOfNULL] >>> ***/ |
| 908 | |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 909 | typedef struct SetOfNULL { |
| 910 | A_SET_OF(NULL_t) list; |
| 911 | |
| 912 | /* Context for parsing across buffer boundaries */ |
| 913 | asn_struct_ctx_t _asn_ctx; |
| 914 | } SetOfNULL_t; |
| 915 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 916 | /*** <<< FUNC-DECLS [SetOfNULL] >>> ***/ |
| 917 | |
| 918 | extern asn_TYPE_descriptor_t asn_DEF_SetOfNULL; |
| 919 | |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 920 | /*** <<< STAT-DEFS [SetOfNULL] >>> ***/ |
| 921 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 922 | static asn_TYPE_member_t asn_MBR_SetOfNULL_1[] = { |
Lev Walkin | 8eb4b57 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 923 | { ATF_POINTER, 0, 0, |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 924 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), |
| 925 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 926 | .type = &asn_DEF_NULL, |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 927 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 928 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 929 | .default_value = 0, |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 930 | .name = "" |
| 931 | }, |
| 932 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 933 | static ber_tlv_tag_t asn_DEF_SetOfNULL_tags_1[] = { |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 934 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 935 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 936 | static asn_SET_OF_specifics_t asn_SPC_SetOfNULL_specs_1 = { |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 937 | sizeof(struct SetOfNULL), |
| 938 | offsetof(struct SetOfNULL, _asn_ctx), |
| 939 | 1, /* XER encoding is XMLValueList */ |
| 940 | }; |
| 941 | asn_TYPE_descriptor_t asn_DEF_SetOfNULL = { |
| 942 | "SetOfNULL", |
| 943 | "SetOfNULL", |
| 944 | SET_OF_free, |
| 945 | SET_OF_print, |
| 946 | SET_OF_constraint, |
| 947 | SET_OF_decode_ber, |
| 948 | SET_OF_encode_der, |
| 949 | SET_OF_decode_xer, |
| 950 | SET_OF_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 951 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 952 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 953 | asn_DEF_SetOfNULL_tags_1, |
| 954 | sizeof(asn_DEF_SetOfNULL_tags_1) |
| 955 | /sizeof(asn_DEF_SetOfNULL_tags_1[0]), /* 1 */ |
| 956 | asn_DEF_SetOfNULL_tags_1, /* Same as above */ |
| 957 | sizeof(asn_DEF_SetOfNULL_tags_1) |
| 958 | /sizeof(asn_DEF_SetOfNULL_tags_1[0]), /* 1 */ |
| 959 | 0, /* No PER visible constraints */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 960 | asn_MBR_SetOfNULL_1, |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 961 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 962 | &asn_SPC_SetOfNULL_specs_1 /* Additional specs */ |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 963 | }; |
| 964 | |
| 965 | |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 966 | /*** <<< INCLUDES [SetOfREAL] >>> ***/ |
| 967 | |
| 968 | #include <REAL.h> |
| 969 | #include <asn_SET_OF.h> |
| 970 | #include <constr_SET_OF.h> |
| 971 | |
| 972 | /*** <<< TYPE-DECLS [SetOfREAL] >>> ***/ |
| 973 | |
| 974 | typedef struct SetOfREAL { |
| 975 | A_SET_OF(REAL_t) list; |
| 976 | |
| 977 | /* Context for parsing across buffer boundaries */ |
| 978 | asn_struct_ctx_t _asn_ctx; |
| 979 | } SetOfREAL_t; |
| 980 | |
| 981 | /*** <<< FUNC-DECLS [SetOfREAL] >>> ***/ |
| 982 | |
| 983 | extern asn_TYPE_descriptor_t asn_DEF_SetOfREAL; |
| 984 | |
| 985 | /*** <<< STAT-DEFS [SetOfREAL] >>> ***/ |
| 986 | |
| 987 | static asn_TYPE_member_t asn_MBR_SetOfREAL_1[] = { |
| 988 | { ATF_POINTER, 0, 0, |
| 989 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), |
| 990 | .tag_mode = 0, |
| 991 | .type = &asn_DEF_REAL, |
| 992 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 993 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 994 | .default_value = 0, |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 995 | .name = "" |
| 996 | }, |
| 997 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 998 | static ber_tlv_tag_t asn_DEF_SetOfREAL_tags_1[] = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 999 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 1000 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1001 | static asn_SET_OF_specifics_t asn_SPC_SetOfREAL_specs_1 = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1002 | sizeof(struct SetOfREAL), |
| 1003 | offsetof(struct SetOfREAL, _asn_ctx), |
| 1004 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 1005 | }; |
| 1006 | asn_TYPE_descriptor_t asn_DEF_SetOfREAL = { |
| 1007 | "SetOfREAL", |
| 1008 | "SetOfREAL", |
| 1009 | SET_OF_free, |
| 1010 | SET_OF_print, |
| 1011 | SET_OF_constraint, |
| 1012 | SET_OF_decode_ber, |
| 1013 | SET_OF_encode_der, |
| 1014 | SET_OF_decode_xer, |
| 1015 | SET_OF_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1016 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1017 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1018 | asn_DEF_SetOfREAL_tags_1, |
| 1019 | sizeof(asn_DEF_SetOfREAL_tags_1) |
| 1020 | /sizeof(asn_DEF_SetOfREAL_tags_1[0]), /* 1 */ |
| 1021 | asn_DEF_SetOfREAL_tags_1, /* Same as above */ |
| 1022 | sizeof(asn_DEF_SetOfREAL_tags_1) |
| 1023 | /sizeof(asn_DEF_SetOfREAL_tags_1[0]), /* 1 */ |
| 1024 | 0, /* No PER visible constraints */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1025 | asn_MBR_SetOfREAL_1, |
| 1026 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1027 | &asn_SPC_SetOfREAL_specs_1 /* Additional specs */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1028 | }; |
| 1029 | |
| 1030 | |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1031 | /*** <<< INCLUDES [SetOfEnums] >>> ***/ |
| 1032 | |
| 1033 | #include <ENUMERATED.h> |
| 1034 | #include <asn_SET_OF.h> |
| 1035 | #include <constr_SET_OF.h> |
| 1036 | |
| 1037 | /*** <<< DEPS [SetOfEnums] >>> ***/ |
| 1038 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1039 | typedef enum Member { |
| 1040 | Member_one = 0, |
| 1041 | Member_oneMore = 1 |
Lev Walkin | 171487e | 2006-03-21 07:25:18 +0000 | [diff] [blame] | 1042 | } e_Member; |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1043 | |
| 1044 | /*** <<< TYPE-DECLS [SetOfEnums] >>> ***/ |
| 1045 | |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1046 | typedef struct SetOfEnums { |
| 1047 | A_SET_OF(ENUMERATED_t) list; |
| 1048 | |
| 1049 | /* Context for parsing across buffer boundaries */ |
| 1050 | asn_struct_ctx_t _asn_ctx; |
| 1051 | } SetOfEnums_t; |
| 1052 | |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1053 | /*** <<< FUNC-DECLS [SetOfEnums] >>> ***/ |
| 1054 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1055 | /* 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] | 1056 | extern asn_TYPE_descriptor_t asn_DEF_SetOfEnums; |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1057 | |
| 1058 | /*** <<< CODE [SetOfEnums] >>> ***/ |
| 1059 | |
| 1060 | static int |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1061 | Member_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 1062 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1063 | /* Replace with underlying type checker */ |
| 1064 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 1065 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1066 | } |
| 1067 | |
| 1068 | /* |
| 1069 | * This type is implemented using ENUMERATED, |
| 1070 | * so here we adjust the DEF accordingly. |
| 1071 | */ |
| 1072 | static void |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1073 | Member_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1074 | td->free_struct = asn_DEF_ENUMERATED.free_struct; |
| 1075 | td->print_struct = asn_DEF_ENUMERATED.print_struct; |
| 1076 | td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder; |
| 1077 | td->der_encoder = asn_DEF_ENUMERATED.der_encoder; |
| 1078 | td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder; |
| 1079 | td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1080 | td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder; |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1081 | td->uper_encoder = asn_DEF_ENUMERATED.uper_encoder; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1082 | if(!td->per_constraints) |
| 1083 | td->per_constraints = asn_DEF_ENUMERATED.per_constraints; |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1084 | td->elements = asn_DEF_ENUMERATED.elements; |
| 1085 | td->elements_count = asn_DEF_ENUMERATED.elements_count; |
Lev Walkin | 29a8219 | 2005-03-29 19:05:37 +0000 | [diff] [blame] | 1086 | /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */ |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1087 | } |
| 1088 | |
| 1089 | static void |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1090 | Member_2_free(asn_TYPE_descriptor_t *td, |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1091 | void *struct_ptr, int contents_only) { |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1092 | Member_2_inherit_TYPE_descriptor(td); |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1093 | td->free_struct(td, struct_ptr, contents_only); |
| 1094 | } |
| 1095 | |
| 1096 | static int |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1097 | Member_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1098 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1099 | Member_2_inherit_TYPE_descriptor(td); |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1100 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1101 | } |
| 1102 | |
| 1103 | static asn_dec_rval_t |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1104 | 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] | 1105 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1106 | Member_2_inherit_TYPE_descriptor(td); |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1107 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1108 | } |
| 1109 | |
| 1110 | static asn_enc_rval_t |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1111 | Member_2_encode_der(asn_TYPE_descriptor_t *td, |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1112 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1113 | asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1114 | Member_2_inherit_TYPE_descriptor(td); |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1115 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1116 | } |
| 1117 | |
| 1118 | static asn_dec_rval_t |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1119 | 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] | 1120 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1121 | Member_2_inherit_TYPE_descriptor(td); |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1122 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1123 | } |
| 1124 | |
| 1125 | static asn_enc_rval_t |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1126 | Member_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1127 | int ilevel, enum xer_encoder_flags_e flags, |
| 1128 | asn_app_consume_bytes_f *cb, void *app_key) { |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1129 | Member_2_inherit_TYPE_descriptor(td); |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1130 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1131 | } |
| 1132 | |
| 1133 | |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1134 | /*** <<< STAT-DEFS [SetOfEnums] >>> ***/ |
| 1135 | |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1136 | static asn_INTEGER_enum_map_t asn_MAP_Member_value2enum_2[] = { |
Lev Walkin | 9f30ef1 | 2005-02-25 11:08:02 +0000 | [diff] [blame] | 1137 | { 0, 3, "one" }, |
| 1138 | { 1, 7, "oneMore" } |
| 1139 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1140 | static unsigned int asn_MAP_Member_enum2value_2[] = { |
Lev Walkin | 9f30ef1 | 2005-02-25 11:08:02 +0000 | [diff] [blame] | 1141 | 0, /* one(0) */ |
| 1142 | 1 /* oneMore(1) */ |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1143 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1144 | static asn_INTEGER_specifics_t asn_SPC_Member_specs_2 = { |
| 1145 | asn_MAP_Member_value2enum_2, /* "tag" => N; sorted by tag */ |
| 1146 | asn_MAP_Member_enum2value_2, /* N => "tag"; sorted by N */ |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1147 | 2, /* Number of elements in the maps */ |
Lev Walkin | 295e245 | 2005-02-25 11:47:59 +0000 | [diff] [blame] | 1148 | 0, /* Enumeration is not extensible */ |
| 1149 | 1 /* Strict enumeration */ |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1150 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1151 | static ber_tlv_tag_t asn_DEF_Member_tags_2[] = { |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1152 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 1153 | }; |
| 1154 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1155 | asn_TYPE_descriptor_t asn_DEF_Member_2 = { |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1156 | "ENUMERATED", |
| 1157 | "ENUMERATED", |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1158 | Member_2_free, |
| 1159 | Member_2_print, |
| 1160 | Member_2_constraint, |
| 1161 | Member_2_decode_ber, |
| 1162 | Member_2_encode_der, |
| 1163 | Member_2_decode_xer, |
| 1164 | Member_2_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1165 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1166 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1167 | asn_DEF_Member_tags_2, |
| 1168 | sizeof(asn_DEF_Member_tags_2) |
| 1169 | /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */ |
| 1170 | asn_DEF_Member_tags_2, /* Same as above */ |
| 1171 | sizeof(asn_DEF_Member_tags_2) |
| 1172 | /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */ |
| 1173 | 0, /* No PER visible constraints */ |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1174 | 0, 0, /* Defined elsewhere */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1175 | &asn_SPC_Member_specs_2 /* Additional specs */ |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1176 | }; |
| 1177 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1178 | static asn_TYPE_member_t asn_MBR_SetOfEnums_1[] = { |
Lev Walkin | 8eb4b57 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 1179 | { ATF_POINTER, 0, 0, |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1180 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), |
| 1181 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 1182 | .type = &asn_DEF_Member_2, |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1183 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1184 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 1185 | .default_value = 0, |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1186 | .name = "" |
| 1187 | }, |
| 1188 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1189 | static ber_tlv_tag_t asn_DEF_SetOfEnums_tags_1[] = { |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1190 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 1191 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1192 | static asn_SET_OF_specifics_t asn_SPC_SetOfEnums_specs_1 = { |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1193 | sizeof(struct SetOfEnums), |
| 1194 | offsetof(struct SetOfEnums, _asn_ctx), |
Lev Walkin | b47df09 | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 1195 | 1, /* XER encoding is XMLValueList */ |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1196 | }; |
| 1197 | asn_TYPE_descriptor_t asn_DEF_SetOfEnums = { |
| 1198 | "SetOfEnums", |
| 1199 | "SetOfEnums", |
| 1200 | SET_OF_free, |
| 1201 | SET_OF_print, |
| 1202 | SET_OF_constraint, |
| 1203 | SET_OF_decode_ber, |
| 1204 | SET_OF_encode_der, |
| 1205 | SET_OF_decode_xer, |
| 1206 | SET_OF_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1207 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1208 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1209 | asn_DEF_SetOfEnums_tags_1, |
| 1210 | sizeof(asn_DEF_SetOfEnums_tags_1) |
| 1211 | /sizeof(asn_DEF_SetOfEnums_tags_1[0]), /* 1 */ |
| 1212 | asn_DEF_SetOfEnums_tags_1, /* Same as above */ |
| 1213 | sizeof(asn_DEF_SetOfEnums_tags_1) |
| 1214 | /sizeof(asn_DEF_SetOfEnums_tags_1[0]), /* 1 */ |
| 1215 | 0, /* No PER visible constraints */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1216 | asn_MBR_SetOfEnums_1, |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1217 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1218 | &asn_SPC_SetOfEnums_specs_1 /* Additional specs */ |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1219 | }; |
| 1220 | |
| 1221 | |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1222 | /*** <<< INCLUDES [NamedSetOfNULL] >>> ***/ |
| 1223 | |
| 1224 | #include <NULL.h> |
| 1225 | #include <asn_SET_OF.h> |
| 1226 | #include <constr_SET_OF.h> |
| 1227 | |
| 1228 | /*** <<< TYPE-DECLS [NamedSetOfNULL] >>> ***/ |
| 1229 | |
| 1230 | typedef struct NamedSetOfNULL { |
| 1231 | A_SET_OF(NULL_t) list; |
| 1232 | |
| 1233 | /* Context for parsing across buffer boundaries */ |
| 1234 | asn_struct_ctx_t _asn_ctx; |
| 1235 | } NamedSetOfNULL_t; |
| 1236 | |
| 1237 | /*** <<< FUNC-DECLS [NamedSetOfNULL] >>> ***/ |
| 1238 | |
| 1239 | extern asn_TYPE_descriptor_t asn_DEF_NamedSetOfNULL; |
| 1240 | |
| 1241 | /*** <<< STAT-DEFS [NamedSetOfNULL] >>> ***/ |
| 1242 | |
| 1243 | static asn_TYPE_member_t asn_MBR_NamedSetOfNULL_1[] = { |
| 1244 | { ATF_POINTER, 0, 0, |
| 1245 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), |
| 1246 | .tag_mode = 0, |
| 1247 | .type = &asn_DEF_NULL, |
| 1248 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1249 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 1250 | .default_value = 0, |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1251 | .name = "y" |
| 1252 | }, |
| 1253 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1254 | static ber_tlv_tag_t asn_DEF_NamedSetOfNULL_tags_1[] = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1255 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 1256 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1257 | static asn_SET_OF_specifics_t asn_SPC_NamedSetOfNULL_specs_1 = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1258 | sizeof(struct NamedSetOfNULL), |
| 1259 | offsetof(struct NamedSetOfNULL, _asn_ctx), |
| 1260 | 1, /* XER encoding is XMLValueList */ |
| 1261 | }; |
| 1262 | asn_TYPE_descriptor_t asn_DEF_NamedSetOfNULL = { |
| 1263 | "NamedSetOfNULL", |
| 1264 | "NamedSetOfNULL", |
| 1265 | SET_OF_free, |
| 1266 | SET_OF_print, |
| 1267 | SET_OF_constraint, |
| 1268 | SET_OF_decode_ber, |
| 1269 | SET_OF_encode_der, |
| 1270 | SET_OF_decode_xer, |
| 1271 | SET_OF_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1272 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1273 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1274 | asn_DEF_NamedSetOfNULL_tags_1, |
| 1275 | sizeof(asn_DEF_NamedSetOfNULL_tags_1) |
| 1276 | /sizeof(asn_DEF_NamedSetOfNULL_tags_1[0]), /* 1 */ |
| 1277 | asn_DEF_NamedSetOfNULL_tags_1, /* Same as above */ |
| 1278 | sizeof(asn_DEF_NamedSetOfNULL_tags_1) |
| 1279 | /sizeof(asn_DEF_NamedSetOfNULL_tags_1[0]), /* 1 */ |
| 1280 | 0, /* No PER visible constraints */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1281 | asn_MBR_NamedSetOfNULL_1, |
| 1282 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1283 | &asn_SPC_NamedSetOfNULL_specs_1 /* Additional specs */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1284 | }; |
| 1285 | |
| 1286 | |
| 1287 | /*** <<< INCLUDES [NamedSetOfREAL] >>> ***/ |
| 1288 | |
| 1289 | #include <REAL.h> |
| 1290 | #include <asn_SET_OF.h> |
| 1291 | #include <constr_SET_OF.h> |
| 1292 | |
| 1293 | /*** <<< TYPE-DECLS [NamedSetOfREAL] >>> ***/ |
| 1294 | |
| 1295 | typedef struct NamedSetOfREAL { |
| 1296 | A_SET_OF(REAL_t) list; |
| 1297 | |
| 1298 | /* Context for parsing across buffer boundaries */ |
| 1299 | asn_struct_ctx_t _asn_ctx; |
| 1300 | } NamedSetOfREAL_t; |
| 1301 | |
| 1302 | /*** <<< FUNC-DECLS [NamedSetOfREAL] >>> ***/ |
| 1303 | |
| 1304 | extern asn_TYPE_descriptor_t asn_DEF_NamedSetOfREAL; |
| 1305 | |
| 1306 | /*** <<< STAT-DEFS [NamedSetOfREAL] >>> ***/ |
| 1307 | |
| 1308 | static asn_TYPE_member_t asn_MBR_NamedSetOfREAL_1[] = { |
| 1309 | { ATF_POINTER, 0, 0, |
| 1310 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), |
| 1311 | .tag_mode = 0, |
| 1312 | .type = &asn_DEF_REAL, |
| 1313 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1314 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 1315 | .default_value = 0, |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1316 | .name = "name" |
| 1317 | }, |
| 1318 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1319 | static ber_tlv_tag_t asn_DEF_NamedSetOfREAL_tags_1[] = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1320 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 1321 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1322 | static asn_SET_OF_specifics_t asn_SPC_NamedSetOfREAL_specs_1 = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1323 | sizeof(struct NamedSetOfREAL), |
| 1324 | offsetof(struct NamedSetOfREAL, _asn_ctx), |
| 1325 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 1326 | }; |
| 1327 | asn_TYPE_descriptor_t asn_DEF_NamedSetOfREAL = { |
| 1328 | "NamedSetOfREAL", |
| 1329 | "NamedSetOfREAL", |
| 1330 | SET_OF_free, |
| 1331 | SET_OF_print, |
| 1332 | SET_OF_constraint, |
| 1333 | SET_OF_decode_ber, |
| 1334 | SET_OF_encode_der, |
| 1335 | SET_OF_decode_xer, |
| 1336 | SET_OF_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1337 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1338 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1339 | asn_DEF_NamedSetOfREAL_tags_1, |
| 1340 | sizeof(asn_DEF_NamedSetOfREAL_tags_1) |
| 1341 | /sizeof(asn_DEF_NamedSetOfREAL_tags_1[0]), /* 1 */ |
| 1342 | asn_DEF_NamedSetOfREAL_tags_1, /* Same as above */ |
| 1343 | sizeof(asn_DEF_NamedSetOfREAL_tags_1) |
| 1344 | /sizeof(asn_DEF_NamedSetOfREAL_tags_1[0]), /* 1 */ |
| 1345 | 0, /* No PER visible constraints */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1346 | asn_MBR_NamedSetOfREAL_1, |
| 1347 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1348 | &asn_SPC_NamedSetOfREAL_specs_1 /* Additional specs */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1349 | }; |
| 1350 | |
| 1351 | |
| 1352 | /*** <<< INCLUDES [NamedSetOfEnums] >>> ***/ |
| 1353 | |
| 1354 | #include <ENUMERATED.h> |
| 1355 | #include <asn_SET_OF.h> |
| 1356 | #include <constr_SET_OF.h> |
| 1357 | |
| 1358 | /*** <<< DEPS [NamedSetOfEnums] >>> ***/ |
| 1359 | |
| 1360 | typedef enum name { |
| 1361 | name_one = 0, |
| 1362 | name_oneMore = 1 |
Lev Walkin | 171487e | 2006-03-21 07:25:18 +0000 | [diff] [blame] | 1363 | } e_name; |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1364 | |
| 1365 | /*** <<< TYPE-DECLS [NamedSetOfEnums] >>> ***/ |
| 1366 | |
| 1367 | typedef struct NamedSetOfEnums { |
| 1368 | A_SET_OF(ENUMERATED_t) list; |
| 1369 | |
| 1370 | /* Context for parsing across buffer boundaries */ |
| 1371 | asn_struct_ctx_t _asn_ctx; |
| 1372 | } NamedSetOfEnums_t; |
| 1373 | |
| 1374 | /*** <<< FUNC-DECLS [NamedSetOfEnums] >>> ***/ |
| 1375 | |
| 1376 | /* extern asn_TYPE_descriptor_t asn_DEF_name_2; // (Use -fall-defs-global to expose) */ |
| 1377 | extern asn_TYPE_descriptor_t asn_DEF_NamedSetOfEnums; |
| 1378 | |
| 1379 | /*** <<< CODE [NamedSetOfEnums] >>> ***/ |
| 1380 | |
| 1381 | static int |
| 1382 | name_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 1383 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1384 | /* Replace with underlying type checker */ |
| 1385 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 1386 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1387 | } |
| 1388 | |
| 1389 | /* |
| 1390 | * This type is implemented using ENUMERATED, |
| 1391 | * so here we adjust the DEF accordingly. |
| 1392 | */ |
| 1393 | static void |
| 1394 | name_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 1395 | td->free_struct = asn_DEF_ENUMERATED.free_struct; |
| 1396 | td->print_struct = asn_DEF_ENUMERATED.print_struct; |
| 1397 | td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder; |
| 1398 | td->der_encoder = asn_DEF_ENUMERATED.der_encoder; |
| 1399 | td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder; |
| 1400 | td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1401 | td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder; |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1402 | td->uper_encoder = asn_DEF_ENUMERATED.uper_encoder; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1403 | if(!td->per_constraints) |
| 1404 | td->per_constraints = asn_DEF_ENUMERATED.per_constraints; |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1405 | td->elements = asn_DEF_ENUMERATED.elements; |
| 1406 | td->elements_count = asn_DEF_ENUMERATED.elements_count; |
| 1407 | /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */ |
| 1408 | } |
| 1409 | |
| 1410 | static void |
| 1411 | name_2_free(asn_TYPE_descriptor_t *td, |
| 1412 | void *struct_ptr, int contents_only) { |
| 1413 | name_2_inherit_TYPE_descriptor(td); |
| 1414 | td->free_struct(td, struct_ptr, contents_only); |
| 1415 | } |
| 1416 | |
| 1417 | static int |
| 1418 | name_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1419 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1420 | name_2_inherit_TYPE_descriptor(td); |
| 1421 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1422 | } |
| 1423 | |
| 1424 | static asn_dec_rval_t |
| 1425 | name_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1426 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1427 | name_2_inherit_TYPE_descriptor(td); |
| 1428 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1429 | } |
| 1430 | |
| 1431 | static asn_enc_rval_t |
| 1432 | name_2_encode_der(asn_TYPE_descriptor_t *td, |
| 1433 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1434 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1435 | name_2_inherit_TYPE_descriptor(td); |
| 1436 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1437 | } |
| 1438 | |
| 1439 | static asn_dec_rval_t |
| 1440 | name_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1441 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1442 | name_2_inherit_TYPE_descriptor(td); |
| 1443 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1444 | } |
| 1445 | |
| 1446 | static asn_enc_rval_t |
| 1447 | name_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1448 | int ilevel, enum xer_encoder_flags_e flags, |
| 1449 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1450 | name_2_inherit_TYPE_descriptor(td); |
| 1451 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1452 | } |
| 1453 | |
| 1454 | |
| 1455 | /*** <<< STAT-DEFS [NamedSetOfEnums] >>> ***/ |
| 1456 | |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1457 | static asn_INTEGER_enum_map_t asn_MAP_name_value2enum_2[] = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1458 | { 0, 3, "one" }, |
| 1459 | { 1, 7, "oneMore" } |
| 1460 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1461 | static unsigned int asn_MAP_name_enum2value_2[] = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1462 | 0, /* one(0) */ |
| 1463 | 1 /* oneMore(1) */ |
| 1464 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1465 | static asn_INTEGER_specifics_t asn_SPC_name_specs_2 = { |
| 1466 | asn_MAP_name_value2enum_2, /* "tag" => N; sorted by tag */ |
| 1467 | asn_MAP_name_enum2value_2, /* N => "tag"; sorted by N */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1468 | 2, /* Number of elements in the maps */ |
| 1469 | 0, /* Enumeration is not extensible */ |
| 1470 | 1 /* Strict enumeration */ |
| 1471 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1472 | static ber_tlv_tag_t asn_DEF_name_tags_2[] = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1473 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 1474 | }; |
| 1475 | static /* Use -fall-defs-global to expose */ |
| 1476 | asn_TYPE_descriptor_t asn_DEF_name_2 = { |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1477 | "ENUMERATED", |
| 1478 | "ENUMERATED", |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1479 | name_2_free, |
| 1480 | name_2_print, |
| 1481 | name_2_constraint, |
| 1482 | name_2_decode_ber, |
| 1483 | name_2_encode_der, |
| 1484 | name_2_decode_xer, |
| 1485 | name_2_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1486 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1487 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1488 | asn_DEF_name_tags_2, |
| 1489 | sizeof(asn_DEF_name_tags_2) |
| 1490 | /sizeof(asn_DEF_name_tags_2[0]), /* 1 */ |
| 1491 | asn_DEF_name_tags_2, /* Same as above */ |
| 1492 | sizeof(asn_DEF_name_tags_2) |
| 1493 | /sizeof(asn_DEF_name_tags_2[0]), /* 1 */ |
| 1494 | 0, /* No PER visible constraints */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1495 | 0, 0, /* Defined elsewhere */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1496 | &asn_SPC_name_specs_2 /* Additional specs */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1497 | }; |
| 1498 | |
| 1499 | static asn_TYPE_member_t asn_MBR_NamedSetOfEnums_1[] = { |
| 1500 | { ATF_POINTER, 0, 0, |
| 1501 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), |
| 1502 | .tag_mode = 0, |
| 1503 | .type = &asn_DEF_name_2, |
| 1504 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1505 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 1506 | .default_value = 0, |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1507 | .name = "name" |
| 1508 | }, |
| 1509 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1510 | static ber_tlv_tag_t asn_DEF_NamedSetOfEnums_tags_1[] = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1511 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 1512 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1513 | static asn_SET_OF_specifics_t asn_SPC_NamedSetOfEnums_specs_1 = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1514 | sizeof(struct NamedSetOfEnums), |
| 1515 | offsetof(struct NamedSetOfEnums, _asn_ctx), |
| 1516 | 1, /* XER encoding is XMLValueList */ |
| 1517 | }; |
| 1518 | asn_TYPE_descriptor_t asn_DEF_NamedSetOfEnums = { |
| 1519 | "NamedSetOfEnums", |
| 1520 | "NamedSetOfEnums", |
| 1521 | SET_OF_free, |
| 1522 | SET_OF_print, |
| 1523 | SET_OF_constraint, |
| 1524 | SET_OF_decode_ber, |
| 1525 | SET_OF_encode_der, |
| 1526 | SET_OF_decode_xer, |
| 1527 | SET_OF_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1528 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1529 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1530 | asn_DEF_NamedSetOfEnums_tags_1, |
| 1531 | sizeof(asn_DEF_NamedSetOfEnums_tags_1) |
| 1532 | /sizeof(asn_DEF_NamedSetOfEnums_tags_1[0]), /* 1 */ |
| 1533 | asn_DEF_NamedSetOfEnums_tags_1, /* Same as above */ |
| 1534 | sizeof(asn_DEF_NamedSetOfEnums_tags_1) |
| 1535 | /sizeof(asn_DEF_NamedSetOfEnums_tags_1[0]), /* 1 */ |
| 1536 | 0, /* No PER visible constraints */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1537 | asn_MBR_NamedSetOfEnums_1, |
| 1538 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1539 | &asn_SPC_NamedSetOfEnums_specs_1 /* Additional specs */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1540 | }; |
| 1541 | |
| 1542 | |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 1543 | /*** <<< INCLUDES [SequenceOf] >>> ***/ |
Lev Walkin | 0ef9f14 | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1544 | |
| 1545 | #include <INTEGER.h> |
| 1546 | #include <asn_SEQUENCE_OF.h> |
| 1547 | #include <constr_SEQUENCE_OF.h> |
| 1548 | |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 1549 | /*** <<< TYPE-DECLS [SequenceOf] >>> ***/ |
Lev Walkin | 0ef9f14 | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1550 | |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 1551 | typedef struct SequenceOf { |
Lev Walkin | 0ef9f14 | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1552 | A_SEQUENCE_OF(INTEGER_t) list; |
| 1553 | |
| 1554 | /* Context for parsing across buffer boundaries */ |
| 1555 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 1556 | } SequenceOf_t; |
Lev Walkin | 0ef9f14 | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1557 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 1558 | /*** <<< FUNC-DECLS [SequenceOf] >>> ***/ |
| 1559 | |
| 1560 | extern asn_TYPE_descriptor_t asn_DEF_SequenceOf; |
| 1561 | |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 1562 | /*** <<< STAT-DEFS [SequenceOf] >>> ***/ |
Lev Walkin | 0ef9f14 | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1563 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1564 | static asn_TYPE_member_t asn_MBR_SequenceOf_1[] = { |
Lev Walkin | 8eb4b57 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 1565 | { ATF_POINTER, 0, 0, |
Lev Walkin | 0ef9f14 | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1566 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 1567 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 1568 | .type = &asn_DEF_INTEGER, |
Lev Walkin | 0ef9f14 | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1569 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1570 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 1571 | .default_value = 0, |
Lev Walkin | 0ef9f14 | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1572 | .name = "id" |
| 1573 | }, |
| 1574 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1575 | static ber_tlv_tag_t asn_DEF_SequenceOf_tags_1[] = { |
Lev Walkin | 0ef9f14 | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1576 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 1577 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1578 | static asn_SET_OF_specifics_t asn_SPC_SequenceOf_specs_1 = { |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 1579 | sizeof(struct SequenceOf), |
| 1580 | offsetof(struct SequenceOf, _asn_ctx), |
Lev Walkin | 0ef9f14 | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1581 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 1582 | }; |
Lev Walkin | 843a246 | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 1583 | asn_TYPE_descriptor_t asn_DEF_SequenceOf = { |
| 1584 | "SequenceOf", |
| 1585 | "SequenceOf", |
Lev Walkin | 0ef9f14 | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1586 | SEQUENCE_OF_free, |
| 1587 | SEQUENCE_OF_print, |
| 1588 | SEQUENCE_OF_constraint, |
| 1589 | SEQUENCE_OF_decode_ber, |
| 1590 | SEQUENCE_OF_encode_der, |
| 1591 | SEQUENCE_OF_decode_xer, |
| 1592 | SEQUENCE_OF_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1593 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 0ef9f14 | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1594 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1595 | asn_DEF_SequenceOf_tags_1, |
| 1596 | sizeof(asn_DEF_SequenceOf_tags_1) |
| 1597 | /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */ |
| 1598 | asn_DEF_SequenceOf_tags_1, /* Same as above */ |
| 1599 | sizeof(asn_DEF_SequenceOf_tags_1) |
| 1600 | /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */ |
| 1601 | 0, /* No PER visible constraints */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1602 | asn_MBR_SequenceOf_1, |
Lev Walkin | 0ef9f14 | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1603 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1604 | &asn_SPC_SequenceOf_specs_1 /* Additional specs */ |
Lev Walkin | 0ef9f14 | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1605 | }; |
| 1606 | |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1607 | |
| 1608 | /*** <<< INCLUDES [SeqOfZuka] >>> ***/ |
| 1609 | |
| 1610 | #include <NULL.h> |
| 1611 | #include <asn_SEQUENCE_OF.h> |
| 1612 | #include <constr_SEQUENCE_OF.h> |
| 1613 | |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1614 | /*** <<< TYPE-DECLS [SeqOfZuka] >>> ***/ |
| 1615 | |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1616 | typedef struct SeqOfZuka { |
| 1617 | A_SEQUENCE_OF(NULL_t) list; |
| 1618 | |
| 1619 | /* Context for parsing across buffer boundaries */ |
| 1620 | asn_struct_ctx_t _asn_ctx; |
| 1621 | } SeqOfZuka_t; |
| 1622 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 1623 | /*** <<< FUNC-DECLS [SeqOfZuka] >>> ***/ |
| 1624 | |
| 1625 | extern asn_TYPE_descriptor_t asn_DEF_SeqOfZuka; |
| 1626 | |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1627 | /*** <<< STAT-DEFS [SeqOfZuka] >>> ***/ |
| 1628 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1629 | static asn_TYPE_member_t asn_MBR_SeqOfZuka_1[] = { |
Lev Walkin | 8eb4b57 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 1630 | { ATF_POINTER, 0, 0, |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1631 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), |
| 1632 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 1633 | .type = &asn_DEF_NULL, |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1634 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1635 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 1636 | .default_value = 0, |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1637 | .name = "zuka" |
| 1638 | }, |
| 1639 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1640 | static ber_tlv_tag_t asn_DEF_SeqOfZuka_tags_1[] = { |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1641 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 1642 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1643 | static asn_SET_OF_specifics_t asn_SPC_SeqOfZuka_specs_1 = { |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1644 | sizeof(struct SeqOfZuka), |
| 1645 | offsetof(struct SeqOfZuka, _asn_ctx), |
| 1646 | 1, /* XER encoding is XMLValueList */ |
| 1647 | }; |
| 1648 | asn_TYPE_descriptor_t asn_DEF_SeqOfZuka = { |
| 1649 | "SeqOfZuka", |
| 1650 | "SeqOfZuka", |
| 1651 | SEQUENCE_OF_free, |
| 1652 | SEQUENCE_OF_print, |
| 1653 | SEQUENCE_OF_constraint, |
| 1654 | SEQUENCE_OF_decode_ber, |
| 1655 | SEQUENCE_OF_encode_der, |
| 1656 | SEQUENCE_OF_decode_xer, |
| 1657 | SEQUENCE_OF_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1658 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1659 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1660 | asn_DEF_SeqOfZuka_tags_1, |
| 1661 | sizeof(asn_DEF_SeqOfZuka_tags_1) |
| 1662 | /sizeof(asn_DEF_SeqOfZuka_tags_1[0]), /* 1 */ |
| 1663 | asn_DEF_SeqOfZuka_tags_1, /* Same as above */ |
| 1664 | sizeof(asn_DEF_SeqOfZuka_tags_1) |
| 1665 | /sizeof(asn_DEF_SeqOfZuka_tags_1[0]), /* 1 */ |
| 1666 | 0, /* No PER visible constraints */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1667 | asn_MBR_SeqOfZuka_1, |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1668 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1669 | &asn_SPC_SeqOfZuka_specs_1 /* Additional specs */ |
Lev Walkin | f5db614 | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1670 | }; |
| 1671 | |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1672 | |
| 1673 | /*** <<< INCLUDES [SetOfChoice] >>> ***/ |
| 1674 | |
| 1675 | #include <asn_SET_OF.h> |
| 1676 | #include <constr_SET_OF.h> |
| 1677 | |
| 1678 | /*** <<< FWD-DECLS [SetOfChoice] >>> ***/ |
| 1679 | |
| 1680 | struct SimpleChoice; |
| 1681 | |
| 1682 | /*** <<< TYPE-DECLS [SetOfChoice] >>> ***/ |
| 1683 | |
| 1684 | typedef struct SetOfChoice { |
| 1685 | A_SET_OF(struct SimpleChoice) list; |
| 1686 | |
| 1687 | /* Context for parsing across buffer boundaries */ |
| 1688 | asn_struct_ctx_t _asn_ctx; |
| 1689 | } SetOfChoice_t; |
| 1690 | |
| 1691 | /*** <<< FUNC-DECLS [SetOfChoice] >>> ***/ |
| 1692 | |
| 1693 | extern asn_TYPE_descriptor_t asn_DEF_SetOfChoice; |
| 1694 | |
| 1695 | /*** <<< POST-INCLUDE [SetOfChoice] >>> ***/ |
| 1696 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 1697 | #include "SimpleChoice.h" |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1698 | |
| 1699 | /*** <<< STAT-DEFS [SetOfChoice] >>> ***/ |
| 1700 | |
| 1701 | static asn_TYPE_member_t asn_MBR_SetOfChoice_1[] = { |
| 1702 | { ATF_POINTER, 0, 0, |
| 1703 | .tag = -1 /* Ambiguous tag (CHOICE?) */, |
| 1704 | .tag_mode = 0, |
| 1705 | .type = &asn_DEF_SimpleChoice, |
| 1706 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1707 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 1708 | .default_value = 0, |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1709 | .name = "" |
| 1710 | }, |
| 1711 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1712 | static ber_tlv_tag_t asn_DEF_SetOfChoice_tags_1[] = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1713 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 1714 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1715 | static asn_SET_OF_specifics_t asn_SPC_SetOfChoice_specs_1 = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1716 | sizeof(struct SetOfChoice), |
| 1717 | offsetof(struct SetOfChoice, _asn_ctx), |
Lev Walkin | d1bfea6 | 2005-11-08 03:06:16 +0000 | [diff] [blame] | 1718 | 2, /* XER encoding is XMLValueList */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1719 | }; |
| 1720 | asn_TYPE_descriptor_t asn_DEF_SetOfChoice = { |
| 1721 | "SetOfChoice", |
| 1722 | "SetOfChoice", |
| 1723 | SET_OF_free, |
| 1724 | SET_OF_print, |
| 1725 | SET_OF_constraint, |
| 1726 | SET_OF_decode_ber, |
| 1727 | SET_OF_encode_der, |
| 1728 | SET_OF_decode_xer, |
| 1729 | SET_OF_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1730 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1731 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1732 | asn_DEF_SetOfChoice_tags_1, |
| 1733 | sizeof(asn_DEF_SetOfChoice_tags_1) |
| 1734 | /sizeof(asn_DEF_SetOfChoice_tags_1[0]), /* 1 */ |
| 1735 | asn_DEF_SetOfChoice_tags_1, /* Same as above */ |
| 1736 | sizeof(asn_DEF_SetOfChoice_tags_1) |
| 1737 | /sizeof(asn_DEF_SetOfChoice_tags_1[0]), /* 1 */ |
| 1738 | 0, /* No PER visible constraints */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1739 | asn_MBR_SetOfChoice_1, |
| 1740 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1741 | &asn_SPC_SetOfChoice_specs_1 /* Additional specs */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1742 | }; |
| 1743 | |
| 1744 | |
| 1745 | /*** <<< INCLUDES [NamedSetOfChoice] >>> ***/ |
| 1746 | |
| 1747 | #include <asn_SET_OF.h> |
| 1748 | #include <constr_SET_OF.h> |
| 1749 | |
| 1750 | /*** <<< FWD-DECLS [NamedSetOfChoice] >>> ***/ |
| 1751 | |
| 1752 | struct SimpleChoice; |
| 1753 | |
| 1754 | /*** <<< TYPE-DECLS [NamedSetOfChoice] >>> ***/ |
| 1755 | |
| 1756 | typedef struct NamedSetOfChoice { |
| 1757 | A_SET_OF(struct SimpleChoice) list; |
| 1758 | |
| 1759 | /* Context for parsing across buffer boundaries */ |
| 1760 | asn_struct_ctx_t _asn_ctx; |
| 1761 | } NamedSetOfChoice_t; |
| 1762 | |
| 1763 | /*** <<< FUNC-DECLS [NamedSetOfChoice] >>> ***/ |
| 1764 | |
| 1765 | extern asn_TYPE_descriptor_t asn_DEF_NamedSetOfChoice; |
| 1766 | |
| 1767 | /*** <<< POST-INCLUDE [NamedSetOfChoice] >>> ***/ |
| 1768 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 1769 | #include "SimpleChoice.h" |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1770 | |
| 1771 | /*** <<< STAT-DEFS [NamedSetOfChoice] >>> ***/ |
| 1772 | |
| 1773 | static asn_TYPE_member_t asn_MBR_NamedSetOfChoice_1[] = { |
| 1774 | { ATF_POINTER, 0, 0, |
| 1775 | .tag = -1 /* Ambiguous tag (CHOICE?) */, |
| 1776 | .tag_mode = 0, |
| 1777 | .type = &asn_DEF_SimpleChoice, |
| 1778 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1779 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 1780 | .default_value = 0, |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1781 | .name = "whatever" |
| 1782 | }, |
| 1783 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1784 | static ber_tlv_tag_t asn_DEF_NamedSetOfChoice_tags_1[] = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1785 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 1786 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1787 | static asn_SET_OF_specifics_t asn_SPC_NamedSetOfChoice_specs_1 = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1788 | sizeof(struct NamedSetOfChoice), |
| 1789 | offsetof(struct NamedSetOfChoice, _asn_ctx), |
Lev Walkin | d1bfea6 | 2005-11-08 03:06:16 +0000 | [diff] [blame] | 1790 | 2, /* XER encoding is XMLValueList */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1791 | }; |
| 1792 | asn_TYPE_descriptor_t asn_DEF_NamedSetOfChoice = { |
| 1793 | "NamedSetOfChoice", |
| 1794 | "NamedSetOfChoice", |
| 1795 | SET_OF_free, |
| 1796 | SET_OF_print, |
| 1797 | SET_OF_constraint, |
| 1798 | SET_OF_decode_ber, |
| 1799 | SET_OF_encode_der, |
| 1800 | SET_OF_decode_xer, |
| 1801 | SET_OF_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1802 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1803 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1804 | asn_DEF_NamedSetOfChoice_tags_1, |
| 1805 | sizeof(asn_DEF_NamedSetOfChoice_tags_1) |
| 1806 | /sizeof(asn_DEF_NamedSetOfChoice_tags_1[0]), /* 1 */ |
| 1807 | asn_DEF_NamedSetOfChoice_tags_1, /* Same as above */ |
| 1808 | sizeof(asn_DEF_NamedSetOfChoice_tags_1) |
| 1809 | /sizeof(asn_DEF_NamedSetOfChoice_tags_1[0]), /* 1 */ |
| 1810 | 0, /* No PER visible constraints */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1811 | asn_MBR_NamedSetOfChoice_1, |
| 1812 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1813 | &asn_SPC_NamedSetOfChoice_specs_1 /* Additional specs */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1814 | }; |
| 1815 | |
| 1816 | |
| 1817 | /*** <<< INCLUDES [SimpleChoice] >>> ***/ |
| 1818 | |
| 1819 | #include <NULL.h> |
| 1820 | #include <INTEGER.h> |
| 1821 | #include <constr_CHOICE.h> |
| 1822 | |
| 1823 | /*** <<< DEPS [SimpleChoice] >>> ***/ |
| 1824 | |
| 1825 | typedef enum SimpleChoice_PR { |
| 1826 | SimpleChoice_PR_NOTHING, /* No components present */ |
| 1827 | SimpleChoice_PR_a, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1828 | SimpleChoice_PR_b |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1829 | } SimpleChoice_PR; |
| 1830 | |
| 1831 | /*** <<< TYPE-DECLS [SimpleChoice] >>> ***/ |
| 1832 | |
| 1833 | typedef struct SimpleChoice { |
| 1834 | SimpleChoice_PR present; |
| 1835 | union SimpleChoice_u { |
| 1836 | NULL_t a; |
| 1837 | INTEGER_t b; |
| 1838 | } choice; |
| 1839 | |
| 1840 | /* Context for parsing across buffer boundaries */ |
| 1841 | asn_struct_ctx_t _asn_ctx; |
| 1842 | } SimpleChoice_t; |
| 1843 | |
| 1844 | /*** <<< FUNC-DECLS [SimpleChoice] >>> ***/ |
| 1845 | |
| 1846 | extern asn_TYPE_descriptor_t asn_DEF_SimpleChoice; |
| 1847 | |
| 1848 | /*** <<< STAT-DEFS [SimpleChoice] >>> ***/ |
| 1849 | |
| 1850 | static asn_TYPE_member_t asn_MBR_SimpleChoice_1[] = { |
| 1851 | { ATF_NOFLAGS, 0, offsetof(struct SimpleChoice, choice.a), |
| 1852 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 1853 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1854 | .type = &asn_DEF_NULL, |
| 1855 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1856 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 1857 | .default_value = 0, |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1858 | .name = "a" |
| 1859 | }, |
| 1860 | { ATF_NOFLAGS, 0, offsetof(struct SimpleChoice, choice.b), |
| 1861 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 1862 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 1863 | .type = &asn_DEF_INTEGER, |
| 1864 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1865 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 1866 | .default_value = 0, |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1867 | .name = "b" |
| 1868 | }, |
| 1869 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1870 | static asn_TYPE_tag2member_t asn_MAP_SimpleChoice_tag2el_1[] = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1871 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 79 */ |
| 1872 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* b at 79 */ |
| 1873 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1874 | static asn_CHOICE_specifics_t asn_SPC_SimpleChoice_specs_1 = { |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1875 | sizeof(struct SimpleChoice), |
| 1876 | offsetof(struct SimpleChoice, _asn_ctx), |
| 1877 | offsetof(struct SimpleChoice, present), |
| 1878 | sizeof(((struct SimpleChoice *)0)->present), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1879 | asn_MAP_SimpleChoice_tag2el_1, |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1880 | 2, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1881 | .canonical_order = 0, |
| 1882 | .ext_start = -1 /* Extensions start */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1883 | }; |
| 1884 | asn_TYPE_descriptor_t asn_DEF_SimpleChoice = { |
| 1885 | "SimpleChoice", |
| 1886 | "SimpleChoice", |
| 1887 | CHOICE_free, |
| 1888 | CHOICE_print, |
| 1889 | CHOICE_constraint, |
| 1890 | CHOICE_decode_ber, |
| 1891 | CHOICE_encode_der, |
| 1892 | CHOICE_decode_xer, |
| 1893 | CHOICE_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1894 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1895 | CHOICE_outmost_tag, |
| 1896 | 0, /* No effective tags (pointer) */ |
| 1897 | 0, /* No effective tags (count) */ |
| 1898 | 0, /* No tags (pointer) */ |
| 1899 | 0, /* No tags (count) */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1900 | 0, /* No PER visible constraints */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1901 | asn_MBR_SimpleChoice_1, |
| 1902 | 2, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1903 | &asn_SPC_SimpleChoice_specs_1 /* Additional specs */ |
Lev Walkin | 5ab96cd | 2005-11-07 15:26:47 +0000 | [diff] [blame] | 1904 | }; |
| 1905 | |