1 # *******************************************************************************
2 # * Copyright 2020 Samsung Electronics All Rights Reserved.
4 # * Licensed under the Apache License, Version 2.0 (the "License");
5 # * you may not use this file except in compliance with the License.
6 # * You may obtain a copy of the License at
8 # * http://www.apache.org/licenses/LICENSE-2.0
10 # * Unless required by applicable law or agreed to in writing, software
11 # * distributed under the License is distributed on an "AS IS" BASIS,
12 # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # * See the License for the specific language governing permissions and
14 # * limitations under the License.
16 # *******************************************************************************
17 from ctypes import POINTER, Structure
18 from ctypes import c_long, c_size_t, c_int, c_uint8
21 class indication_msg_t(Structure):
23 A class that mirrored E2AP's RICIndicationMessage with python
25 c-type struct of RICIndicationMessage
26 ---------------------------------------
27 typedef struct RICindicationMessage {
29 long requestSequenceNumber;
34 uint8_t *indicationHeader;
35 size_t indicationHeaderSize;
36 uint8_t *indicationMessage;
37 size_t indicationMessageSize;
38 uint8_t *callProcessID;
39 size_t callProcessIDSize;
41 ---------------------------------------
44 ("request_id", c_long),
45 ("request_sequence_number", c_long),
46 ("function_id", c_long),
47 ("action_id", c_long),
48 ("indication_sequence_number", c_long),
49 ("indication_type", c_long),
50 ("indication_header", POINTER(c_uint8)),
51 ("indication_header_length", c_size_t),
52 ("indication_message", POINTER(c_uint8)),
53 ("indication_message_length", c_size_t),
54 ("call_process_id", POINTER(c_uint8)),
55 ("call_process_id_length", c_size_t),
59 class causeItem_msg_t(Structure):
61 A class that mirrored E2AP's RICcauseItem with python
63 c-type struct of RICcauseItem
64 -----------------------------
65 typedef struct RICcauseItem {
69 -----------------------------
72 ("cause_type", c_int),
77 class actionAdmittedList_msg_t(Structure):
79 A class that mirrored E2AP's RICactionAdmittedList with python
81 c-type struct of RICactionAdmittedList
82 --------------------------------------
83 typedef struct RICactionAdmittedList {
86 } RICactionAdmittedList;
87 --------------------------------------
90 ("request_id", c_long * 16),
95 class actionNotAdmittedList_msg_t(Structure):
97 A class that mirrored E2AP's RICactionNotAdmittedList with python
99 c-type struct of RICactionNotAdmittedList
100 -------------------------------------------------------
101 typedef struct RICactionNotAdmittedList {
102 long ricActionID[16];
103 RICcauseItem ricCause[16];
105 } RICactionNotAdmittedList;
106 -------------------------------------------------------
109 ("request_id", c_long * 16),
110 ("cause", causeItem_msg_t * 16),
115 class subResp_msg_t(Structure):
117 A class that mirrored E2AP's subscriptionResponseMessage with python
119 c-type struct of subscriptionResponseMessage
120 -------------------------------------------------------
121 typedef struct RICsubscriptionResponseMessage {
123 long requestSequenceNumber;
125 RICactionAdmittedList ricActionAdmittedList;
126 RICactionNotAdmittedList ricActionNotAdmittedList;
127 } RICsubscriptionResponseMsg;
128 -------------------------------------------------------
131 ("request_id", c_long),
132 ("request_sequence_number", c_long),
133 ("function_id", c_long),
134 ("action_admitted_list", actionAdmittedList_msg_t),
135 ("action_not_admitted_list", actionNotAdmittedList_msg_t),
139 class ric_action_definition_t(Structure):
141 A class that mirrored E2AP's RICactionDefinition with python
143 c-type struct of RICactionDefinition
144 -------------------------------------------------------
145 typedef struct RICactionDefinition {
146 uint8_t *actionDefinition;
148 } RICactionDefinition;
149 -------------------------------------------------------
152 ("action_definition", POINTER(c_uint8)),
157 class ric_subsequent_action_t(Structure):
159 A class that mirrored E2AP's RICSubsequentAction with python
161 c-type struct of RICSubsequentAction
162 -------------------------------------------------------
163 typedef struct RICSubsequentAction {
165 long subsequentActionType;
167 } RICSubsequentAction;
168 -------------------------------------------------------
172 ("subsequent_action_type", c_long),
173 ("time_to_wait", c_long),