Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [A-noc] >>> ***/ |
| 3 | |
| 4 | #include <NativeInteger.h> |
| 5 | |
| 6 | /*** <<< TYPE-DECLS [A-noc] >>> ***/ |
| 7 | |
| 8 | typedef long A_noc_t; |
| 9 | |
| 10 | /*** <<< FUNC-DECLS [A-noc] >>> ***/ |
| 11 | |
| 12 | extern asn_TYPE_descriptor_t asn_DEF_A_noc; |
| 13 | asn_struct_free_f A_noc_free; |
| 14 | asn_struct_print_f A_noc_print; |
| 15 | asn_constr_check_f A_noc_constraint; |
| 16 | ber_type_decoder_f A_noc_decode_ber; |
| 17 | der_type_encoder_f A_noc_encode_der; |
| 18 | xer_type_decoder_f A_noc_decode_xer; |
| 19 | xer_type_encoder_f A_noc_encode_xer; |
| 20 | oer_type_decoder_f A_noc_decode_oer; |
| 21 | oer_type_encoder_f A_noc_encode_oer; |
| 22 | |
| 23 | /*** <<< CODE [A-noc] >>> ***/ |
| 24 | |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 25 | /* |
| 26 | * This type is implemented using NativeInteger, |
| 27 | * so here we adjust the DEF accordingly. |
| 28 | */ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 29 | |
| 30 | /*** <<< STAT-DEFS [A-noc] >>> ***/ |
| 31 | |
| 32 | static const ber_tlv_tag_t asn_DEF_A_noc_tags_1[] = { |
| 33 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 34 | }; |
| 35 | asn_TYPE_descriptor_t asn_DEF_A_noc = { |
| 36 | "A-noc", |
| 37 | "A-noc", |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 38 | NativeInteger_free, |
| 39 | NativeInteger_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 40 | NativeInteger_compare, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 41 | NativeInteger_constraint, |
| 42 | NativeInteger_decode_ber, |
| 43 | NativeInteger_encode_der, |
| 44 | NativeInteger_decode_xer, |
| 45 | NativeInteger_encode_xer, |
| 46 | NativeInteger_decode_oer, |
| 47 | NativeInteger_encode_oer, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 48 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 49 | 0, /* Use generic outmost tag fetcher */ |
| 50 | asn_DEF_A_noc_tags_1, |
| 51 | sizeof(asn_DEF_A_noc_tags_1) |
| 52 | /sizeof(asn_DEF_A_noc_tags_1[0]), /* 1 */ |
| 53 | asn_DEF_A_noc_tags_1, /* Same as above */ |
| 54 | sizeof(asn_DEF_A_noc_tags_1) |
| 55 | /sizeof(asn_DEF_A_noc_tags_1[0]), /* 1 */ |
| 56 | 0, /* No OER visible constraints */ |
| 57 | 0, /* No PER visible constraints */ |
| 58 | 0, 0, /* No members */ |
| 59 | 0 /* No specifics */ |
| 60 | }; |
| 61 | |
| 62 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 63 | /*** <<< INCLUDES [B-0-0] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 64 | |
| 65 | #include <NativeInteger.h> |
| 66 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 67 | /*** <<< TYPE-DECLS [B-0-0] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 68 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 69 | typedef long B_0_0_t; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 70 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 71 | /*** <<< FUNC-DECLS [B-0-0] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 72 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 73 | extern asn_TYPE_descriptor_t asn_DEF_B_0_0; |
| 74 | asn_struct_free_f B_0_0_free; |
| 75 | asn_struct_print_f B_0_0_print; |
| 76 | asn_constr_check_f B_0_0_constraint; |
| 77 | ber_type_decoder_f B_0_0_decode_ber; |
| 78 | der_type_encoder_f B_0_0_encode_der; |
| 79 | xer_type_decoder_f B_0_0_decode_xer; |
| 80 | xer_type_encoder_f B_0_0_encode_xer; |
| 81 | oer_type_decoder_f B_0_0_decode_oer; |
| 82 | oer_type_encoder_f B_0_0_encode_oer; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 83 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 84 | /*** <<< CODE [B-0-0] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 85 | |
| 86 | int |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 87 | B_0_0_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 88 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 89 | long value; |
| 90 | |
| 91 | if(!sptr) { |
| 92 | ASN__CTFAIL(app_key, td, sptr, |
| 93 | "%s: value not given (%s:%d)", |
| 94 | td->name, __FILE__, __LINE__); |
| 95 | return -1; |
| 96 | } |
| 97 | |
| 98 | value = *(const long *)sptr; |
| 99 | |
| 100 | if((value == 0)) { |
| 101 | /* Constraint check succeeded */ |
| 102 | return 0; |
| 103 | } else { |
| 104 | ASN__CTFAIL(app_key, td, sptr, |
| 105 | "%s: constraint failed (%s:%d)", |
| 106 | td->name, __FILE__, __LINE__); |
| 107 | return -1; |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | /* |
| 112 | * This type is implemented using NativeInteger, |
| 113 | * so here we adjust the DEF accordingly. |
| 114 | */ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 115 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 116 | /*** <<< CTDEFS [B-0-0] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 117 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 118 | static asn_oer_constraints_t asn_OER_type_B_0_0_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 119 | { 1, 1 } /* (0..0) */, |
| 120 | -1}; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 121 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 122 | /*** <<< STAT-DEFS [B-0-0] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 123 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 124 | static const ber_tlv_tag_t asn_DEF_B_0_0_tags_1[] = { |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 125 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 126 | }; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 127 | asn_TYPE_descriptor_t asn_DEF_B_0_0 = { |
| 128 | "B-0-0", |
| 129 | "B-0-0", |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 130 | NativeInteger_free, |
| 131 | NativeInteger_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 132 | NativeInteger_compare, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 133 | B_0_0_constraint, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 134 | NativeInteger_decode_ber, |
| 135 | NativeInteger_encode_der, |
| 136 | NativeInteger_decode_xer, |
| 137 | NativeInteger_encode_xer, |
| 138 | NativeInteger_decode_oer, |
| 139 | NativeInteger_encode_oer, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 140 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 141 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 142 | asn_DEF_B_0_0_tags_1, |
| 143 | sizeof(asn_DEF_B_0_0_tags_1) |
| 144 | /sizeof(asn_DEF_B_0_0_tags_1[0]), /* 1 */ |
| 145 | asn_DEF_B_0_0_tags_1, /* Same as above */ |
| 146 | sizeof(asn_DEF_B_0_0_tags_1) |
| 147 | /sizeof(asn_DEF_B_0_0_tags_1[0]), /* 1 */ |
| 148 | &asn_OER_type_B_0_0_constr_1, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 149 | 0, /* No PER visible constraints */ |
| 150 | 0, 0, /* No members */ |
| 151 | 0 /* No specifics */ |
| 152 | }; |
| 153 | |
| 154 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 155 | /*** <<< INCLUDES [C-1-2] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 156 | |
| 157 | #include <NativeInteger.h> |
| 158 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 159 | /*** <<< TYPE-DECLS [C-1-2] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 160 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 161 | typedef long C_1_2_t; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 162 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 163 | /*** <<< FUNC-DECLS [C-1-2] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 164 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 165 | extern asn_TYPE_descriptor_t asn_DEF_C_1_2; |
| 166 | asn_struct_free_f C_1_2_free; |
| 167 | asn_struct_print_f C_1_2_print; |
| 168 | asn_constr_check_f C_1_2_constraint; |
| 169 | ber_type_decoder_f C_1_2_decode_ber; |
| 170 | der_type_encoder_f C_1_2_encode_der; |
| 171 | xer_type_decoder_f C_1_2_decode_xer; |
| 172 | xer_type_encoder_f C_1_2_encode_xer; |
| 173 | oer_type_decoder_f C_1_2_decode_oer; |
| 174 | oer_type_encoder_f C_1_2_encode_oer; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 175 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 176 | /*** <<< CODE [C-1-2] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 177 | |
| 178 | int |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 179 | C_1_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 180 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 181 | long value; |
| 182 | |
| 183 | if(!sptr) { |
| 184 | ASN__CTFAIL(app_key, td, sptr, |
| 185 | "%s: value not given (%s:%d)", |
| 186 | td->name, __FILE__, __LINE__); |
| 187 | return -1; |
| 188 | } |
| 189 | |
| 190 | value = *(const long *)sptr; |
| 191 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 192 | if((value >= 1 && value <= 2)) { |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 193 | /* Constraint check succeeded */ |
| 194 | return 0; |
| 195 | } else { |
| 196 | ASN__CTFAIL(app_key, td, sptr, |
| 197 | "%s: constraint failed (%s:%d)", |
| 198 | td->name, __FILE__, __LINE__); |
| 199 | return -1; |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | /* |
| 204 | * This type is implemented using NativeInteger, |
| 205 | * so here we adjust the DEF accordingly. |
| 206 | */ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 207 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 208 | /*** <<< CTDEFS [C-1-2] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 209 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 210 | static asn_oer_constraints_t asn_OER_type_C_1_2_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 211 | { 1, 1 } /* (1..2) */, |
| 212 | -1}; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 213 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 214 | /*** <<< STAT-DEFS [C-1-2] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 215 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 216 | static const ber_tlv_tag_t asn_DEF_C_1_2_tags_1[] = { |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 217 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 218 | }; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 219 | asn_TYPE_descriptor_t asn_DEF_C_1_2 = { |
| 220 | "C-1-2", |
| 221 | "C-1-2", |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 222 | NativeInteger_free, |
| 223 | NativeInteger_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 224 | NativeInteger_compare, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 225 | C_1_2_constraint, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 226 | NativeInteger_decode_ber, |
| 227 | NativeInteger_encode_der, |
| 228 | NativeInteger_decode_xer, |
| 229 | NativeInteger_encode_xer, |
| 230 | NativeInteger_decode_oer, |
| 231 | NativeInteger_encode_oer, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 232 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 233 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 234 | asn_DEF_C_1_2_tags_1, |
| 235 | sizeof(asn_DEF_C_1_2_tags_1) |
| 236 | /sizeof(asn_DEF_C_1_2_tags_1[0]), /* 1 */ |
| 237 | asn_DEF_C_1_2_tags_1, /* Same as above */ |
| 238 | sizeof(asn_DEF_C_1_2_tags_1) |
| 239 | /sizeof(asn_DEF_C_1_2_tags_1[0]), /* 1 */ |
| 240 | &asn_OER_type_C_1_2_constr_1, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 241 | 0, /* No PER visible constraints */ |
| 242 | 0, 0, /* No members */ |
| 243 | 0 /* No specifics */ |
| 244 | }; |
| 245 | |
| 246 | |
| 247 | /*** <<< INCLUDES [D-inv] >>> ***/ |
| 248 | |
| 249 | #include <NativeInteger.h> |
| 250 | |
| 251 | /*** <<< TYPE-DECLS [D-inv] >>> ***/ |
| 252 | |
| 253 | typedef long D_inv_t; |
| 254 | |
| 255 | /*** <<< FUNC-DECLS [D-inv] >>> ***/ |
| 256 | |
| 257 | extern asn_TYPE_descriptor_t asn_DEF_D_inv; |
| 258 | asn_struct_free_f D_inv_free; |
| 259 | asn_struct_print_f D_inv_print; |
| 260 | asn_constr_check_f D_inv_constraint; |
| 261 | ber_type_decoder_f D_inv_decode_ber; |
| 262 | der_type_encoder_f D_inv_encode_der; |
| 263 | xer_type_decoder_f D_inv_decode_xer; |
| 264 | xer_type_encoder_f D_inv_encode_xer; |
| 265 | oer_type_decoder_f D_inv_decode_oer; |
| 266 | oer_type_encoder_f D_inv_encode_oer; |
| 267 | |
| 268 | /*** <<< CODE [D-inv] >>> ***/ |
| 269 | |
| 270 | int |
| 271 | D_inv_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 272 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 273 | long value; |
| 274 | |
| 275 | if(!sptr) { |
| 276 | ASN__CTFAIL(app_key, td, sptr, |
| 277 | "%s: value not given (%s:%d)", |
| 278 | td->name, __FILE__, __LINE__); |
| 279 | return -1; |
| 280 | } |
| 281 | |
| 282 | value = *(const long *)sptr; |
| 283 | |
| 284 | if((value >= 0 && value <= 10)) { |
| 285 | /* Constraint check succeeded */ |
| 286 | return 0; |
| 287 | } else { |
| 288 | ASN__CTFAIL(app_key, td, sptr, |
| 289 | "%s: constraint failed (%s:%d)", |
| 290 | td->name, __FILE__, __LINE__); |
| 291 | return -1; |
| 292 | } |
| 293 | } |
| 294 | |
| 295 | /* |
| 296 | * This type is implemented using NativeInteger, |
| 297 | * so here we adjust the DEF accordingly. |
| 298 | */ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 299 | |
| 300 | /*** <<< CTDEFS [D-inv] >>> ***/ |
| 301 | |
| 302 | static asn_oer_constraints_t asn_OER_type_D_inv_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 303 | { 0, 0 }, |
| 304 | -1}; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 305 | |
| 306 | /*** <<< STAT-DEFS [D-inv] >>> ***/ |
| 307 | |
| 308 | static const ber_tlv_tag_t asn_DEF_D_inv_tags_1[] = { |
| 309 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 310 | }; |
| 311 | asn_TYPE_descriptor_t asn_DEF_D_inv = { |
| 312 | "D-inv", |
| 313 | "D-inv", |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 314 | NativeInteger_free, |
| 315 | NativeInteger_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 316 | NativeInteger_compare, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 317 | D_inv_constraint, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 318 | NativeInteger_decode_ber, |
| 319 | NativeInteger_encode_der, |
| 320 | NativeInteger_decode_xer, |
| 321 | NativeInteger_encode_xer, |
| 322 | NativeInteger_decode_oer, |
| 323 | NativeInteger_encode_oer, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 324 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 325 | 0, /* Use generic outmost tag fetcher */ |
| 326 | asn_DEF_D_inv_tags_1, |
| 327 | sizeof(asn_DEF_D_inv_tags_1) |
| 328 | /sizeof(asn_DEF_D_inv_tags_1[0]), /* 1 */ |
| 329 | asn_DEF_D_inv_tags_1, /* Same as above */ |
| 330 | sizeof(asn_DEF_D_inv_tags_1) |
| 331 | /sizeof(asn_DEF_D_inv_tags_1[0]), /* 1 */ |
| 332 | &asn_OER_type_D_inv_constr_1, |
| 333 | 0, /* No PER visible constraints */ |
| 334 | 0, 0, /* No members */ |
| 335 | 0 /* No specifics */ |
| 336 | }; |
| 337 | |
| 338 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 339 | /*** <<< INCLUDES [E-2-5] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 340 | |
| 341 | #include <NativeInteger.h> |
| 342 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 343 | /*** <<< TYPE-DECLS [E-2-5] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 344 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 345 | typedef long E_2_5_t; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 346 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 347 | /*** <<< FUNC-DECLS [E-2-5] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 348 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 349 | extern asn_TYPE_descriptor_t asn_DEF_E_2_5; |
| 350 | asn_struct_free_f E_2_5_free; |
| 351 | asn_struct_print_f E_2_5_print; |
| 352 | asn_constr_check_f E_2_5_constraint; |
| 353 | ber_type_decoder_f E_2_5_decode_ber; |
| 354 | der_type_encoder_f E_2_5_encode_der; |
| 355 | xer_type_decoder_f E_2_5_decode_xer; |
| 356 | xer_type_encoder_f E_2_5_encode_xer; |
| 357 | oer_type_decoder_f E_2_5_decode_oer; |
| 358 | oer_type_encoder_f E_2_5_encode_oer; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 359 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 360 | /*** <<< CODE [E-2-5] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 361 | |
| 362 | int |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 363 | E_2_5_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 364 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 365 | long value; |
| 366 | |
| 367 | if(!sptr) { |
| 368 | ASN__CTFAIL(app_key, td, sptr, |
| 369 | "%s: value not given (%s:%d)", |
| 370 | td->name, __FILE__, __LINE__); |
| 371 | return -1; |
| 372 | } |
| 373 | |
| 374 | value = *(const long *)sptr; |
| 375 | |
| 376 | if((value >= 2 && value <= 5)) { |
| 377 | /* Constraint check succeeded */ |
| 378 | return 0; |
| 379 | } else { |
| 380 | ASN__CTFAIL(app_key, td, sptr, |
| 381 | "%s: constraint failed (%s:%d)", |
| 382 | td->name, __FILE__, __LINE__); |
| 383 | return -1; |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | /* |
| 388 | * This type is implemented using NativeInteger, |
| 389 | * so here we adjust the DEF accordingly. |
| 390 | */ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 391 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 392 | /*** <<< CTDEFS [E-2-5] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 393 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 394 | static asn_oer_constraints_t asn_OER_type_E_2_5_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 395 | { 1, 1 } /* (2..5) */, |
| 396 | -1}; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 397 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 398 | /*** <<< STAT-DEFS [E-2-5] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 399 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 400 | static const ber_tlv_tag_t asn_DEF_E_2_5_tags_1[] = { |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 401 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 402 | }; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 403 | asn_TYPE_descriptor_t asn_DEF_E_2_5 = { |
| 404 | "E-2-5", |
| 405 | "E-2-5", |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 406 | NativeInteger_free, |
| 407 | NativeInteger_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 408 | NativeInteger_compare, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 409 | E_2_5_constraint, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 410 | NativeInteger_decode_ber, |
| 411 | NativeInteger_encode_der, |
| 412 | NativeInteger_decode_xer, |
| 413 | NativeInteger_encode_xer, |
| 414 | NativeInteger_decode_oer, |
| 415 | NativeInteger_encode_oer, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 416 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 417 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 418 | asn_DEF_E_2_5_tags_1, |
| 419 | sizeof(asn_DEF_E_2_5_tags_1) |
| 420 | /sizeof(asn_DEF_E_2_5_tags_1[0]), /* 1 */ |
| 421 | asn_DEF_E_2_5_tags_1, /* Same as above */ |
| 422 | sizeof(asn_DEF_E_2_5_tags_1) |
| 423 | /sizeof(asn_DEF_E_2_5_tags_1[0]), /* 1 */ |
| 424 | &asn_OER_type_E_2_5_constr_1, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 425 | 0, /* No PER visible constraints */ |
| 426 | 0, 0, /* No members */ |
| 427 | 0 /* No specifics */ |
| 428 | }; |
| 429 | |
| 430 | |
| 431 | /*** <<< INCLUDES [F-inv] >>> ***/ |
| 432 | |
| 433 | #include <NativeInteger.h> |
| 434 | |
| 435 | /*** <<< TYPE-DECLS [F-inv] >>> ***/ |
| 436 | |
| 437 | typedef long F_inv_t; |
| 438 | |
| 439 | /*** <<< FUNC-DECLS [F-inv] >>> ***/ |
| 440 | |
| 441 | extern asn_TYPE_descriptor_t asn_DEF_F_inv; |
| 442 | asn_struct_free_f F_inv_free; |
| 443 | asn_struct_print_f F_inv_print; |
| 444 | asn_constr_check_f F_inv_constraint; |
| 445 | ber_type_decoder_f F_inv_decode_ber; |
| 446 | der_type_encoder_f F_inv_encode_der; |
| 447 | xer_type_decoder_f F_inv_decode_xer; |
| 448 | xer_type_encoder_f F_inv_encode_xer; |
| 449 | oer_type_decoder_f F_inv_decode_oer; |
| 450 | oer_type_encoder_f F_inv_encode_oer; |
| 451 | |
| 452 | /*** <<< CODE [F-inv] >>> ***/ |
| 453 | |
| 454 | int |
| 455 | F_inv_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 456 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 457 | long value; |
| 458 | |
| 459 | if(!sptr) { |
| 460 | ASN__CTFAIL(app_key, td, sptr, |
| 461 | "%s: value not given (%s:%d)", |
| 462 | td->name, __FILE__, __LINE__); |
| 463 | return -1; |
| 464 | } |
| 465 | |
| 466 | value = *(const long *)sptr; |
| 467 | |
| 468 | if((value >= 2 && value <= 5)) { |
| 469 | /* Constraint check succeeded */ |
| 470 | return 0; |
| 471 | } else { |
| 472 | ASN__CTFAIL(app_key, td, sptr, |
| 473 | "%s: constraint failed (%s:%d)", |
| 474 | td->name, __FILE__, __LINE__); |
| 475 | return -1; |
| 476 | } |
| 477 | } |
| 478 | |
| 479 | /* |
| 480 | * This type is implemented using NativeInteger, |
| 481 | * so here we adjust the DEF accordingly. |
| 482 | */ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 483 | |
| 484 | /*** <<< CTDEFS [F-inv] >>> ***/ |
| 485 | |
| 486 | static asn_oer_constraints_t asn_OER_type_F_inv_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 487 | { 1, 1 } /* (0..10) */, |
| 488 | -1}; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 489 | |
| 490 | /*** <<< STAT-DEFS [F-inv] >>> ***/ |
| 491 | |
| 492 | static const ber_tlv_tag_t asn_DEF_F_inv_tags_1[] = { |
| 493 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 494 | }; |
| 495 | asn_TYPE_descriptor_t asn_DEF_F_inv = { |
| 496 | "F-inv", |
| 497 | "F-inv", |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 498 | NativeInteger_free, |
| 499 | NativeInteger_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 500 | NativeInteger_compare, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 501 | F_inv_constraint, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 502 | NativeInteger_decode_ber, |
| 503 | NativeInteger_encode_der, |
| 504 | NativeInteger_decode_xer, |
| 505 | NativeInteger_encode_xer, |
| 506 | NativeInteger_decode_oer, |
| 507 | NativeInteger_encode_oer, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 508 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 509 | 0, /* Use generic outmost tag fetcher */ |
| 510 | asn_DEF_F_inv_tags_1, |
| 511 | sizeof(asn_DEF_F_inv_tags_1) |
| 512 | /sizeof(asn_DEF_F_inv_tags_1[0]), /* 1 */ |
| 513 | asn_DEF_F_inv_tags_1, /* Same as above */ |
| 514 | sizeof(asn_DEF_F_inv_tags_1) |
| 515 | /sizeof(asn_DEF_F_inv_tags_1[0]), /* 1 */ |
| 516 | &asn_OER_type_F_inv_constr_1, |
| 517 | 0, /* No PER visible constraints */ |
| 518 | 0, 0, /* No members */ |
| 519 | 0 /* No specifics */ |
| 520 | }; |
| 521 | |
| 522 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 523 | /*** <<< INCLUDES [G-3-3] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 524 | |
| 525 | #include <NativeInteger.h> |
| 526 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 527 | /*** <<< TYPE-DECLS [G-3-3] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 528 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 529 | typedef long G_3_3_t; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 530 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 531 | /*** <<< FUNC-DECLS [G-3-3] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 532 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 533 | extern asn_TYPE_descriptor_t asn_DEF_G_3_3; |
| 534 | asn_struct_free_f G_3_3_free; |
| 535 | asn_struct_print_f G_3_3_print; |
| 536 | asn_constr_check_f G_3_3_constraint; |
| 537 | ber_type_decoder_f G_3_3_decode_ber; |
| 538 | der_type_encoder_f G_3_3_encode_der; |
| 539 | xer_type_decoder_f G_3_3_decode_xer; |
| 540 | xer_type_encoder_f G_3_3_encode_xer; |
| 541 | oer_type_decoder_f G_3_3_decode_oer; |
| 542 | oer_type_encoder_f G_3_3_encode_oer; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 543 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 544 | /*** <<< CODE [G-3-3] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 545 | |
| 546 | int |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 547 | G_3_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 548 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 549 | long value; |
| 550 | |
| 551 | if(!sptr) { |
| 552 | ASN__CTFAIL(app_key, td, sptr, |
| 553 | "%s: value not given (%s:%d)", |
| 554 | td->name, __FILE__, __LINE__); |
| 555 | return -1; |
| 556 | } |
| 557 | |
| 558 | value = *(const long *)sptr; |
| 559 | |
| 560 | if((value == 3)) { |
| 561 | /* Constraint check succeeded */ |
| 562 | return 0; |
| 563 | } else { |
| 564 | ASN__CTFAIL(app_key, td, sptr, |
| 565 | "%s: constraint failed (%s:%d)", |
| 566 | td->name, __FILE__, __LINE__); |
| 567 | return -1; |
| 568 | } |
| 569 | } |
| 570 | |
| 571 | /* |
| 572 | * This type is implemented using NativeInteger, |
| 573 | * so here we adjust the DEF accordingly. |
| 574 | */ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 575 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 576 | /*** <<< CTDEFS [G-3-3] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 577 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 578 | static asn_oer_constraints_t asn_OER_type_G_3_3_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 579 | { 1, 1 } /* (3..3) */, |
| 580 | -1}; |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 581 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 582 | /*** <<< STAT-DEFS [G-3-3] >>> ***/ |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 583 | |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 584 | static const ber_tlv_tag_t asn_DEF_G_3_3_tags_1[] = { |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 585 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 586 | }; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 587 | asn_TYPE_descriptor_t asn_DEF_G_3_3 = { |
| 588 | "G-3-3", |
| 589 | "G-3-3", |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 590 | NativeInteger_free, |
| 591 | NativeInteger_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 592 | NativeInteger_compare, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 593 | G_3_3_constraint, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 594 | NativeInteger_decode_ber, |
| 595 | NativeInteger_encode_der, |
| 596 | NativeInteger_decode_xer, |
| 597 | NativeInteger_encode_xer, |
| 598 | NativeInteger_decode_oer, |
| 599 | NativeInteger_encode_oer, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 600 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 601 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 602 | asn_DEF_G_3_3_tags_1, |
| 603 | sizeof(asn_DEF_G_3_3_tags_1) |
| 604 | /sizeof(asn_DEF_G_3_3_tags_1[0]), /* 1 */ |
| 605 | asn_DEF_G_3_3_tags_1, /* Same as above */ |
| 606 | sizeof(asn_DEF_G_3_3_tags_1) |
| 607 | /sizeof(asn_DEF_G_3_3_tags_1[0]), /* 1 */ |
| 608 | &asn_OER_type_G_3_3_constr_1, |
| 609 | 0, /* No PER visible constraints */ |
| 610 | 0, 0, /* No members */ |
| 611 | 0 /* No specifics */ |
| 612 | }; |
| 613 | |
| 614 | |
| 615 | /*** <<< INCLUDES [H-4-5] >>> ***/ |
| 616 | |
| 617 | #include <NativeInteger.h> |
| 618 | |
| 619 | /*** <<< TYPE-DECLS [H-4-5] >>> ***/ |
| 620 | |
| 621 | typedef long H_4_5_t; |
| 622 | |
| 623 | /*** <<< FUNC-DECLS [H-4-5] >>> ***/ |
| 624 | |
| 625 | extern asn_TYPE_descriptor_t asn_DEF_H_4_5; |
| 626 | asn_struct_free_f H_4_5_free; |
| 627 | asn_struct_print_f H_4_5_print; |
| 628 | asn_constr_check_f H_4_5_constraint; |
| 629 | ber_type_decoder_f H_4_5_decode_ber; |
| 630 | der_type_encoder_f H_4_5_encode_der; |
| 631 | xer_type_decoder_f H_4_5_decode_xer; |
| 632 | xer_type_encoder_f H_4_5_encode_xer; |
| 633 | oer_type_decoder_f H_4_5_decode_oer; |
| 634 | oer_type_encoder_f H_4_5_encode_oer; |
| 635 | |
| 636 | /*** <<< CODE [H-4-5] >>> ***/ |
| 637 | |
| 638 | int |
| 639 | H_4_5_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 640 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 641 | long value; |
| 642 | |
| 643 | if(!sptr) { |
| 644 | ASN__CTFAIL(app_key, td, sptr, |
| 645 | "%s: value not given (%s:%d)", |
| 646 | td->name, __FILE__, __LINE__); |
| 647 | return -1; |
| 648 | } |
| 649 | |
| 650 | value = *(const long *)sptr; |
| 651 | |
| 652 | if((value >= 4 && value <= 5)) { |
| 653 | /* Constraint check succeeded */ |
| 654 | return 0; |
| 655 | } else { |
| 656 | ASN__CTFAIL(app_key, td, sptr, |
| 657 | "%s: constraint failed (%s:%d)", |
| 658 | td->name, __FILE__, __LINE__); |
| 659 | return -1; |
| 660 | } |
| 661 | } |
| 662 | |
| 663 | /* |
| 664 | * This type is implemented using NativeInteger, |
| 665 | * so here we adjust the DEF accordingly. |
| 666 | */ |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 667 | |
| 668 | /*** <<< CTDEFS [H-4-5] >>> ***/ |
| 669 | |
| 670 | static asn_oer_constraints_t asn_OER_type_H_4_5_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 671 | { 1, 1 } /* (4..5) */, |
| 672 | -1}; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 673 | |
| 674 | /*** <<< STAT-DEFS [H-4-5] >>> ***/ |
| 675 | |
| 676 | static const ber_tlv_tag_t asn_DEF_H_4_5_tags_1[] = { |
| 677 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 678 | }; |
| 679 | asn_TYPE_descriptor_t asn_DEF_H_4_5 = { |
| 680 | "H-4-5", |
| 681 | "H-4-5", |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 682 | NativeInteger_free, |
| 683 | NativeInteger_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 684 | NativeInteger_compare, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 685 | H_4_5_constraint, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 686 | NativeInteger_decode_ber, |
| 687 | NativeInteger_encode_der, |
| 688 | NativeInteger_decode_xer, |
| 689 | NativeInteger_encode_xer, |
| 690 | NativeInteger_decode_oer, |
| 691 | NativeInteger_encode_oer, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 692 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 693 | 0, /* Use generic outmost tag fetcher */ |
| 694 | asn_DEF_H_4_5_tags_1, |
| 695 | sizeof(asn_DEF_H_4_5_tags_1) |
| 696 | /sizeof(asn_DEF_H_4_5_tags_1[0]), /* 1 */ |
| 697 | asn_DEF_H_4_5_tags_1, /* Same as above */ |
| 698 | sizeof(asn_DEF_H_4_5_tags_1) |
| 699 | /sizeof(asn_DEF_H_4_5_tags_1[0]), /* 1 */ |
| 700 | &asn_OER_type_H_4_5_constr_1, |
| 701 | 0, /* No PER visible constraints */ |
| 702 | 0, 0, /* No members */ |
| 703 | 0 /* No specifics */ |
| 704 | }; |
| 705 | |
| 706 | |
| 707 | /*** <<< INCLUDES [I-0-5] >>> ***/ |
| 708 | |
| 709 | #include <NativeInteger.h> |
| 710 | |
| 711 | /*** <<< TYPE-DECLS [I-0-5] >>> ***/ |
| 712 | |
| 713 | typedef long I_0_5_t; |
| 714 | |
| 715 | /*** <<< FUNC-DECLS [I-0-5] >>> ***/ |
| 716 | |
| 717 | extern asn_TYPE_descriptor_t asn_DEF_I_0_5; |
| 718 | asn_struct_free_f I_0_5_free; |
| 719 | asn_struct_print_f I_0_5_print; |
| 720 | asn_constr_check_f I_0_5_constraint; |
| 721 | ber_type_decoder_f I_0_5_decode_ber; |
| 722 | der_type_encoder_f I_0_5_encode_der; |
| 723 | xer_type_decoder_f I_0_5_decode_xer; |
| 724 | xer_type_encoder_f I_0_5_encode_xer; |
| 725 | oer_type_decoder_f I_0_5_decode_oer; |
| 726 | oer_type_encoder_f I_0_5_encode_oer; |
| 727 | |
| 728 | /*** <<< CODE [I-0-5] >>> ***/ |
| 729 | |
| 730 | int |
| 731 | I_0_5_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 732 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 733 | long value; |
| 734 | |
| 735 | if(!sptr) { |
| 736 | ASN__CTFAIL(app_key, td, sptr, |
| 737 | "%s: value not given (%s:%d)", |
| 738 | td->name, __FILE__, __LINE__); |
| 739 | return -1; |
| 740 | } |
| 741 | |
| 742 | value = *(const long *)sptr; |
| 743 | |
| 744 | if((value >= 4 && value <= 5)) { |
| 745 | /* Constraint check succeeded */ |
| 746 | return 0; |
| 747 | } else { |
| 748 | ASN__CTFAIL(app_key, td, sptr, |
| 749 | "%s: constraint failed (%s:%d)", |
| 750 | td->name, __FILE__, __LINE__); |
| 751 | return -1; |
| 752 | } |
| 753 | } |
| 754 | |
| 755 | /* |
| 756 | * This type is implemented using NativeInteger, |
| 757 | * so here we adjust the DEF accordingly. |
| 758 | */ |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 759 | |
| 760 | /*** <<< CTDEFS [I-0-5] >>> ***/ |
| 761 | |
| 762 | static asn_oer_constraints_t asn_OER_type_I_0_5_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 763 | { 1, 1 } /* (0..5) */, |
| 764 | -1}; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 765 | |
| 766 | /*** <<< STAT-DEFS [I-0-5] >>> ***/ |
| 767 | |
| 768 | static const ber_tlv_tag_t asn_DEF_I_0_5_tags_1[] = { |
| 769 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 770 | }; |
| 771 | asn_TYPE_descriptor_t asn_DEF_I_0_5 = { |
| 772 | "I-0-5", |
| 773 | "I-0-5", |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 774 | NativeInteger_free, |
| 775 | NativeInteger_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 776 | NativeInteger_compare, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 777 | I_0_5_constraint, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 778 | NativeInteger_decode_ber, |
| 779 | NativeInteger_encode_der, |
| 780 | NativeInteger_decode_xer, |
| 781 | NativeInteger_encode_xer, |
| 782 | NativeInteger_decode_oer, |
| 783 | NativeInteger_encode_oer, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 784 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 785 | 0, /* Use generic outmost tag fetcher */ |
| 786 | asn_DEF_I_0_5_tags_1, |
| 787 | sizeof(asn_DEF_I_0_5_tags_1) |
| 788 | /sizeof(asn_DEF_I_0_5_tags_1[0]), /* 1 */ |
| 789 | asn_DEF_I_0_5_tags_1, /* Same as above */ |
| 790 | sizeof(asn_DEF_I_0_5_tags_1) |
| 791 | /sizeof(asn_DEF_I_0_5_tags_1[0]), /* 1 */ |
| 792 | &asn_OER_type_I_0_5_constr_1, |
| 793 | 0, /* No PER visible constraints */ |
| 794 | 0, 0, /* No members */ |
| 795 | 0 /* No specifics */ |
| 796 | }; |
| 797 | |
| 798 | |
| 799 | /*** <<< INCLUDES [J-4-9] >>> ***/ |
| 800 | |
| 801 | #include <NativeInteger.h> |
| 802 | |
| 803 | /*** <<< TYPE-DECLS [J-4-9] >>> ***/ |
| 804 | |
| 805 | typedef long J_4_9_t; |
| 806 | |
| 807 | /*** <<< FUNC-DECLS [J-4-9] >>> ***/ |
| 808 | |
| 809 | extern asn_TYPE_descriptor_t asn_DEF_J_4_9; |
| 810 | asn_struct_free_f J_4_9_free; |
| 811 | asn_struct_print_f J_4_9_print; |
| 812 | asn_constr_check_f J_4_9_constraint; |
| 813 | ber_type_decoder_f J_4_9_decode_ber; |
| 814 | der_type_encoder_f J_4_9_encode_der; |
| 815 | xer_type_decoder_f J_4_9_decode_xer; |
| 816 | xer_type_encoder_f J_4_9_encode_xer; |
| 817 | oer_type_decoder_f J_4_9_decode_oer; |
| 818 | oer_type_encoder_f J_4_9_encode_oer; |
| 819 | |
| 820 | /*** <<< CODE [J-4-9] >>> ***/ |
| 821 | |
| 822 | int |
| 823 | J_4_9_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 824 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 825 | long value; |
| 826 | |
| 827 | if(!sptr) { |
| 828 | ASN__CTFAIL(app_key, td, sptr, |
| 829 | "%s: value not given (%s:%d)", |
| 830 | td->name, __FILE__, __LINE__); |
| 831 | return -1; |
| 832 | } |
| 833 | |
| 834 | value = *(const long *)sptr; |
| 835 | |
| 836 | if((value >= 4 && value <= 5)) { |
| 837 | /* Constraint check succeeded */ |
| 838 | return 0; |
| 839 | } else { |
| 840 | ASN__CTFAIL(app_key, td, sptr, |
| 841 | "%s: constraint failed (%s:%d)", |
| 842 | td->name, __FILE__, __LINE__); |
| 843 | return -1; |
| 844 | } |
| 845 | } |
| 846 | |
| 847 | /* |
| 848 | * This type is implemented using NativeInteger, |
| 849 | * so here we adjust the DEF accordingly. |
| 850 | */ |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 851 | |
| 852 | /*** <<< CTDEFS [J-4-9] >>> ***/ |
| 853 | |
| 854 | static asn_oer_constraints_t asn_OER_type_J_4_9_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 855 | { 1, 1 } /* (4..9) */, |
| 856 | -1}; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 857 | |
| 858 | /*** <<< STAT-DEFS [J-4-9] >>> ***/ |
| 859 | |
| 860 | static const ber_tlv_tag_t asn_DEF_J_4_9_tags_1[] = { |
| 861 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 862 | }; |
| 863 | asn_TYPE_descriptor_t asn_DEF_J_4_9 = { |
| 864 | "J-4-9", |
| 865 | "J-4-9", |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 866 | NativeInteger_free, |
| 867 | NativeInteger_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 868 | NativeInteger_compare, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 869 | J_4_9_constraint, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 870 | NativeInteger_decode_ber, |
| 871 | NativeInteger_encode_der, |
| 872 | NativeInteger_decode_xer, |
| 873 | NativeInteger_encode_xer, |
| 874 | NativeInteger_decode_oer, |
| 875 | NativeInteger_encode_oer, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 876 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 877 | 0, /* Use generic outmost tag fetcher */ |
| 878 | asn_DEF_J_4_9_tags_1, |
| 879 | sizeof(asn_DEF_J_4_9_tags_1) |
| 880 | /sizeof(asn_DEF_J_4_9_tags_1[0]), /* 1 */ |
| 881 | asn_DEF_J_4_9_tags_1, /* Same as above */ |
| 882 | sizeof(asn_DEF_J_4_9_tags_1) |
| 883 | /sizeof(asn_DEF_J_4_9_tags_1[0]), /* 1 */ |
| 884 | &asn_OER_type_J_4_9_constr_1, |
| 885 | 0, /* No PER visible constraints */ |
| 886 | 0, 0, /* No members */ |
| 887 | 0 /* No specifics */ |
| 888 | }; |
| 889 | |
| 890 | |
| 891 | /*** <<< INCLUDES [K-inv] >>> ***/ |
| 892 | |
| 893 | #include <NativeInteger.h> |
| 894 | |
| 895 | /*** <<< TYPE-DECLS [K-inv] >>> ***/ |
| 896 | |
| 897 | typedef long K_inv_t; |
| 898 | |
| 899 | /*** <<< FUNC-DECLS [K-inv] >>> ***/ |
| 900 | |
| 901 | extern asn_TYPE_descriptor_t asn_DEF_K_inv; |
| 902 | asn_struct_free_f K_inv_free; |
| 903 | asn_struct_print_f K_inv_print; |
| 904 | asn_constr_check_f K_inv_constraint; |
| 905 | ber_type_decoder_f K_inv_decode_ber; |
| 906 | der_type_encoder_f K_inv_encode_der; |
| 907 | xer_type_decoder_f K_inv_decode_xer; |
| 908 | xer_type_encoder_f K_inv_encode_xer; |
| 909 | oer_type_decoder_f K_inv_decode_oer; |
| 910 | oer_type_encoder_f K_inv_encode_oer; |
| 911 | |
| 912 | /*** <<< CODE [K-inv] >>> ***/ |
| 913 | |
| 914 | int |
| 915 | K_inv_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 916 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 917 | long value; |
| 918 | |
| 919 | if(!sptr) { |
| 920 | ASN__CTFAIL(app_key, td, sptr, |
| 921 | "%s: value not given (%s:%d)", |
| 922 | td->name, __FILE__, __LINE__); |
| 923 | return -1; |
| 924 | } |
| 925 | |
| 926 | value = *(const long *)sptr; |
| 927 | |
| 928 | if((value >= 4 && value <= 5)) { |
| 929 | /* Constraint check succeeded */ |
| 930 | return 0; |
| 931 | } else { |
| 932 | ASN__CTFAIL(app_key, td, sptr, |
| 933 | "%s: constraint failed (%s:%d)", |
| 934 | td->name, __FILE__, __LINE__); |
| 935 | return -1; |
| 936 | } |
| 937 | } |
| 938 | |
| 939 | /* |
| 940 | * This type is implemented using NativeInteger, |
| 941 | * so here we adjust the DEF accordingly. |
| 942 | */ |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 943 | |
| 944 | /*** <<< CTDEFS [K-inv] >>> ***/ |
| 945 | |
| 946 | static asn_oer_constraints_t asn_OER_type_K_inv_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 947 | { 0, 0 }, |
| 948 | -1}; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 949 | |
| 950 | /*** <<< STAT-DEFS [K-inv] >>> ***/ |
| 951 | |
| 952 | static const ber_tlv_tag_t asn_DEF_K_inv_tags_1[] = { |
| 953 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 954 | }; |
| 955 | asn_TYPE_descriptor_t asn_DEF_K_inv = { |
| 956 | "K-inv", |
| 957 | "K-inv", |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 958 | NativeInteger_free, |
| 959 | NativeInteger_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 960 | NativeInteger_compare, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 961 | K_inv_constraint, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 962 | NativeInteger_decode_ber, |
| 963 | NativeInteger_encode_der, |
| 964 | NativeInteger_decode_xer, |
| 965 | NativeInteger_encode_xer, |
| 966 | NativeInteger_decode_oer, |
| 967 | NativeInteger_encode_oer, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 968 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 969 | 0, /* Use generic outmost tag fetcher */ |
| 970 | asn_DEF_K_inv_tags_1, |
| 971 | sizeof(asn_DEF_K_inv_tags_1) |
| 972 | /sizeof(asn_DEF_K_inv_tags_1[0]), /* 1 */ |
| 973 | asn_DEF_K_inv_tags_1, /* Same as above */ |
| 974 | sizeof(asn_DEF_K_inv_tags_1) |
| 975 | /sizeof(asn_DEF_K_inv_tags_1[0]), /* 1 */ |
| 976 | &asn_OER_type_K_inv_constr_1, |
| 977 | 0, /* No PER visible constraints */ |
| 978 | 0, 0, /* No members */ |
| 979 | 0 /* No specifics */ |
| 980 | }; |
| 981 | |
| 982 | |
| 983 | /*** <<< INCLUDES [L-0-5] >>> ***/ |
| 984 | |
| 985 | #include <NativeInteger.h> |
| 986 | |
| 987 | /*** <<< TYPE-DECLS [L-0-5] >>> ***/ |
| 988 | |
| 989 | typedef long L_0_5_t; |
| 990 | |
| 991 | /*** <<< FUNC-DECLS [L-0-5] >>> ***/ |
| 992 | |
| 993 | extern asn_TYPE_descriptor_t asn_DEF_L_0_5; |
| 994 | asn_struct_free_f L_0_5_free; |
| 995 | asn_struct_print_f L_0_5_print; |
| 996 | asn_constr_check_f L_0_5_constraint; |
| 997 | ber_type_decoder_f L_0_5_decode_ber; |
| 998 | der_type_encoder_f L_0_5_encode_der; |
| 999 | xer_type_decoder_f L_0_5_decode_xer; |
| 1000 | xer_type_encoder_f L_0_5_encode_xer; |
| 1001 | oer_type_decoder_f L_0_5_decode_oer; |
| 1002 | oer_type_encoder_f L_0_5_encode_oer; |
| 1003 | |
| 1004 | /*** <<< CODE [L-0-5] >>> ***/ |
| 1005 | |
| 1006 | int |
| 1007 | L_0_5_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1008 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 1009 | long value; |
| 1010 | |
| 1011 | if(!sptr) { |
| 1012 | ASN__CTFAIL(app_key, td, sptr, |
| 1013 | "%s: value not given (%s:%d)", |
| 1014 | td->name, __FILE__, __LINE__); |
| 1015 | return -1; |
| 1016 | } |
| 1017 | |
| 1018 | value = *(const long *)sptr; |
| 1019 | |
| 1020 | if(((value == 0) || (value == 5))) { |
| 1021 | /* Constraint check succeeded */ |
| 1022 | return 0; |
| 1023 | } else { |
| 1024 | ASN__CTFAIL(app_key, td, sptr, |
| 1025 | "%s: constraint failed (%s:%d)", |
| 1026 | td->name, __FILE__, __LINE__); |
| 1027 | return -1; |
| 1028 | } |
| 1029 | } |
| 1030 | |
| 1031 | /* |
| 1032 | * This type is implemented using NativeInteger, |
| 1033 | * so here we adjust the DEF accordingly. |
| 1034 | */ |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1035 | |
| 1036 | /*** <<< CTDEFS [L-0-5] >>> ***/ |
| 1037 | |
| 1038 | static asn_oer_constraints_t asn_OER_type_L_0_5_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 1039 | { 1, 1 } /* (0..5) */, |
| 1040 | -1}; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1041 | |
| 1042 | /*** <<< STAT-DEFS [L-0-5] >>> ***/ |
| 1043 | |
| 1044 | static const ber_tlv_tag_t asn_DEF_L_0_5_tags_1[] = { |
| 1045 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1046 | }; |
| 1047 | asn_TYPE_descriptor_t asn_DEF_L_0_5 = { |
| 1048 | "L-0-5", |
| 1049 | "L-0-5", |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 1050 | NativeInteger_free, |
| 1051 | NativeInteger_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 1052 | NativeInteger_compare, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1053 | L_0_5_constraint, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 1054 | NativeInteger_decode_ber, |
| 1055 | NativeInteger_encode_der, |
| 1056 | NativeInteger_decode_xer, |
| 1057 | NativeInteger_encode_xer, |
| 1058 | NativeInteger_decode_oer, |
| 1059 | NativeInteger_encode_oer, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1060 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 1061 | 0, /* Use generic outmost tag fetcher */ |
| 1062 | asn_DEF_L_0_5_tags_1, |
| 1063 | sizeof(asn_DEF_L_0_5_tags_1) |
| 1064 | /sizeof(asn_DEF_L_0_5_tags_1[0]), /* 1 */ |
| 1065 | asn_DEF_L_0_5_tags_1, /* Same as above */ |
| 1066 | sizeof(asn_DEF_L_0_5_tags_1) |
| 1067 | /sizeof(asn_DEF_L_0_5_tags_1[0]), /* 1 */ |
| 1068 | &asn_OER_type_L_0_5_constr_1, |
| 1069 | 0, /* No PER visible constraints */ |
| 1070 | 0, 0, /* No members */ |
| 1071 | 0 /* No specifics */ |
| 1072 | }; |
| 1073 | |
| 1074 | |
| 1075 | /*** <<< INCLUDES [M-inv] >>> ***/ |
| 1076 | |
| 1077 | #include <NativeInteger.h> |
| 1078 | |
| 1079 | /*** <<< TYPE-DECLS [M-inv] >>> ***/ |
| 1080 | |
| 1081 | typedef long M_inv_t; |
| 1082 | |
| 1083 | /*** <<< FUNC-DECLS [M-inv] >>> ***/ |
| 1084 | |
| 1085 | extern asn_TYPE_descriptor_t asn_DEF_M_inv; |
| 1086 | asn_struct_free_f M_inv_free; |
| 1087 | asn_struct_print_f M_inv_print; |
| 1088 | asn_constr_check_f M_inv_constraint; |
| 1089 | ber_type_decoder_f M_inv_decode_ber; |
| 1090 | der_type_encoder_f M_inv_encode_der; |
| 1091 | xer_type_decoder_f M_inv_decode_xer; |
| 1092 | xer_type_encoder_f M_inv_encode_xer; |
| 1093 | oer_type_decoder_f M_inv_decode_oer; |
| 1094 | oer_type_encoder_f M_inv_encode_oer; |
| 1095 | |
| 1096 | /*** <<< CODE [M-inv] >>> ***/ |
| 1097 | |
| 1098 | int |
| 1099 | M_inv_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1100 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 1101 | long value; |
| 1102 | |
| 1103 | if(!sptr) { |
| 1104 | ASN__CTFAIL(app_key, td, sptr, |
| 1105 | "%s: value not given (%s:%d)", |
| 1106 | td->name, __FILE__, __LINE__); |
| 1107 | return -1; |
| 1108 | } |
| 1109 | |
| 1110 | value = *(const long *)sptr; |
| 1111 | |
| 1112 | if(((value == 0) || (value == 5))) { |
| 1113 | /* Constraint check succeeded */ |
| 1114 | return 0; |
| 1115 | } else { |
| 1116 | ASN__CTFAIL(app_key, td, sptr, |
| 1117 | "%s: constraint failed (%s:%d)", |
| 1118 | td->name, __FILE__, __LINE__); |
| 1119 | return -1; |
| 1120 | } |
| 1121 | } |
| 1122 | |
| 1123 | /* |
| 1124 | * This type is implemented using NativeInteger, |
| 1125 | * so here we adjust the DEF accordingly. |
| 1126 | */ |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1127 | |
| 1128 | /*** <<< CTDEFS [M-inv] >>> ***/ |
| 1129 | |
| 1130 | static asn_oer_constraints_t asn_OER_type_M_inv_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 1131 | { 0, 0 }, |
| 1132 | -1}; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1133 | |
| 1134 | /*** <<< STAT-DEFS [M-inv] >>> ***/ |
| 1135 | |
| 1136 | static const ber_tlv_tag_t asn_DEF_M_inv_tags_1[] = { |
| 1137 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1138 | }; |
| 1139 | asn_TYPE_descriptor_t asn_DEF_M_inv = { |
| 1140 | "M-inv", |
| 1141 | "M-inv", |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 1142 | NativeInteger_free, |
| 1143 | NativeInteger_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 1144 | NativeInteger_compare, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1145 | M_inv_constraint, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 1146 | NativeInteger_decode_ber, |
| 1147 | NativeInteger_encode_der, |
| 1148 | NativeInteger_decode_xer, |
| 1149 | NativeInteger_encode_xer, |
| 1150 | NativeInteger_decode_oer, |
| 1151 | NativeInteger_encode_oer, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1152 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 1153 | 0, /* Use generic outmost tag fetcher */ |
| 1154 | asn_DEF_M_inv_tags_1, |
| 1155 | sizeof(asn_DEF_M_inv_tags_1) |
| 1156 | /sizeof(asn_DEF_M_inv_tags_1[0]), /* 1 */ |
| 1157 | asn_DEF_M_inv_tags_1, /* Same as above */ |
| 1158 | sizeof(asn_DEF_M_inv_tags_1) |
| 1159 | /sizeof(asn_DEF_M_inv_tags_1[0]), /* 1 */ |
| 1160 | &asn_OER_type_M_inv_constr_1, |
| 1161 | 0, /* No PER visible constraints */ |
| 1162 | 0, 0, /* No members */ |
| 1163 | 0 /* No specifics */ |
| 1164 | }; |
| 1165 | |
| 1166 | |
| 1167 | /*** <<< INCLUDES [N-inv] >>> ***/ |
| 1168 | |
| 1169 | #include <NativeInteger.h> |
| 1170 | |
| 1171 | /*** <<< TYPE-DECLS [N-inv] >>> ***/ |
| 1172 | |
| 1173 | typedef long N_inv_t; |
| 1174 | |
| 1175 | /*** <<< FUNC-DECLS [N-inv] >>> ***/ |
| 1176 | |
| 1177 | extern asn_TYPE_descriptor_t asn_DEF_N_inv; |
| 1178 | asn_struct_free_f N_inv_free; |
| 1179 | asn_struct_print_f N_inv_print; |
| 1180 | asn_constr_check_f N_inv_constraint; |
| 1181 | ber_type_decoder_f N_inv_decode_ber; |
| 1182 | der_type_encoder_f N_inv_encode_der; |
| 1183 | xer_type_decoder_f N_inv_decode_xer; |
| 1184 | xer_type_encoder_f N_inv_encode_xer; |
| 1185 | oer_type_decoder_f N_inv_decode_oer; |
| 1186 | oer_type_encoder_f N_inv_encode_oer; |
| 1187 | |
| 1188 | /*** <<< CODE [N-inv] >>> ***/ |
| 1189 | |
| 1190 | int |
| 1191 | N_inv_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1192 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 1193 | long value; |
| 1194 | |
| 1195 | if(!sptr) { |
| 1196 | ASN__CTFAIL(app_key, td, sptr, |
| 1197 | "%s: value not given (%s:%d)", |
| 1198 | td->name, __FILE__, __LINE__); |
| 1199 | return -1; |
| 1200 | } |
| 1201 | |
| 1202 | value = *(const long *)sptr; |
| 1203 | |
| 1204 | if((value >= 0 && value <= 5)) { |
| 1205 | /* Constraint check succeeded */ |
| 1206 | return 0; |
| 1207 | } else { |
| 1208 | ASN__CTFAIL(app_key, td, sptr, |
| 1209 | "%s: constraint failed (%s:%d)", |
| 1210 | td->name, __FILE__, __LINE__); |
| 1211 | return -1; |
| 1212 | } |
| 1213 | } |
| 1214 | |
| 1215 | /* |
| 1216 | * This type is implemented using NativeInteger, |
| 1217 | * so here we adjust the DEF accordingly. |
| 1218 | */ |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1219 | |
| 1220 | /*** <<< CTDEFS [N-inv] >>> ***/ |
| 1221 | |
| 1222 | static asn_oer_constraints_t asn_OER_type_N_inv_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 1223 | { 0, 0 }, |
| 1224 | -1}; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1225 | |
| 1226 | /*** <<< STAT-DEFS [N-inv] >>> ***/ |
| 1227 | |
| 1228 | static const ber_tlv_tag_t asn_DEF_N_inv_tags_1[] = { |
| 1229 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1230 | }; |
| 1231 | asn_TYPE_descriptor_t asn_DEF_N_inv = { |
| 1232 | "N-inv", |
| 1233 | "N-inv", |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 1234 | NativeInteger_free, |
| 1235 | NativeInteger_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 1236 | NativeInteger_compare, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1237 | N_inv_constraint, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 1238 | NativeInteger_decode_ber, |
| 1239 | NativeInteger_encode_der, |
| 1240 | NativeInteger_decode_xer, |
| 1241 | NativeInteger_encode_xer, |
| 1242 | NativeInteger_decode_oer, |
| 1243 | NativeInteger_encode_oer, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1244 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 1245 | 0, /* Use generic outmost tag fetcher */ |
| 1246 | asn_DEF_N_inv_tags_1, |
| 1247 | sizeof(asn_DEF_N_inv_tags_1) |
| 1248 | /sizeof(asn_DEF_N_inv_tags_1[0]), /* 1 */ |
| 1249 | asn_DEF_N_inv_tags_1, /* Same as above */ |
| 1250 | sizeof(asn_DEF_N_inv_tags_1) |
| 1251 | /sizeof(asn_DEF_N_inv_tags_1[0]), /* 1 */ |
| 1252 | &asn_OER_type_N_inv_constr_1, |
| 1253 | 0, /* No PER visible constraints */ |
| 1254 | 0, 0, /* No members */ |
| 1255 | 0 /* No specifics */ |
| 1256 | }; |
| 1257 | |
| 1258 | |
| 1259 | /*** <<< INCLUDES [O-inv] >>> ***/ |
| 1260 | |
| 1261 | #include <NativeInteger.h> |
| 1262 | |
| 1263 | /*** <<< TYPE-DECLS [O-inv] >>> ***/ |
| 1264 | |
| 1265 | typedef long O_inv_t; |
| 1266 | |
| 1267 | /*** <<< FUNC-DECLS [O-inv] >>> ***/ |
| 1268 | |
| 1269 | extern asn_TYPE_descriptor_t asn_DEF_O_inv; |
| 1270 | asn_struct_free_f O_inv_free; |
| 1271 | asn_struct_print_f O_inv_print; |
| 1272 | asn_constr_check_f O_inv_constraint; |
| 1273 | ber_type_decoder_f O_inv_decode_ber; |
| 1274 | der_type_encoder_f O_inv_encode_der; |
| 1275 | xer_type_decoder_f O_inv_decode_xer; |
| 1276 | xer_type_encoder_f O_inv_encode_xer; |
| 1277 | oer_type_decoder_f O_inv_decode_oer; |
| 1278 | oer_type_encoder_f O_inv_encode_oer; |
| 1279 | |
| 1280 | /*** <<< CODE [O-inv] >>> ***/ |
| 1281 | |
| 1282 | int |
| 1283 | O_inv_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 1284 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 1285 | long value; |
| 1286 | |
| 1287 | if(!sptr) { |
| 1288 | ASN__CTFAIL(app_key, td, sptr, |
| 1289 | "%s: value not given (%s:%d)", |
| 1290 | td->name, __FILE__, __LINE__); |
| 1291 | return -1; |
| 1292 | } |
| 1293 | |
| 1294 | value = *(const long *)sptr; |
| 1295 | |
| 1296 | if((value >= 0 && value <= 5)) { |
| 1297 | /* Constraint check succeeded */ |
| 1298 | return 0; |
| 1299 | } else { |
| 1300 | ASN__CTFAIL(app_key, td, sptr, |
| 1301 | "%s: constraint failed (%s:%d)", |
| 1302 | td->name, __FILE__, __LINE__); |
| 1303 | return -1; |
| 1304 | } |
| 1305 | } |
| 1306 | |
| 1307 | /* |
| 1308 | * This type is implemented using NativeInteger, |
| 1309 | * so here we adjust the DEF accordingly. |
| 1310 | */ |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1311 | |
| 1312 | /*** <<< CTDEFS [O-inv] >>> ***/ |
| 1313 | |
| 1314 | static asn_oer_constraints_t asn_OER_type_O_inv_constr_1 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 1315 | { 0, 0 }, |
| 1316 | -1}; |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1317 | |
| 1318 | /*** <<< STAT-DEFS [O-inv] >>> ***/ |
| 1319 | |
| 1320 | static const ber_tlv_tag_t asn_DEF_O_inv_tags_1[] = { |
| 1321 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1322 | }; |
| 1323 | asn_TYPE_descriptor_t asn_DEF_O_inv = { |
| 1324 | "O-inv", |
| 1325 | "O-inv", |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 1326 | NativeInteger_free, |
| 1327 | NativeInteger_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 1328 | NativeInteger_compare, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1329 | O_inv_constraint, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 1330 | NativeInteger_decode_ber, |
| 1331 | NativeInteger_encode_der, |
| 1332 | NativeInteger_decode_xer, |
| 1333 | NativeInteger_encode_xer, |
| 1334 | NativeInteger_decode_oer, |
| 1335 | NativeInteger_encode_oer, |
Lev Walkin | 5861e8a | 2017-07-31 20:27:05 -0700 | [diff] [blame] | 1336 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 1337 | 0, /* Use generic outmost tag fetcher */ |
| 1338 | asn_DEF_O_inv_tags_1, |
| 1339 | sizeof(asn_DEF_O_inv_tags_1) |
| 1340 | /sizeof(asn_DEF_O_inv_tags_1[0]), /* 1 */ |
| 1341 | asn_DEF_O_inv_tags_1, /* Same as above */ |
| 1342 | sizeof(asn_DEF_O_inv_tags_1) |
| 1343 | /sizeof(asn_DEF_O_inv_tags_1[0]), /* 1 */ |
| 1344 | &asn_OER_type_O_inv_constr_1, |
Lev Walkin | 8aed40c | 2017-07-26 18:50:04 -0700 | [diff] [blame] | 1345 | 0, /* No PER visible constraints */ |
| 1346 | 0, 0, /* No members */ |
| 1347 | 0 /* No specifics */ |
| 1348 | }; |
| 1349 | |