804440d9537753919ffb3a1b32f2bb8c224e1fc7
[ric-plt/submgr.git] / e2ap / lib / DataTrafficResourceIndication.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "X2AP-IEs"
4  *      found in "X2AP-15-4-0.asn1"
5  *      `asn1c -D ./asn1_n1 -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example`
6  */
7
8 #include "DataTrafficResourceIndication.h"
9
10 #include "ReservedSubframePattern.h"
11 #include "ProtocolExtensionContainer.h"
12 static int
13 memb_activationSFN_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
14                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
15         long value;
16         
17         if(!sptr) {
18                 ASN__CTFAIL(app_key, td, sptr,
19                         "%s: value not given (%s:%d)",
20                         td->name, __FILE__, __LINE__);
21                 return -1;
22         }
23         
24         value = *(const long *)sptr;
25         
26         if((value >= 0 && value <= 1023)) {
27                 /* Constraint check succeeded */
28                 return 0;
29         } else {
30                 ASN__CTFAIL(app_key, td, sptr,
31                         "%s: constraint failed (%s:%d)",
32                         td->name, __FILE__, __LINE__);
33                 return -1;
34         }
35 }
36
37 static asn_oer_constraints_t asn_OER_memb_activationSFN_constr_2 CC_NOTUSED = {
38         { 2, 1 }        /* (0..1023) */,
39         -1};
40 static asn_per_constraints_t asn_PER_memb_activationSFN_constr_2 CC_NOTUSED = {
41         { APC_CONSTRAINED,       10,  10,  0,  1023 }   /* (0..1023) */,
42         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
43         0, 0    /* No PER value map */
44 };
45 static asn_TYPE_member_t asn_MBR_DataTrafficResourceIndication_1[] = {
46         { ATF_NOFLAGS, 0, offsetof(struct DataTrafficResourceIndication, activationSFN),
47                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
48                 -1,     /* IMPLICIT tag at current level */
49                 &asn_DEF_NativeInteger,
50                 0,
51                 { &asn_OER_memb_activationSFN_constr_2, &asn_PER_memb_activationSFN_constr_2,  memb_activationSFN_constraint_1 },
52                 0, 0, /* No default value */
53                 "activationSFN"
54                 },
55         { ATF_NOFLAGS, 0, offsetof(struct DataTrafficResourceIndication, sharedResourceType),
56                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
57                 +1,     /* EXPLICIT tag at current level */
58                 &asn_DEF_SharedResourceType,
59                 0,
60                 { 0, 0, 0 },
61                 0, 0, /* No default value */
62                 "sharedResourceType"
63                 },
64         { ATF_POINTER, 2, offsetof(struct DataTrafficResourceIndication, reservedSubframePattern),
65                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
66                 -1,     /* IMPLICIT tag at current level */
67                 &asn_DEF_ReservedSubframePattern,
68                 0,
69                 { 0, 0, 0 },
70                 0, 0, /* No default value */
71                 "reservedSubframePattern"
72                 },
73         { ATF_POINTER, 1, offsetof(struct DataTrafficResourceIndication, iE_Extensions),
74                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
75                 -1,     /* IMPLICIT tag at current level */
76                 &asn_DEF_ProtocolExtensionContainer_7683P131,
77                 0,
78                 { 0, 0, 0 },
79                 0, 0, /* No default value */
80                 "iE-Extensions"
81                 },
82 };
83 static const int asn_MAP_DataTrafficResourceIndication_oms_1[] = { 2, 3 };
84 static const ber_tlv_tag_t asn_DEF_DataTrafficResourceIndication_tags_1[] = {
85         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
86 };
87 static const asn_TYPE_tag2member_t asn_MAP_DataTrafficResourceIndication_tag2el_1[] = {
88     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* activationSFN */
89     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* sharedResourceType */
90     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* reservedSubframePattern */
91     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */
92 };
93 static asn_SEQUENCE_specifics_t asn_SPC_DataTrafficResourceIndication_specs_1 = {
94         sizeof(struct DataTrafficResourceIndication),
95         offsetof(struct DataTrafficResourceIndication, _asn_ctx),
96         asn_MAP_DataTrafficResourceIndication_tag2el_1,
97         4,      /* Count of tags in the map */
98         asn_MAP_DataTrafficResourceIndication_oms_1,    /* Optional members */
99         2, 0,   /* Root/Additions */
100         4,      /* First extension addition */
101 };
102 asn_TYPE_descriptor_t asn_DEF_DataTrafficResourceIndication = {
103         "DataTrafficResourceIndication",
104         "DataTrafficResourceIndication",
105         &asn_OP_SEQUENCE,
106         asn_DEF_DataTrafficResourceIndication_tags_1,
107         sizeof(asn_DEF_DataTrafficResourceIndication_tags_1)
108                 /sizeof(asn_DEF_DataTrafficResourceIndication_tags_1[0]), /* 1 */
109         asn_DEF_DataTrafficResourceIndication_tags_1,   /* Same as above */
110         sizeof(asn_DEF_DataTrafficResourceIndication_tags_1)
111                 /sizeof(asn_DEF_DataTrafficResourceIndication_tags_1[0]), /* 1 */
112         { 0, 0, SEQUENCE_constraint },
113         asn_MBR_DataTrafficResourceIndication_1,
114         4,      /* Elements count */
115         &asn_SPC_DataTrafficResourceIndication_specs_1  /* Additional specs */
116 };
117