From 8ec659515f003e44a62ba6365efc50a0d3a066cb Mon Sep 17 00:00:00 2001 From: Vasil Velichkov Date: Wed, 19 Apr 2017 00:29:14 +0300 Subject: [PATCH] Fix REAL constraints (part 2) vlm/asn1c#148 --- asn1c/tests/check-src/check-50.c | 1 + libasn1compiler/asn1c_constraint.c | 32 +- libasn1fix/Makefile.am | 1 + libasn1fix/asn1fix_constraint_compat.c | 28 +- libasn1fix/asn1fix_crange.c | 67 +- libasn1fix/asn1fix_crange.h | 2 + libasn1print/asn1print.c | 7 +- tests/.gitattributes | 1 + tests/50-constraint-OK.asn1 | 38 +- ...50-constraint-OK.asn1.-EFprint-constraints | Bin 10082 -> 14757 bytes tests/50-constraint-OK.asn1.-Pfwide-types | 1107 ++++++++++++++++- tests/50-constraint-OK.asn1.-Pgen-PER | 1096 +++++++++++++++- 12 files changed, 2274 insertions(+), 106 deletions(-) create mode 100644 tests/.gitattributes diff --git a/asn1c/tests/check-src/check-50.c b/asn1c/tests/check-src/check-50.c index cfdd60069..cccbd1c29 100644 --- a/asn1c/tests/check-src/check-50.c +++ b/asn1c/tests/check-src/check-50.c @@ -9,6 +9,7 @@ #include #include #include +#include int main(int ac, char **av) { diff --git a/libasn1compiler/asn1c_constraint.c b/libasn1compiler/asn1c_constraint.c index c27ce960c..6929e6724 100644 --- a/libasn1compiler/asn1c_constraint.c +++ b/libasn1compiler/asn1c_constraint.c @@ -530,15 +530,37 @@ emit_range_comparison_code(arg_t *arg, asn1cnst_range_t *range, const char *varn } if(ignore_left) { - OUT("%s <= %lldLL", varname, r->right.value); + if (r->right.type == ARE_DOUBLE) { + OUT("%s <= %LfL", varname, r->right.value_double); + } else { + OUT("%s <= %lldLL", varname, r->right.value); + } } else if(ignore_right) { - OUT("%s >= %lldLL", varname, r->left.value); - } else if(r->left.value == r->right.value) { + if (r->left.type == ARE_DOUBLE) { + OUT("%s >= %LfL", varname, r->left.value_double); + } else { + OUT("%s >= %lldLL", varname, r->left.value); + } + } else if(r->left.type == ARE_VALUE && + r->right.type == ARE_VALUE && + r->left.value == r->right.value) { OUT("%s == %lldLL", varname, r->right.value); + } else if(r->left.type == ARE_DOUBLE && + r->right.type == ARE_DOUBLE && + r->left.value_double == r->right.value_double) { + OUT("%s == %LfL", varname, r->right.value_double); } else { - OUT("%s >= %lldLL", varname, r->left.value); + if (r->left.type == ARE_DOUBLE) { + OUT("%s >= %LfL", varname, r->left.value_double); + } else { + OUT("%s >= %lldLL", varname, r->left.value); + } OUT(" && "); - OUT("%s <= %lldLL", varname, r->right.value); + if (r->right.type == ARE_DOUBLE) { + OUT("%s <= %LfL", varname, r->right.value_double); + } else { + OUT("%s <= %lldLL", varname, r->right.value); + } } if(r != range) OUT(")"); generated_something = 1; diff --git a/libasn1fix/Makefile.am b/libasn1fix/Makefile.am index 71df46a97..a36512dcf 100644 --- a/libasn1fix/Makefile.am +++ b/libasn1fix/Makefile.am @@ -27,6 +27,7 @@ libasn1fix_la_SOURCES = \ asn1fix_enum.c asn1fix_enum.h \ asn1fix_cws.c asn1fix_cws.h \ asn1fix_constraint_compat.c +libasn1fix_la_LIBADD = -lm check_fixer_LDADD = $(noinst_LTLIBRARIES) \ $(top_builddir)/libasn1parser/libasn1parser.la diff --git a/libasn1fix/asn1fix_constraint_compat.c b/libasn1fix/asn1fix_constraint_compat.c index caa6f590a..2cc9fff3b 100644 --- a/libasn1fix/asn1fix_constraint_compat.c +++ b/libasn1fix/asn1fix_constraint_compat.c @@ -112,8 +112,8 @@ asn1constraint_compatible(asn1p_expr_type_e expr_type, #define DECL_RANGE(foo, val1, val2, pv) \ static asn1cnst_range_t range_ ## foo = { \ - { ARE_VALUE, 0, val1 }, \ - { ARE_VALUE, 0, val2 }, \ + { ARE_VALUE, 0, val1, 0}, \ + { ARE_VALUE, 0, val2, 0}, \ 0, 0, 0, 0, 0, 0, pv } #define DECL(foo, val1, val2) DECL_RANGE(foo, val1, val2, 0) @@ -155,37 +155,37 @@ asn1constraint_default_alphabet(asn1p_expr_type_e expr_type) { &range_PlusCommaMinusDot, &range_Digits, &range_Z }; static asn1cnst_range_t range_notPERVisible = { - { ARE_MIN, 0, 0 }, - { ARE_MAX, 0, 0 }, + { ARE_MIN, 0, 0, 0}, + { ARE_MAX, 0, 0, 0}, 0, 0, 0, 0, 0, 0, 1 }; static asn1cnst_range_t range_NumericString = { - { ARE_VALUE, 0, 0x20 }, - { ARE_VALUE, 0, 0x39 }, + { ARE_VALUE, 0, 0x20, 0}, + { ARE_VALUE, 0, 0x39, 0}, range_NumericString_array, sizeof(range_NumericString_array) /sizeof(range_NumericString_array[0]), 0, 0, 0, 0, 0 }; static asn1cnst_range_t range_PrintableString = { - { ARE_VALUE, 0, 0x20 }, - { ARE_VALUE, 0, 0x7a }, + { ARE_VALUE, 0, 0x20, 0}, + { ARE_VALUE, 0, 0x7a, 0}, range_PrintableString_array, sizeof(range_PrintableString_array) /sizeof(range_PrintableString_array[0]), 0, 0, 0, 0, 0 }; static asn1cnst_range_t range_VisibleString = { - { ARE_VALUE, 0, 0x20 }, - { ARE_VALUE, 0, 0x7e }, + { ARE_VALUE, 0, 0x20, 0}, + { ARE_VALUE, 0, 0x7e, 0}, 0, 0, 0, 0, 0, 0, 0 }; static asn1cnst_range_t range_UTCTime = { - { ARE_VALUE, 0, 0x2b }, - { ARE_VALUE, 0, 0x5a }, + { ARE_VALUE, 0, 0x2b, 0}, + { ARE_VALUE, 0, 0x5a, 0}, range_UTCTime_array, sizeof(range_UTCTime_array) /sizeof(range_UTCTime_array[0]), 0, 0, 0, 0, 1 }; static asn1cnst_range_t range_GeneralizedTime = { - { ARE_VALUE, 0, 0x2b }, - { ARE_VALUE, 0, 0x5a }, + { ARE_VALUE, 0, 0x2b, 0}, + { ARE_VALUE, 0, 0x5a, 0}, range_GeneralizedTime_array, sizeof(range_GeneralizedTime_array) /sizeof(range_GeneralizedTime_array[0]), diff --git a/libasn1fix/asn1fix_crange.c b/libasn1fix/asn1fix_crange.c index b2b91f2bc..2957d231f 100644 --- a/libasn1fix/asn1fix_crange.c +++ b/libasn1fix/asn1fix_crange.c @@ -1,6 +1,8 @@ #include "asn1fix_internal.h" #include "asn1fix_constraint.h" #include "asn1fix_crange.h" +#include +//#include #undef FATAL #define FATAL(fmt, args...) do { \ @@ -109,6 +111,7 @@ _edge_compare(const asn1cnst_edge_t *el, const asn1cnst_edge_t *er) { case ARE_MIN: return 0; case ARE_MAX: return -1; case ARE_VALUE: return -1; + case ARE_DOUBLE: return -1; } break; case ARE_MAX: @@ -116,6 +119,7 @@ _edge_compare(const asn1cnst_edge_t *el, const asn1cnst_edge_t *er) { case ARE_MIN: return 1; case ARE_MAX: return 0; case ARE_VALUE: return 1; + case ARE_DOUBLE: return 1; } break; case ARE_VALUE: @@ -128,6 +132,30 @@ _edge_compare(const asn1cnst_edge_t *el, const asn1cnst_edge_t *er) { if(el->value > er->value) return 1; return 0; + case ARE_DOUBLE: + if(el->value < er->value_double) + return -1; + if(el->value > er->value_double) + return 1; + return 0; + } + break; + case ARE_DOUBLE: + switch(er->type) { + case ARE_MIN: return 1; + case ARE_MAX: return -1; + case ARE_VALUE: + if(el->value_double < er->value) + return -1; + if(el->value_double > er->value) + return 1; + return 0; + case ARE_DOUBLE: + if(el->value_double < er->value_double) + return -1; + if(el->value_double > er->value_double) + return 1; + return 0; } break; } @@ -159,6 +187,9 @@ _edge_value(const asn1cnst_edge_t *edge) { case ARE_VALUE: snprintf(buf, sizeof(buf), "%" PRIdASN, edge->value); break; + case ARE_DOUBLE: + snprintf(buf, sizeof(buf), "%Lf", edge->value_double); + break; default: assert(!"edge->type"); } @@ -272,8 +303,8 @@ static int _range_fill(asn1p_value_t *val, const asn1cnst_range_t *minmax, asn1c asn1p_constraint_type2str(type), lineno); return -1; } - edge->type = ARE_VALUE; - edge->value = val->value.v_double; + edge->type = ARE_DOUBLE; + edge->value_double = val->value.v_double; return 0; case ATV_MIN: if(type != ACT_EL_RANGE && type != ACT_CT_SIZE) { @@ -461,6 +492,18 @@ _range_split(asn1cnst_range_t *ra, const asn1cnst_range_t *rb) { break; } nr->right.value--; + } else if(nr->right.type == ARE_DOUBLE) { + if(nr->right.value_double == DBL_MIN) { + /* We've hit the limit here. */ + break; + } + //nextafter(0.0, DBL_MAX) and nextafter(0.0, DBL_MIN) returns the same result + //and set FE_UNDERFLOW exception + //nr->right.value_double = nextafter(nr->right.value_double, DBL_MIN); + //With DBL_EPSILON it does not work for some reason + const long double temp = nr->right.value_double - FLT_EPSILON; + assert(temp != nr->right.value_double); + nr->right.value_double = temp; } _range_insert(range, nr); nr = _range_new(); @@ -481,6 +524,18 @@ _range_split(asn1cnst_range_t *ra, const asn1cnst_range_t *rb) { break; } nr->left.value++; + } else if(nr->left.type == ARE_DOUBLE) { + if(nr->left.value_double == DBL_MAX) { + /* We've hit the limit here. */ + break; + } + //nextafter(0.0, DBL_MAX) and nextafter(0.0, DBL_MIN) returns the same result + //and set FE_UNDERFLOW exception + //nr->left.value_double = nextafter(nr->left.value_double, DBL_MAX); + //With DBL_EPSILON it does not work for some reason + const long double temp = nr->left.value_double + FLT_EPSILON; + assert(temp != nr->left.value_double); + nr->left.value_double = temp; } _range_insert(range, nr); nr = _range_new(); @@ -774,9 +829,15 @@ asn1constraint_compute_PER_range(asn1p_expr_type_e expr_type, const asn1p_constr * X.691, #9.3.6 * Constraints on restricter character string types * which are not known-multiplier are not PER-visible. + * X.691 (08/2015) + * 10.3.7 Constraints on restricted character string types which are not (see Rec. ITU-T X.680 | ISO/IEC 8824-1, clause + * 41) known-multiplier character string types are not PER-visible (see 3.7.16). + * 10.3.14 Constraints applied to real types are not PER-visible. */ - if((expr_type & ASN_STRING_NKM_MASK)) + if((expr_type & ASN_STRING_NKM_MASK) || + (expr_type == ASN_BASIC_REAL) ) { range->not_PER_visible = 1; + } if(!ct || (range->not_PER_visible && (cpr_flags & CPR_strict_PER_visibility))) diff --git a/libasn1fix/asn1fix_crange.h b/libasn1fix/asn1fix_crange.h index b5ae3a39f..29b4fad92 100644 --- a/libasn1fix/asn1fix_crange.h +++ b/libasn1fix/asn1fix_crange.h @@ -6,9 +6,11 @@ typedef struct asn1cnst_edge_s { ARE_MIN, ARE_MAX, ARE_VALUE, + ARE_DOUBLE, /* The value is in the value_double member. Used for REAL constraints */ } type; int lineno; /* Line where the corresponding token was found */ asn1c_integer_t value; /* Value when type is ARE_VALUE */ + long double value_double; /* Value when type is ARE_DOUBLE */ } asn1cnst_edge_t; typedef struct asn1cnst_range_s { diff --git a/libasn1print/asn1print.c b/libasn1print/asn1print.c index 0cbf9646f..c0ad78b04 100644 --- a/libasn1print/asn1print.c +++ b/libasn1print/asn1print.c @@ -478,6 +478,10 @@ asn1print_crange_value(asn1cnst_edge_t *edge, int as_char) { } else { safe_printf("%" PRIdASN, edge->value); } + break; + case ARE_DOUBLE: + safe_printf("%Lf", edge->value_double); + break; } return 0; } @@ -516,7 +520,8 @@ asn1print_constraint_explain_type(asn1p_expr_type_e expr_type, asn1p_constraint_ } asn1print_crange_value(&r->left, as_char); if(r->left.type != r->right.type - || r->left.value != r->right.value) { + || r->left.value != r->right.value + || r->left.value_double != r->right.value_double) { safe_printf(".."); asn1print_crange_value(&r->right, as_char); } diff --git a/tests/.gitattributes b/tests/.gitattributes new file mode 100644 index 000000000..099fdf836 --- /dev/null +++ b/tests/.gitattributes @@ -0,0 +1 @@ +50-constraint-OK.asn1.-EFprint-constraints diff diff --git a/tests/50-constraint-OK.asn1 b/tests/50-constraint-OK.asn1 index 35eedda20..d6090595c 100644 --- a/tests/50-constraint-OK.asn1 +++ b/tests/50-constraint-OK.asn1 @@ -69,7 +69,43 @@ BEGIN Enum0 ::= ENUMERATED { one, two } Enum1 ::= ENUMERATED { one, two } (one) - Real ::= REAL (1.00..21999.00) + SequenceReal ::= SEQUENCE { + real REAL, + + real-const0 REAL (0.0), + real-const1 REAL (1.0), + real-const2 REAL (1.05..21999.95), + real-const30 REAL (0.00|0.01), + real-const3 REAL (1.07|1.08), + real-const31 REAL (-1.0..0.00), + real-const4 REAL (0.0..1.0), + real-min REAL (MIN..0.0), + real-max0 REAL (0.0..MAX), + real-max REAL (1.0..MAX), + --real-exp REAL (1.1e3), + --real-bigr REAL (1.0..1.79769313486231470e+308), + + real-intc0 REAL (0), + real-intc1 REAL (1), + --real-intc12 REAL (1|2), + real-intc2 REAL (1..21999), + real-intc3 REAL (0..9223372036854775807), + real-intmin REAL (MIN..1), + real-intmax REAL (1..MAX), + + real-mix1 REAL (1.50..21999), + real-mix2 REAL (1..21999.99), + + real-ext REAL (...), + real-ext1 REAL (1.1..10.00,...), + real-ext2 REAL (1.1..10.00,...,10.01..11.00), + real-ext21 REAL (1.1..10.00,...,10.00..11.00), + real-ext3 REAL (1, ...), + real-ext4 REAL (1.0, ...), + --real-ext5 REAL (1, ..., 2), + real-ext6 REAL (1..2, ..., 3..4), + ... + } END diff --git a/tests/50-constraint-OK.asn1.-EFprint-constraints b/tests/50-constraint-OK.asn1.-EFprint-constraints index 68bd87f1fd95796fdb123f842dce6dd05be69ff3..a168114e5455af6fd306b63100961fd9f8566fe9 100644 GIT binary patch literal 14757 zcmeHO+iv5?5zVXl6%8Q|Bwz_5CE3;h`yku&L>pW3`m#GaK{k*jdPZ5Bnw97oXD`U7 zXRE5aNw&zoQ1KvHVEj<9<*Mpar>d(jq%KyAr-x*cY_eo=vPw7EdbUin&B^;@{v-Q^ zEjKH+TEFvq0b8sV{z1UtzsWjHGCvI1hxPK~EKB@;;O!;&Ief55@IRXm$-{Ex4|@k- zxmn$3pJr?N$83{^bAJ%942DF_L6?Q>H}5n)8&AeJ@)b$sQu+w5{Zn`g`U?19Y-z|2S0;1%;P#*Mt2 zkB0;MUG53}oU9)2mT9smJAu(k8Wvna(-BpnjhK28QzYUGyMY}Pr$VUO(Sf2nIIfJ? z`Vw1@`2*r>ztidLhn)_Tg_XD*W38j2;aWq%piUEQjNbr3@>|h7X0S|(kS|CH^ zyOkv=dRdY(fXU}T*rkI0jOD+|-Y4s}7?e+h&p&AV3TqB~DGzSWotp>mI$MjTHX6Y1%k-Tguc)lHHUE12HkOSiVE)2R|48HJ~;K*sLOt35ls1B*O&@|TW_JsgaM^8=!?Z} z@roSq7EEMt4nk{zu0rE#RZINbW@vG%JRN4o9aA86%J~Pl#4hHo|fdi1Akm zx^d++8v&UV3x=$H=C^>mQzVb5=^KlwR##6-|3#-xLvJ3E`K{P{&?cscnNM2E!kM{V zYBV+RmWFc)TNzxN_nn=Vqi^#LQt~D1Fvj9*#(2p`kHc#5>0iI}6VA=_2=_xE#4>qbzF})o283}d^PGuI5oOAN-gsc8r=Y5aV)I`pQa_*$LH(jaZ{@|$2U6GS$haX9&`r0_Yd3iJ$@VMw|fWQTF%P-=e>>_|4_{_+)&8fcu8&CMNs;@E*EAF8Gyq z(TApEjRv>4i{_>l+TrT%(D^!A=yI@ktJT9EJDyI@V^L3?8RiSrI{iGwAs;(Q zpB|B@cyfCYUyW|!Q&FK=w@I!WNcn<1DCRUAev)F_tU3@$mlO>$Om!E=>9JwTmIZqLsRL!y#Bh(e1^ zFY!6y=$wy%#L2lo5Hn~1kD_*;JcB@3+vbn+)_EH6V)k&iM~Y5j=-CPIpriMM~&cWqtguYUVTU zDuGuK@Opo1$Fzpe_t;fDGBrO`YLY;q5B-EUJ^Z^(??H6=Solgpmwt?llyx-4UviBI zbGMdVnrc=9G?YNYG6>Dpo1$X{N_ospoPmnN?>3`R3FrVRg(GS>91c4}`pd*GV9;4u zgNTrAjRWV9&`AyVy-Jn9F%vQyVtA&2WcIh!tC_T03%-2yCdF8J;2?^ykOW=1;*VZt&HT0 zsI;9P6m^w9bdt9WzS-2VMrch;kuT!P8BlfNqm$Bd$=68}QFxz>YpD}Fu_6i!mn;&V z+C27T;lXM?jG|ueFzWUWjt2e1!@*J4cIBe8uo2v&jMtCo8V~xYl)-kZG8O~18{^qT z)?B$ig|2l`*P9>_kF#gVIbhC=;%KXs9YvZ$q0cD{Mq6~@5d6kD5{E6+{D*FqZ~LAQd@J8EyEOv4Dr8Zq}Gp( zk?mrTAR5J9U7Vpr@>MUi)^e_3K}$;-cjuUv>H-GH^3#G6tf47X^ei~(e4rRP!mXYQ z0PcZoUATcks`h)9FFI5eEr1Wives{sb~MU+0KhU{8_N6AD}MQ8;iIbU#gkL`ZchF* z`+~ki)ZptvO!>Bux7X`Fx{lgD@@H7Pz6e6C_IC{P-p~L5 delta 86 zcmZ2l{K#*EwW3^5YGRIpm6feRkgKDQf`*}<0T}4%85vqyT28K2(q@OT7b+>UfRs;O WrllhYVrW`{G(c2pZZ>> ***/ +/*** <<< INCLUDES [SequenceReal] >>> ***/ #include +#include + +/*** <<< TYPE-DECLS [SequenceReal] >>> ***/ + +typedef struct SequenceReal { + REAL_t real; + REAL_t real_const0; + REAL_t real_const1; + REAL_t real_const2; + REAL_t real_const30; + REAL_t real_const3; + REAL_t real_const31; + REAL_t real_const4; + REAL_t real_min; + REAL_t real_max0; + REAL_t real_max; + REAL_t real_intc0; + REAL_t real_intc1; + REAL_t real_intc2; + REAL_t real_intc3; + REAL_t real_intmin; + REAL_t real_intmax; + REAL_t real_mix1; + REAL_t real_mix2; + REAL_t real_ext; + REAL_t real_ext1; + REAL_t real_ext2; + REAL_t real_ext21; + REAL_t real_ext3; + REAL_t real_ext4; + REAL_t real_ext6; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} SequenceReal_t; + +/*** <<< FUNC-DECLS [SequenceReal] >>> ***/ + +extern asn_TYPE_descriptor_t asn_DEF_SequenceReal; + +/*** <<< CODE [SequenceReal] >>> ***/ + +static int +memb_real_const0_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value == 0.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_const1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value == 1.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_const2_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 1.050000L && value <= 21999.950000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_const30_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(((value == 0.000000L) || (value == 0.010000L))) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_const3_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(((value == 1.070000L) || (value == 1.080000L))) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_const31_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= -1.000000L && value <= 0.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_const4_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0.000000L && value <= 1.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_min_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value <= 0.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_max0_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_max_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 1.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_intc0_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value == 0LL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_intc1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value == 1LL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_intc2_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 1LL && value <= 21999LL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_intc3_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0LL && value <= 9223372036854775807LL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_intmin_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value <= 1LL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_intmax_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 1LL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_mix1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 1.500000L && value <= 21999LL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_mix2_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 1LL && value <= 21999.990000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_ext_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->check_constraints(td, sptr, ctfailcb, app_key); +} -/*** <<< TYPE-DECLS [Real] >>> ***/ +static int +memb_real_ext1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 1.100000L && value <= 10.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} -typedef REAL_t Real_t; +static int +memb_real_ext2_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(((value >= 1.100000L && value <= 10.000000L) || (value >= 10.010000L && value <= 11.000000L))) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} -/*** <<< FUNC-DECLS [Real] >>> ***/ +static int +memb_real_ext21_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 1.100000L && value <= 11.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} -extern asn_TYPE_descriptor_t asn_DEF_Real; -asn_struct_free_f Real_free; -asn_struct_print_f Real_print; -asn_constr_check_f Real_constraint; -ber_type_decoder_f Real_decode_ber; -der_type_encoder_f Real_encode_der; -xer_type_decoder_f Real_decode_xer; -xer_type_encoder_f Real_encode_xer; +static int +memb_real_ext3_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value == 1LL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} -/*** <<< CODE [Real] >>> ***/ +static int +memb_real_ext4_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const REAL_t *st = (const REAL_t *)sptr; + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_REAL2double(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value == 1.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} -int -Real_constraint(asn_TYPE_descriptor_t *td, const void *sptr, +static int +memb_real_ext6_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const REAL_t *st = (const REAL_t *)sptr; double value; @@ -2507,7 +3268,7 @@ Real_constraint(asn_TYPE_descriptor_t *td, const void *sptr, return -1; } - if((value >= 1LL && value <= 21999LL)) { + if((value >= 1LL && value <= 4LL)) { /* Constraint check succeeded */ return 0; } else { @@ -2518,30 +3279,300 @@ Real_constraint(asn_TYPE_descriptor_t *td, const void *sptr, } } -/* - * This type is implemented using REAL, - * so here we adjust the DEF accordingly. - */ -/*** <<< STAT-DEFS [Real] >>> ***/ - -static const ber_tlv_tag_t asn_DEF_Real_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)) -}; -asn_TYPE_descriptor_t asn_DEF_Real = { - "Real", - "Real", - &asn_OP_REAL, - Real_constraint, - asn_DEF_Real_tags_1, - sizeof(asn_DEF_Real_tags_1) - /sizeof(asn_DEF_Real_tags_1[0]), /* 1 */ - asn_DEF_Real_tags_1, /* Same as above */ - sizeof(asn_DEF_Real_tags_1) - /sizeof(asn_DEF_Real_tags_1[0]), /* 1 */ +/*** <<< STAT-DEFS [SequenceReal] >>> ***/ + +static asn_TYPE_member_t asn_MBR_SequenceReal_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = 0, /* Defer constraints checking to the member type */ + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_const0), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_const0_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-const0" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_const1), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_const1_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-const1" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_const2), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_const2_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-const2" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_const30), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_const30_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-const30" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_const3), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_const3_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-const3" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_const31), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_const31_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-const31" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_const4), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_const4_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-const4" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_min), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_min_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-min" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_max0), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_max0_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-max0" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_max), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_max_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-max" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_intc0), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_intc0_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-intc0" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_intc1), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_intc1_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-intc1" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_intc2), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_intc2_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-intc2" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_intc3), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_intc3_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-intc3" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_intmin), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_intmin_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-intmin" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_intmax), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_intmax_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-intmax" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_mix1), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_mix1_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-mix1" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_mix2), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_mix2_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-mix2" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_ext), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_ext_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-ext" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_ext1), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_ext1_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-ext1" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_ext2), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_ext2_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-ext2" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_ext21), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_ext21_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-ext21" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_ext3), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_ext3_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-ext3" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_ext4), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_ext4_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-ext4" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_ext6), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_REAL, + .memb_constraints = memb_real_ext6_constraint_1, + .per_constraints = 0, /* PER is not compiled, use -gen-PER */ + .default_value = 0, + .name = "real-ext6" + }, +}; +static const ber_tlv_tag_t asn_DEF_SequenceReal_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_SequenceReal_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 0, 0, 25 }, /* real */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 1, -1, 24 }, /* real-const0 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 2, -2, 23 }, /* real-const1 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 3, -3, 22 }, /* real-const2 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 4, -4, 21 }, /* real-const30 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 5, -5, 20 }, /* real-const3 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 6, -6, 19 }, /* real-const31 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 7, -7, 18 }, /* real-const4 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 8, -8, 17 }, /* real-min */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 9, -9, 16 }, /* real-max0 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 10, -10, 15 }, /* real-max */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 11, -11, 14 }, /* real-intc0 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 12, -12, 13 }, /* real-intc1 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 13, -13, 12 }, /* real-intc2 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 14, -14, 11 }, /* real-intc3 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 15, -15, 10 }, /* real-intmin */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 16, -16, 9 }, /* real-intmax */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 17, -17, 8 }, /* real-mix1 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 18, -18, 7 }, /* real-mix2 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 19, -19, 6 }, /* real-ext */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 20, -20, 5 }, /* real-ext1 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 21, -21, 4 }, /* real-ext2 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 22, -22, 3 }, /* real-ext21 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 23, -23, 2 }, /* real-ext3 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 24, -24, 1 }, /* real-ext4 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 25, -25, 0 } /* real-ext6 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_SequenceReal_specs_1 = { + sizeof(struct SequenceReal), + offsetof(struct SequenceReal, _asn_ctx), + asn_MAP_SequenceReal_tag2el_1, + 26, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 25, /* Start extensions */ + 27 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_SequenceReal = { + "SequenceReal", + "SequenceReal", + &asn_OP_SEQUENCE, + SEQUENCE_constraint, + asn_DEF_SequenceReal_tags_1, + sizeof(asn_DEF_SequenceReal_tags_1) + /sizeof(asn_DEF_SequenceReal_tags_1[0]), /* 1 */ + asn_DEF_SequenceReal_tags_1, /* Same as above */ + sizeof(asn_DEF_SequenceReal_tags_1) + /sizeof(asn_DEF_SequenceReal_tags_1[0]), /* 1 */ 0, /* No PER visible constraints */ - 0, 0, /* No members */ - 0 /* No specifics */ + asn_MBR_SequenceReal_1, + 26, /* Elements count */ + &asn_SPC_SequenceReal_specs_1 /* Additional specs */ }; diff --git a/tests/50-constraint-OK.asn1.-Pgen-PER b/tests/50-constraint-OK.asn1.-Pgen-PER index 0f8f25bf2..57346a683 100644 --- a/tests/50-constraint-OK.asn1.-Pgen-PER +++ b/tests/50-constraint-OK.asn1.-Pgen-PER @@ -2742,33 +2742,651 @@ asn_TYPE_descriptor_t asn_DEF_Enum1 = { }; -/*** <<< INCLUDES [Real] >>> ***/ +/*** <<< INCLUDES [SequenceReal] >>> ***/ #include +#include + +/*** <<< TYPE-DECLS [SequenceReal] >>> ***/ + +typedef struct SequenceReal { + double real; + double real_const0; + double real_const1; + double real_const2; + double real_const30; + double real_const3; + double real_const31; + double real_const4; + double real_min; + double real_max0; + double real_max; + double real_intc0; + double real_intc1; + double real_intc2; + double real_intc3; + double real_intmin; + double real_intmax; + double real_mix1; + double real_mix2; + double real_ext; + double real_ext1; + double real_ext2; + double real_ext21; + double real_ext3; + double real_ext4; + double real_ext6; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} SequenceReal_t; + +/*** <<< FUNC-DECLS [SequenceReal] >>> ***/ + +extern asn_TYPE_descriptor_t asn_DEF_SequenceReal; + +/*** <<< CODE [SequenceReal] >>> ***/ -/*** <<< TYPE-DECLS [Real] >>> ***/ +static int +memb_real_const0_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value == 0.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} -typedef double Real_t; +static int +memb_real_const1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value == 1.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} -/*** <<< FUNC-DECLS [Real] >>> ***/ +static int +memb_real_const2_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value >= 1.050000L && value <= 21999.950000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_const30_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if(((value == 0.000000L) || (value == 0.010000L))) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_const3_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if(((value == 1.070000L) || (value == 1.080000L))) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_const31_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value >= -1.000000L && value <= 0.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_const4_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value >= 0.000000L && value <= 1.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_min_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value <= 0.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_max0_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value >= 0.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_max_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value >= 1.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_intc0_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value == 0LL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_intc1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value == 1LL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_intc2_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value >= 1LL && value <= 21999LL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_intc3_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value >= 0LL && value <= 9223372036854775807LL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_intmin_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value <= 1LL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_intmax_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value >= 1LL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_mix1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value >= 1.500000L && value <= 21999LL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_mix2_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value >= 1LL && value <= 21999.990000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_ext_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + + if(1 /* No applicable constraints whatsoever */) { + /* Nothing is here. See below */ + } + + return td->check_constraints(td, sptr, ctfailcb, app_key); +} + +static int +memb_real_ext1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value >= 1.100000L && value <= 10.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_ext2_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if(((value >= 1.100000L && value <= 10.000000L) || (value >= 10.010000L && value <= 11.000000L))) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_real_ext21_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value >= 1.100000L && value <= 11.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} -extern asn_TYPE_descriptor_t asn_DEF_Real; -asn_struct_free_f Real_free; -asn_struct_print_f Real_print; -asn_constr_check_f Real_constraint; -ber_type_decoder_f Real_decode_ber; -der_type_encoder_f Real_encode_der; -xer_type_decoder_f Real_decode_xer; -xer_type_encoder_f Real_encode_xer; -per_type_decoder_f Real_decode_uper; -per_type_encoder_f Real_encode_uper; -per_type_decoder_f Real_decode_aper; -per_type_encoder_f Real_encode_aper; +static int +memb_real_ext3_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value == 1LL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} -/*** <<< CODE [Real] >>> ***/ +static int +memb_real_ext4_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + double value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const double *)sptr; + + if((value == 1.000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} -int -Real_constraint(asn_TYPE_descriptor_t *td, const void *sptr, +static int +memb_real_ext6_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { double value; @@ -2781,7 +3399,7 @@ Real_constraint(asn_TYPE_descriptor_t *td, const void *sptr, value = *(const double *)sptr; - if((value >= 1LL && value <= 21999LL)) { + if((value >= 1LL && value <= 4LL)) { /* Constraint check succeeded */ return 0; } else { @@ -2792,38 +3410,428 @@ Real_constraint(asn_TYPE_descriptor_t *td, const void *sptr, } } -/* - * This type is implemented using NativeReal, - * so here we adjust the DEF accordingly. - */ -/*** <<< CTDEFS [Real] >>> ***/ +/*** <<< CTDEFS [SequenceReal] >>> ***/ -static asn_per_constraints_t asn_PER_type_Real_constr_1 GCC_NOTUSED = { - { APC_CONSTRAINED, 15, 15, 1l, 21999l } /* (1..21999) */, +static asn_per_constraints_t asn_PER_memb_real_const0_constr_3 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_const1_constr_4 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_const2_constr_5 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_const30_constr_6 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_const3_constr_7 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_const31_constr_8 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_const4_constr_9 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_min_constr_10 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_max0_constr_11 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_max_constr_12 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_intc0_constr_13 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_intc1_constr_14 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_intc2_constr_15 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_intc3_constr_16 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_intmin_constr_17 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_intmax_constr_18 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_mix1_constr_19 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_mix2_constr_20 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_ext_constr_21 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_ext1_constr_22 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_ext2_constr_23 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_ext21_constr_24 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_ext3_constr_25 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_ext4_constr_26 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_per_constraints_t asn_PER_memb_real_ext6_constr_27 GCC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; -/*** <<< STAT-DEFS [Real] >>> ***/ +/*** <<< STAT-DEFS [SequenceReal] >>> ***/ -static const ber_tlv_tag_t asn_DEF_Real_tags_1[] = { - (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)) +static asn_TYPE_member_t asn_MBR_SequenceReal_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = 0, /* Defer constraints checking to the member type */ + .per_constraints = 0, /* No PER visible constraints */ + .default_value = 0, + .name = "real" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_const0), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_const0_constraint_1, + .per_constraints = &asn_PER_memb_real_const0_constr_3, + .default_value = 0, + .name = "real-const0" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_const1), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_const1_constraint_1, + .per_constraints = &asn_PER_memb_real_const1_constr_4, + .default_value = 0, + .name = "real-const1" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_const2), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_const2_constraint_1, + .per_constraints = &asn_PER_memb_real_const2_constr_5, + .default_value = 0, + .name = "real-const2" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_const30), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_const30_constraint_1, + .per_constraints = &asn_PER_memb_real_const30_constr_6, + .default_value = 0, + .name = "real-const30" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_const3), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_const3_constraint_1, + .per_constraints = &asn_PER_memb_real_const3_constr_7, + .default_value = 0, + .name = "real-const3" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_const31), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_const31_constraint_1, + .per_constraints = &asn_PER_memb_real_const31_constr_8, + .default_value = 0, + .name = "real-const31" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_const4), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_const4_constraint_1, + .per_constraints = &asn_PER_memb_real_const4_constr_9, + .default_value = 0, + .name = "real-const4" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_min), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_min_constraint_1, + .per_constraints = &asn_PER_memb_real_min_constr_10, + .default_value = 0, + .name = "real-min" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_max0), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_max0_constraint_1, + .per_constraints = &asn_PER_memb_real_max0_constr_11, + .default_value = 0, + .name = "real-max0" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_max), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_max_constraint_1, + .per_constraints = &asn_PER_memb_real_max_constr_12, + .default_value = 0, + .name = "real-max" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_intc0), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_intc0_constraint_1, + .per_constraints = &asn_PER_memb_real_intc0_constr_13, + .default_value = 0, + .name = "real-intc0" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_intc1), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_intc1_constraint_1, + .per_constraints = &asn_PER_memb_real_intc1_constr_14, + .default_value = 0, + .name = "real-intc1" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_intc2), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_intc2_constraint_1, + .per_constraints = &asn_PER_memb_real_intc2_constr_15, + .default_value = 0, + .name = "real-intc2" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_intc3), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_intc3_constraint_1, + .per_constraints = &asn_PER_memb_real_intc3_constr_16, + .default_value = 0, + .name = "real-intc3" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_intmin), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_intmin_constraint_1, + .per_constraints = &asn_PER_memb_real_intmin_constr_17, + .default_value = 0, + .name = "real-intmin" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_intmax), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_intmax_constraint_1, + .per_constraints = &asn_PER_memb_real_intmax_constr_18, + .default_value = 0, + .name = "real-intmax" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_mix1), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_mix1_constraint_1, + .per_constraints = &asn_PER_memb_real_mix1_constr_19, + .default_value = 0, + .name = "real-mix1" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_mix2), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_mix2_constraint_1, + .per_constraints = &asn_PER_memb_real_mix2_constr_20, + .default_value = 0, + .name = "real-mix2" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_ext), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_ext_constraint_1, + .per_constraints = &asn_PER_memb_real_ext_constr_21, + .default_value = 0, + .name = "real-ext" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_ext1), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_ext1_constraint_1, + .per_constraints = &asn_PER_memb_real_ext1_constr_22, + .default_value = 0, + .name = "real-ext1" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_ext2), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_ext2_constraint_1, + .per_constraints = &asn_PER_memb_real_ext2_constr_23, + .default_value = 0, + .name = "real-ext2" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_ext21), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_ext21_constraint_1, + .per_constraints = &asn_PER_memb_real_ext21_constr_24, + .default_value = 0, + .name = "real-ext21" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_ext3), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_ext3_constraint_1, + .per_constraints = &asn_PER_memb_real_ext3_constr_25, + .default_value = 0, + .name = "real-ext3" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_ext4), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_ext4_constraint_1, + .per_constraints = &asn_PER_memb_real_ext4_constr_26, + .default_value = 0, + .name = "real-ext4" + }, + { ATF_NOFLAGS, 0, offsetof(struct SequenceReal, real_ext6), + .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), + .tag_mode = 0, + .type = &asn_DEF_NativeReal, + .memb_constraints = memb_real_ext6_constraint_1, + .per_constraints = &asn_PER_memb_real_ext6_constr_27, + .default_value = 0, + .name = "real-ext6" + }, }; -asn_TYPE_descriptor_t asn_DEF_Real = { - "Real", - "Real", - &asn_OP_NativeReal, - Real_constraint, - asn_DEF_Real_tags_1, - sizeof(asn_DEF_Real_tags_1) - /sizeof(asn_DEF_Real_tags_1[0]), /* 1 */ - asn_DEF_Real_tags_1, /* Same as above */ - sizeof(asn_DEF_Real_tags_1) - /sizeof(asn_DEF_Real_tags_1[0]), /* 1 */ - &asn_PER_type_Real_constr_1, - 0, 0, /* No members */ - 0 /* No specifics */ +static const ber_tlv_tag_t asn_DEF_SequenceReal_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_SequenceReal_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 0, 0, 25 }, /* real */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 1, -1, 24 }, /* real-const0 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 2, -2, 23 }, /* real-const1 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 3, -3, 22 }, /* real-const2 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 4, -4, 21 }, /* real-const30 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 5, -5, 20 }, /* real-const3 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 6, -6, 19 }, /* real-const31 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 7, -7, 18 }, /* real-const4 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 8, -8, 17 }, /* real-min */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 9, -9, 16 }, /* real-max0 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 10, -10, 15 }, /* real-max */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 11, -11, 14 }, /* real-intc0 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 12, -12, 13 }, /* real-intc1 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 13, -13, 12 }, /* real-intc2 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 14, -14, 11 }, /* real-intc3 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 15, -15, 10 }, /* real-intmin */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 16, -16, 9 }, /* real-intmax */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 17, -17, 8 }, /* real-mix1 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 18, -18, 7 }, /* real-mix2 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 19, -19, 6 }, /* real-ext */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 20, -20, 5 }, /* real-ext1 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 21, -21, 4 }, /* real-ext2 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 22, -22, 3 }, /* real-ext21 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 23, -23, 2 }, /* real-ext3 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 24, -24, 1 }, /* real-ext4 */ + { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 25, -25, 0 } /* real-ext6 */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_SequenceReal_specs_1 = { + sizeof(struct SequenceReal), + offsetof(struct SequenceReal, _asn_ctx), + asn_MAP_SequenceReal_tag2el_1, + 26, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 25, /* Start extensions */ + 27 /* Stop extensions */ +}; +asn_TYPE_descriptor_t asn_DEF_SequenceReal = { + "SequenceReal", + "SequenceReal", + &asn_OP_SEQUENCE, + SEQUENCE_constraint, + asn_DEF_SequenceReal_tags_1, + sizeof(asn_DEF_SequenceReal_tags_1) + /sizeof(asn_DEF_SequenceReal_tags_1[0]), /* 1 */ + asn_DEF_SequenceReal_tags_1, /* Same as above */ + sizeof(asn_DEF_SequenceReal_tags_1) + /sizeof(asn_DEF_SequenceReal_tags_1[0]), /* 1 */ + 0, /* No PER visible constraints */ + asn_MBR_SequenceReal_1, + 26, /* Elements count */ + &asn_SPC_SequenceReal_specs_1 /* Additional specs */ };