blob: 606755f04103e477ee79550cd709fc6a4023fd7e [file] [log] [blame]
Harald Welteee091892015-09-10 10:22:03 +02001/*
2 * Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
3 * From ASN.1 module "RANAP-IEs"
4 * found in "../../asn1/ranap/RANAP-IEs.asn"
5 */
6
Neels Hofmeyrf1f2d7c2016-01-05 12:00:06 +01007#include <osmocom/ranap/RANAP_Event1I-Parameters.h>
Harald Welteee091892015-09-10 10:22:03 +02008
9static int
10memb_threshold_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
11 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
12 long value;
13
14 if(!sptr) {
15 _ASN_CTFAIL(app_key, td, sptr,
16 "%s: value not given (%s:%d)",
17 td->name, __FILE__, __LINE__);
18 return -1;
19 }
20
21 value = *(const long *)sptr;
22
23 if((value >= -120ull && value <= -25ull)) {
24 /* Constraint check succeeded */
25 return 0;
26 } else {
27 _ASN_CTFAIL(app_key, td, sptr,
28 "%s: constraint failed (%s:%d)",
29 td->name, __FILE__, __LINE__);
30 return -1;
31 }
32}
33
34static asn_per_constraints_t asn_PER_memb_threshold_constr_2 GCC_NOTUSED = {
35 { APC_CONSTRAINED, 7, 7, -120ull, -25ull } /* (-120..-25) */,
36 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
37 0, 0 /* No PER value map */
38};
39static asn_TYPE_member_t asn_MBR_RANAP_Event1I_Parameters_1[] = {
40 { ATF_NOFLAGS, 0, offsetof(struct RANAP_Event1I_Parameters, threshold),
41 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
42 -1, /* IMPLICIT tag at current level */
43 &asn_DEF_NativeInteger,
44 memb_threshold_constraint_1,
45 &asn_PER_memb_threshold_constr_2,
46 0,
47 "threshold"
48 },
49};
50static const ber_tlv_tag_t asn_DEF_RANAP_Event1I_Parameters_tags_1[] = {
51 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
52};
53static const asn_TYPE_tag2member_t asn_MAP_RANAP_Event1I_Parameters_tag2el_1[] = {
54 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* threshold */
55};
56static asn_SEQUENCE_specifics_t asn_SPC_RANAP_Event1I_Parameters_specs_1 = {
57 sizeof(struct RANAP_Event1I_Parameters),
58 offsetof(struct RANAP_Event1I_Parameters, _asn_ctx),
59 asn_MAP_RANAP_Event1I_Parameters_tag2el_1,
60 1, /* Count of tags in the map */
61 0, 0, 0, /* Optional elements (not needed) */
62 0, /* Start extensions */
63 2 /* Stop extensions */
64};
65asn_TYPE_descriptor_t asn_DEF_RANAP_Event1I_Parameters = {
66 "RANAP_Event1I-Parameters",
67 "RANAP_Event1I-Parameters",
68 SEQUENCE_free,
69 SEQUENCE_print,
70 SEQUENCE_constraint,
71 SEQUENCE_decode_ber,
72 SEQUENCE_encode_der,
73 SEQUENCE_decode_xer,
74 SEQUENCE_encode_xer,
75 SEQUENCE_decode_uper,
76 SEQUENCE_encode_uper,
77 SEQUENCE_decode_aper,
78 SEQUENCE_encode_aper,
79 0, /* Use generic outmost tag fetcher */
80 asn_DEF_RANAP_Event1I_Parameters_tags_1,
81 sizeof(asn_DEF_RANAP_Event1I_Parameters_tags_1)
82 /sizeof(asn_DEF_RANAP_Event1I_Parameters_tags_1[0]), /* 1 */
83 asn_DEF_RANAP_Event1I_Parameters_tags_1, /* Same as above */
84 sizeof(asn_DEF_RANAP_Event1I_Parameters_tags_1)
85 /sizeof(asn_DEF_RANAP_Event1I_Parameters_tags_1[0]), /* 1 */
86 0, /* No PER visible constraints */
87 asn_MBR_RANAP_Event1I_Parameters_1,
88 1, /* Elements count */
89 &asn_SPC_RANAP_Event1I_Parameters_specs_1 /* Additional specs */
90};
91