SIM-115: update simulator to use latest E2SM KPM version 3
[sim/e2-interface.git] / e2sim / asn1c / E2SM-KPM-EventTriggerDefinition-Format1.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "E2SM-KPM-IEs"
4  *      found in "e2sm-kpm-v03.00.asn"
5  *      `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -no-gen-OER -D /tmp/workspace/oransim-gerrit/e2sim/asn1c/`
6  */
7
8 #include "E2SM-KPM-EventTriggerDefinition-Format1.h"
9
10 static int
11 reportingPeriod_2_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
12                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13         unsigned long value;
14         
15         if(!sptr) {
16                 ASN__CTFAIL(app_key, td, sptr,
17                         "%s: value not given (%s:%d)",
18                         td->name, __FILE__, __LINE__);
19                 return -1;
20         }
21         
22         value = *(const unsigned long *)sptr;
23         
24         if((value >= 1UL && value <= 4294967295UL)) {
25                 /* Constraint check succeeded */
26                 return 0;
27         } else {
28                 ASN__CTFAIL(app_key, td, sptr,
29                         "%s: constraint failed (%s:%d)",
30                         td->name, __FILE__, __LINE__);
31                 return -1;
32         }
33 }
34
35 /*
36  * This type is implemented using NativeInteger,
37  * so here we adjust the DEF accordingly.
38  */
39 static int
40 memb_reportingPeriod_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
41                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
42         unsigned long value;
43         
44         if(!sptr) {
45                 ASN__CTFAIL(app_key, td, sptr,
46                         "%s: value not given (%s:%d)",
47                         td->name, __FILE__, __LINE__);
48                 return -1;
49         }
50         
51         value = *(const unsigned long *)sptr;
52         
53         if((value >= 1UL && value <= 4294967295UL)) {
54                 /* Constraint check succeeded */
55                 return 0;
56         } else {
57                 ASN__CTFAIL(app_key, td, sptr,
58                         "%s: constraint failed (%s:%d)",
59                         td->name, __FILE__, __LINE__);
60                 return -1;
61         }
62 }
63
64 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
65 static asn_per_constraints_t asn_PER_type_reportingPeriod_constr_2 CC_NOTUSED = {
66         { APC_CONSTRAINED,       32, -1,  1,  4294967295 }      /* (1..4294967295) */,
67         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
68         0, 0    /* No PER value map */
69 };
70 #endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
71 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
72 static asn_per_constraints_t asn_PER_memb_reportingPeriod_constr_2 CC_NOTUSED = {
73         { APC_CONSTRAINED,       32, -1,  1,  4294967295 }      /* (1..4294967295) */,
74         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
75         0, 0    /* No PER value map */
76 };
77 #endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
78 static const asn_INTEGER_specifics_t asn_SPC_reportingPeriod_specs_2 = {
79         0,      0,      0,      0,      0,
80         0,      /* Native long size */
81         1       /* Unsigned representation */
82 };
83 static const ber_tlv_tag_t asn_DEF_reportingPeriod_tags_2[] = {
84         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
85         (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
86 };
87 static /* Use -fall-defs-global to expose */
88 asn_TYPE_descriptor_t asn_DEF_reportingPeriod_2 = {
89         "reportingPeriod",
90         "reportingPeriod",
91         &asn_OP_NativeInteger,
92         asn_DEF_reportingPeriod_tags_2,
93         sizeof(asn_DEF_reportingPeriod_tags_2)
94                 /sizeof(asn_DEF_reportingPeriod_tags_2[0]) - 1, /* 1 */
95         asn_DEF_reportingPeriod_tags_2, /* Same as above */
96         sizeof(asn_DEF_reportingPeriod_tags_2)
97                 /sizeof(asn_DEF_reportingPeriod_tags_2[0]), /* 2 */
98         {
99 #if !defined(ASN_DISABLE_OER_SUPPORT)
100                 0,
101 #endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
102 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
103                 &asn_PER_type_reportingPeriod_constr_2,
104 #endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
105                 reportingPeriod_2_constraint
106         },
107         0, 0,   /* No members */
108         &asn_SPC_reportingPeriod_specs_2        /* Additional specs */
109 };
110
111 asn_TYPE_member_t asn_MBR_E2SM_KPM_EventTriggerDefinition_Format1_1[] = {
112         { ATF_NOFLAGS, 0, offsetof(struct E2SM_KPM_EventTriggerDefinition_Format1, reportingPeriod),
113                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
114                 -1,     /* IMPLICIT tag at current level */
115                 &asn_DEF_reportingPeriod_2,
116                 0,
117                 {
118 #if !defined(ASN_DISABLE_OER_SUPPORT)
119                         0,
120 #endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
121 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
122                         &asn_PER_memb_reportingPeriod_constr_2,
123 #endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
124                         memb_reportingPeriod_constraint_1
125                 },
126                 0, 0, /* No default value */
127                 "reportingPeriod"
128                 },
129 };
130 static const ber_tlv_tag_t asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1_tags_1[] = {
131         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
132 };
133 static const asn_TYPE_tag2member_t asn_MAP_E2SM_KPM_EventTriggerDefinition_Format1_tag2el_1[] = {
134     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* reportingPeriod */
135 };
136 asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_EventTriggerDefinition_Format1_specs_1 = {
137         sizeof(struct E2SM_KPM_EventTriggerDefinition_Format1),
138         offsetof(struct E2SM_KPM_EventTriggerDefinition_Format1, _asn_ctx),
139         asn_MAP_E2SM_KPM_EventTriggerDefinition_Format1_tag2el_1,
140         1,      /* Count of tags in the map */
141         0, 0, 0,        /* Optional elements (not needed) */
142         1,      /* First extension addition */
143 };
144 asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1 = {
145         "E2SM-KPM-EventTriggerDefinition-Format1",
146         "E2SM-KPM-EventTriggerDefinition-Format1",
147         &asn_OP_SEQUENCE,
148         asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1_tags_1,
149         sizeof(asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1_tags_1)
150                 /sizeof(asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1_tags_1[0]), /* 1 */
151         asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1_tags_1, /* Same as above */
152         sizeof(asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1_tags_1)
153                 /sizeof(asn_DEF_E2SM_KPM_EventTriggerDefinition_Format1_tags_1[0]), /* 1 */
154         {
155 #if !defined(ASN_DISABLE_OER_SUPPORT)
156                 0,
157 #endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
158 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
159                 0,
160 #endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
161                 SEQUENCE_constraint
162         },
163         asn_MBR_E2SM_KPM_EventTriggerDefinition_Format1_1,
164         1,      /* Elements count */
165         &asn_SPC_E2SM_KPM_EventTriggerDefinition_Format1_specs_1        /* Additional specs */
166 };
167