acaf4a74fe91e1dddfe7fee5dcfb4e84dea1de8c
[ric-app/rc.git] / e2sm / lib / RANFunctionDefinition-Control-Action-Item.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "E2SM-RC-IEs"
4  *      found in "e2sm-rc-2.0.asn"
5  *      `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example -D .`
6  */
7
8 #include "RANFunctionDefinition-Control-Action-Item.h"
9
10 #include "ControlAction-RANParameter-Item.h"
11 /*
12  * This type is implemented using NativeEnumerated,
13  * so here we adjust the DEF accordingly.
14  */
15 static int
16 memb_ran_ControlActionParameters_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
17                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
18         size_t size;
19         
20         if(!sptr) {
21                 ASN__CTFAIL(app_key, td, sptr,
22                         "%s: value not given (%s:%d)",
23                         td->name, __FILE__, __LINE__);
24                 return -1;
25         }
26         
27         /* Determine the number of elements */
28         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
29         
30         if((size >= 1 && size <= 65535)) {
31                 /* Perform validation of the inner elements */
32                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
33         } else {
34                 ASN__CTFAIL(app_key, td, sptr,
35                         "%s: constraint failed (%s:%d)",
36                         td->name, __FILE__, __LINE__);
37                 return -1;
38         }
39 }
40
41 static asn_oer_constraints_t asn_OER_type_ueGroup_ControlAction_Supported_constr_4 CC_NOTUSED = {
42         { 0, 0 },
43         -1};
44 static asn_per_constraints_t asn_PER_type_ueGroup_ControlAction_Supported_constr_4 CC_NOTUSED = {
45         { APC_CONSTRAINED | APC_EXTENSIBLE,  1,  1,  0,  1 }    /* (0..1,...) */,
46         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
47         0, 0    /* No PER value map */
48 };
49 static asn_oer_constraints_t asn_OER_type_ran_ControlActionParameters_List_constr_8 CC_NOTUSED = {
50         { 0, 0 },
51         -1      /* (SIZE(1..65535)) */};
52 static asn_per_constraints_t asn_PER_type_ran_ControlActionParameters_List_constr_8 CC_NOTUSED = {
53         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
54         { APC_CONSTRAINED,       16,  16,  1,  65535 }  /* (SIZE(1..65535)) */,
55         0, 0    /* No PER value map */
56 };
57 static asn_oer_constraints_t asn_OER_memb_ran_ControlActionParameters_List_constr_8 CC_NOTUSED = {
58         { 0, 0 },
59         -1      /* (SIZE(1..65535)) */};
60 static asn_per_constraints_t asn_PER_memb_ran_ControlActionParameters_List_constr_8 CC_NOTUSED = {
61         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
62         { APC_CONSTRAINED,       16,  16,  1,  65535 }  /* (SIZE(1..65535)) */,
63         0, 0    /* No PER value map */
64 };
65 static const asn_INTEGER_enum_map_t asn_MAP_ueGroup_ControlAction_Supported_value2enum_4[] = {
66         { 0,    4,      "true" },
67         { 1,    5,      "false" }
68         /* This list is extensible */
69 };
70 static const unsigned int asn_MAP_ueGroup_ControlAction_Supported_enum2value_4[] = {
71         1,      /* false(1) */
72         0       /* true(0) */
73         /* This list is extensible */
74 };
75 static const asn_INTEGER_specifics_t asn_SPC_ueGroup_ControlAction_Supported_specs_4 = {
76         asn_MAP_ueGroup_ControlAction_Supported_value2enum_4,   /* "tag" => N; sorted by tag */
77         asn_MAP_ueGroup_ControlAction_Supported_enum2value_4,   /* N => "tag"; sorted by N */
78         2,      /* Number of elements in the maps */
79         3,      /* Extensions before this member */
80         1,      /* Strict enumeration */
81         0,      /* Native long size */
82         0
83 };
84 static const ber_tlv_tag_t asn_DEF_ueGroup_ControlAction_Supported_tags_4[] = {
85         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
86         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
87 };
88 static /* Use -fall-defs-global to expose */
89 asn_TYPE_descriptor_t asn_DEF_ueGroup_ControlAction_Supported_4 = {
90         "ueGroup-ControlAction-Supported",
91         "ueGroup-ControlAction-Supported",
92         &asn_OP_NativeEnumerated,
93         asn_DEF_ueGroup_ControlAction_Supported_tags_4,
94         sizeof(asn_DEF_ueGroup_ControlAction_Supported_tags_4)
95                 /sizeof(asn_DEF_ueGroup_ControlAction_Supported_tags_4[0]) - 1, /* 1 */
96         asn_DEF_ueGroup_ControlAction_Supported_tags_4, /* Same as above */
97         sizeof(asn_DEF_ueGroup_ControlAction_Supported_tags_4)
98                 /sizeof(asn_DEF_ueGroup_ControlAction_Supported_tags_4[0]), /* 2 */
99         { &asn_OER_type_ueGroup_ControlAction_Supported_constr_4, &asn_PER_type_ueGroup_ControlAction_Supported_constr_4, NativeEnumerated_constraint },
100         0, 0,   /* Defined elsewhere */
101         &asn_SPC_ueGroup_ControlAction_Supported_specs_4        /* Additional specs */
102 };
103
104 static asn_TYPE_member_t asn_MBR_ran_ControlActionParameters_List_8[] = {
105         { ATF_POINTER, 0, 0,
106                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
107                 0,
108                 &asn_DEF_ControlAction_RANParameter_Item,
109                 0,
110                 { 0, 0, 0 },
111                 0, 0, /* No default value */
112                 ""
113                 },
114 };
115 static const ber_tlv_tag_t asn_DEF_ran_ControlActionParameters_List_tags_8[] = {
116         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
117         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
118 };
119 static asn_SET_OF_specifics_t asn_SPC_ran_ControlActionParameters_List_specs_8 = {
120         sizeof(struct RANFunctionDefinition_Control_Action_Item__ran_ControlActionParameters_List),
121         offsetof(struct RANFunctionDefinition_Control_Action_Item__ran_ControlActionParameters_List, _asn_ctx),
122         0,      /* XER encoding is XMLDelimitedItemList */
123 };
124 static /* Use -fall-defs-global to expose */
125 asn_TYPE_descriptor_t asn_DEF_ran_ControlActionParameters_List_8 = {
126         "ran-ControlActionParameters-List",
127         "ran-ControlActionParameters-List",
128         &asn_OP_SEQUENCE_OF,
129         asn_DEF_ran_ControlActionParameters_List_tags_8,
130         sizeof(asn_DEF_ran_ControlActionParameters_List_tags_8)
131                 /sizeof(asn_DEF_ran_ControlActionParameters_List_tags_8[0]) - 1, /* 1 */
132         asn_DEF_ran_ControlActionParameters_List_tags_8,        /* Same as above */
133         sizeof(asn_DEF_ran_ControlActionParameters_List_tags_8)
134                 /sizeof(asn_DEF_ran_ControlActionParameters_List_tags_8[0]), /* 2 */
135         { &asn_OER_type_ran_ControlActionParameters_List_constr_8, &asn_PER_type_ran_ControlActionParameters_List_constr_8, SEQUENCE_OF_constraint },
136         asn_MBR_ran_ControlActionParameters_List_8,
137         1,      /* Single element */
138         &asn_SPC_ran_ControlActionParameters_List_specs_8       /* Additional specs */
139 };
140
141 asn_TYPE_member_t asn_MBR_RANFunctionDefinition_Control_Action_Item_1[] = {
142         { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Control_Action_Item, ric_ControlAction_ID),
143                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
144                 -1,     /* IMPLICIT tag at current level */
145                 &asn_DEF_RIC_ControlAction_ID,
146                 0,
147                 { 0, 0, 0 },
148                 0, 0, /* No default value */
149                 "ric-ControlAction-ID"
150                 },
151         { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Control_Action_Item, ric_ControlAction_Name),
152                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
153                 -1,     /* IMPLICIT tag at current level */
154                 &asn_DEF_RIC_ControlAction_Name,
155                 0,
156                 { 0, 0, 0 },
157                 0, 0, /* No default value */
158                 "ric-ControlAction-Name"
159                 },
160         { ATF_NOFLAGS, 0, offsetof(struct RANFunctionDefinition_Control_Action_Item, ueGroup_ControlAction_Supported),
161                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
162                 -1,     /* IMPLICIT tag at current level */
163                 &asn_DEF_ueGroup_ControlAction_Supported_4,
164                 0,
165                 { 0, 0, 0 },
166                 0, 0, /* No default value */
167                 "ueGroup-ControlAction-Supported"
168                 },
169         { ATF_POINTER, 1, offsetof(struct RANFunctionDefinition_Control_Action_Item, ran_ControlActionParameters_List),
170                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
171                 0,
172                 &asn_DEF_ran_ControlActionParameters_List_8,
173                 0,
174                 { &asn_OER_memb_ran_ControlActionParameters_List_constr_8, &asn_PER_memb_ran_ControlActionParameters_List_constr_8,  memb_ran_ControlActionParameters_List_constraint_1 },
175                 0, 0, /* No default value */
176                 "ran-ControlActionParameters-List"
177                 },
178 };
179 static const int asn_MAP_RANFunctionDefinition_Control_Action_Item_oms_1[] = { 3 };
180 static const ber_tlv_tag_t asn_DEF_RANFunctionDefinition_Control_Action_Item_tags_1[] = {
181         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
182 };
183 static const asn_TYPE_tag2member_t asn_MAP_RANFunctionDefinition_Control_Action_Item_tag2el_1[] = {
184     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ric-ControlAction-ID */
185     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ric-ControlAction-Name */
186     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ueGroup-ControlAction-Supported */
187     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* ran-ControlActionParameters-List */
188 };
189 asn_SEQUENCE_specifics_t asn_SPC_RANFunctionDefinition_Control_Action_Item_specs_1 = {
190         sizeof(struct RANFunctionDefinition_Control_Action_Item),
191         offsetof(struct RANFunctionDefinition_Control_Action_Item, _asn_ctx),
192         asn_MAP_RANFunctionDefinition_Control_Action_Item_tag2el_1,
193         4,      /* Count of tags in the map */
194         asn_MAP_RANFunctionDefinition_Control_Action_Item_oms_1,        /* Optional members */
195         1, 0,   /* Root/Additions */
196         4,      /* First extension addition */
197 };
198 asn_TYPE_descriptor_t asn_DEF_RANFunctionDefinition_Control_Action_Item = {
199         "RANFunctionDefinition-Control-Action-Item",
200         "RANFunctionDefinition-Control-Action-Item",
201         &asn_OP_SEQUENCE,
202         asn_DEF_RANFunctionDefinition_Control_Action_Item_tags_1,
203         sizeof(asn_DEF_RANFunctionDefinition_Control_Action_Item_tags_1)
204                 /sizeof(asn_DEF_RANFunctionDefinition_Control_Action_Item_tags_1[0]), /* 1 */
205         asn_DEF_RANFunctionDefinition_Control_Action_Item_tags_1,       /* Same as above */
206         sizeof(asn_DEF_RANFunctionDefinition_Control_Action_Item_tags_1)
207                 /sizeof(asn_DEF_RANFunctionDefinition_Control_Action_Item_tags_1[0]), /* 1 */
208         { 0, 0, SEQUENCE_constraint },
209         asn_MBR_RANFunctionDefinition_Control_Action_Item_1,
210         4,      /* Elements count */
211         &asn_SPC_RANFunctionDefinition_Control_Action_Item_specs_1      /* Additional specs */
212 };
213