gnss-sdr/src/core/libs/supl/asn-rrlp/Almanac-KeplerianSet.c

450 lines
12 KiB
C

/*
* Generated by asn1c-0.9.22 (http://lionet.info/asn1c)
* From ASN.1 module "RRLP-Components"
* found in "../rrlp-components.asn"
*/
#include "Almanac-KeplerianSet.h"
static int
memb_kepAlmanacE_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
long value;
if(!sptr) {
_ASN_CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
value = *(const long *)sptr;
if((value >= 0 && value <= 2047)) {
/* 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_kepAlmanacDeltaI_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
long value;
if(!sptr) {
_ASN_CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
value = *(const long *)sptr;
if((value >= -1024 && value <= 1023)) {
/* 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_kepAlmanacOmegaDot_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
long value;
if(!sptr) {
_ASN_CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
value = *(const long *)sptr;
if((value >= -1024 && value <= 1023)) {
/* 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_kepSVHealth_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
long value;
if(!sptr) {
_ASN_CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
value = *(const long *)sptr;
if((value >= 0 && value <= 15)) {
/* 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_kepAlmanacAPowerHalf_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
long value;
if(!sptr) {
_ASN_CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
value = *(const long *)sptr;
if((value >= -65536 && value <= 65535)) {
/* 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_kepAlmanacOmega0_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
long value;
if(!sptr) {
_ASN_CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
value = *(const long *)sptr;
if((value >= -32768 && value <= 32767)) {
/* 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_kepAlmanacW_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
long value;
if(!sptr) {
_ASN_CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
value = *(const long *)sptr;
if((value >= -32768 && value <= 32767)) {
/* 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_kepAlmanacM0_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
long value;
if(!sptr) {
_ASN_CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
value = *(const long *)sptr;
if((value >= -32768 && value <= 32767)) {
/* 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_kepAlmanacAF0_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
long value;
if(!sptr) {
_ASN_CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
value = *(const long *)sptr;
if((value >= -8192 && value <= 8191)) {
/* 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_kepAlmanacAF1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
long value;
if(!sptr) {
_ASN_CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
value = *(const long *)sptr;
if((value >= -1024 && value <= 1023)) {
/* Constraint check succeeded */
return 0;
} else {
_ASN_CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static asn_per_constraints_t ASN_PER_MEMB_KEP_ALMANAC_E_CONSTR_2 = {
{ APC_CONSTRAINED, 11, 11, 0, 2047 } /* (0..2047) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_per_constraints_t ASN_PER_MEMB_KEP_ALMANAC_DELTA_I_CONSTR_3 = {
{ APC_CONSTRAINED, 11, 11, -1024, 1023 } /* (-1024..1023) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_per_constraints_t ASN_PER_MEMB_KEP_ALMANAC_OMEGA_DOT_CONSTR_4 = {
{ APC_CONSTRAINED, 11, 11, -1024, 1023 } /* (-1024..1023) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_per_constraints_t ASN_PER_MEMB_KEP_SV_HEALTH_CONSTR_5 = {
{ APC_CONSTRAINED, 4, 4, 0, 15 } /* (0..15) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_per_constraints_t ASN_PER_MEMB_KEP_ALMANAC_A_POWER_HALF_CONSTR_6 = {
{ APC_CONSTRAINED, 17, -1, -65536, 65535 } /* (-65536..65535) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_per_constraints_t ASN_PER_MEMB_KEP_ALMANAC_OMEGA0_CONSTR_7 = {
{ APC_CONSTRAINED, 16, 16, -32768, 32767 } /* (-32768..32767) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_per_constraints_t ASN_PER_MEMB_KEP_ALMANAC_W_CONSTR_8 = {
{ APC_CONSTRAINED, 16, 16, -32768, 32767 } /* (-32768..32767) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_per_constraints_t ASN_PER_MEMB_KEP_ALMANAC_M0_CONSTR_9 = {
{ APC_CONSTRAINED, 16, 16, -32768, 32767 } /* (-32768..32767) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_per_constraints_t ASN_PER_MEMB_KEP_ALMANAC_A_F0_CONSTR_10 = {
{ APC_CONSTRAINED, 14, 14, -8192, 8191 } /* (-8192..8191) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_per_constraints_t ASN_PER_MEMB_KEP_ALMANAC_A_F1_CONSTR_11 = {
{ APC_CONSTRAINED, 11, 11, -1024, 1023 } /* (-1024..1023) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_TYPE_member_t asn_MBR_Almanac_KeplerianSet_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct Almanac_KeplerianSet, kepAlmanacE),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger,
memb_kepAlmanacE_constraint_1,
&ASN_PER_MEMB_KEP_ALMANAC_E_CONSTR_2,
0,
"kepAlmanacE"
},
{ ATF_NOFLAGS, 0, offsetof(struct Almanac_KeplerianSet, kepAlmanacDeltaI),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger,
memb_kepAlmanacDeltaI_constraint_1,
&ASN_PER_MEMB_KEP_ALMANAC_DELTA_I_CONSTR_3,
0,
"kepAlmanacDeltaI"
},
{ ATF_NOFLAGS, 0, offsetof(struct Almanac_KeplerianSet, kepAlmanacOmegaDot),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger,
memb_kepAlmanacOmegaDot_constraint_1,
&ASN_PER_MEMB_KEP_ALMANAC_OMEGA_DOT_CONSTR_4,
0,
"kepAlmanacOmegaDot"
},
{ ATF_NOFLAGS, 0, offsetof(struct Almanac_KeplerianSet, kepSVHealth),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger,
memb_kepSVHealth_constraint_1,
&ASN_PER_MEMB_KEP_SV_HEALTH_CONSTR_5,
0,
"kepSVHealth"
},
{ ATF_NOFLAGS, 0, offsetof(struct Almanac_KeplerianSet, kepAlmanacAPowerHalf),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger,
memb_kepAlmanacAPowerHalf_constraint_1,
&ASN_PER_MEMB_KEP_ALMANAC_A_POWER_HALF_CONSTR_6,
0,
"kepAlmanacAPowerHalf"
},
{ ATF_NOFLAGS, 0, offsetof(struct Almanac_KeplerianSet, kepAlmanacOmega0),
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger,
memb_kepAlmanacOmega0_constraint_1,
&ASN_PER_MEMB_KEP_ALMANAC_OMEGA0_CONSTR_7,
0,
"kepAlmanacOmega0"
},
{ ATF_NOFLAGS, 0, offsetof(struct Almanac_KeplerianSet, kepAlmanacW),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger,
memb_kepAlmanacW_constraint_1,
&ASN_PER_MEMB_KEP_ALMANAC_W_CONSTR_8,
0,
"kepAlmanacW"
},
{ ATF_NOFLAGS, 0, offsetof(struct Almanac_KeplerianSet, kepAlmanacM0),
(ASN_TAG_CLASS_CONTEXT | (7 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger,
memb_kepAlmanacM0_constraint_1,
&ASN_PER_MEMB_KEP_ALMANAC_M0_CONSTR_9,
0,
"kepAlmanacM0"
},
{ ATF_NOFLAGS, 0, offsetof(struct Almanac_KeplerianSet, kepAlmanacAF0),
(ASN_TAG_CLASS_CONTEXT | (8 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger,
memb_kepAlmanacAF0_constraint_1,
&ASN_PER_MEMB_KEP_ALMANAC_A_F0_CONSTR_10,
0,
"kepAlmanacAF0"
},
{ ATF_NOFLAGS, 0, offsetof(struct Almanac_KeplerianSet, kepAlmanacAF1),
(ASN_TAG_CLASS_CONTEXT | (9 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger,
memb_kepAlmanacAF1_constraint_1,
&ASN_PER_MEMB_KEP_ALMANAC_A_F1_CONSTR_11,
0,
"kepAlmanacAF1"
},
};
static ber_tlv_tag_t asn_DEF_Almanac_KeplerianSet_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_Almanac_KeplerianSet_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* kepAlmanacE at 1368 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* kepAlmanacDeltaI at 1369 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* kepAlmanacOmegaDot at 1370 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* kepSVHealth at 1371 */
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* kepAlmanacAPowerHalf at 1372 */
{ (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* kepAlmanacOmega0 at 1373 */
{ (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* kepAlmanacW at 1374 */
{ (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* kepAlmanacM0 at 1375 */
{ (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* kepAlmanacAF0 at 1376 */
{ (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 } /* kepAlmanacAF1 at 1377 */
};
static asn_SEQUENCE_specifics_t asn_SPC_Almanac_KeplerianSet_specs_1 = {
sizeof(struct Almanac_KeplerianSet),
offsetof(struct Almanac_KeplerianSet, _asn_ctx),
asn_MAP_Almanac_KeplerianSet_tag2el_1,
10, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
asn_TYPE_descriptor_t asn_DEF_Almanac_KeplerianSet = {
"Almanac-KeplerianSet",
"Almanac-KeplerianSet",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
SEQUENCE_decode_uper,
SEQUENCE_encode_uper,
0, /* Use generic outmost tag fetcher */
asn_DEF_Almanac_KeplerianSet_tags_1,
sizeof(asn_DEF_Almanac_KeplerianSet_tags_1)
/sizeof(asn_DEF_Almanac_KeplerianSet_tags_1[0]), /* 1 */
asn_DEF_Almanac_KeplerianSet_tags_1, /* Same as above */
sizeof(asn_DEF_Almanac_KeplerianSet_tags_1)
/sizeof(asn_DEF_Almanac_KeplerianSet_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_Almanac_KeplerianSet_1,
10, /* Elements count */
&asn_SPC_Almanac_KeplerianSet_specs_1 /* Additional specs */
};