blob: 1b50780a9aec2f3406045568fca8000d84760879 [file] [log] [blame]
rjw6c1fd8f2022-11-30 14:33:01 +08001#ifndef ESM_FAKE_SMIC_STRUCT_H
2#define ESM_FAKE_SMIC_STRUCT_H
3
4#include "kal_general_types.h"
5#include "kal_public_defs.h"
6#include "smic_struct.h"
7
8#define ESM_FAKE_SMIC_MAX_PSI 10
9#define ESM_FAKE_SMIC_MAX_EBI 15 //Should refer to ESM_EPSB_ID_TOTAL_NUM in module, ESM
10#define ESM_FAKE_SMIC_MAX_5G_CONFIG_LEN 20 // This only used by log_smic_5g_config_option_struct
11//----- For Simulating SMIC APIs -----//
12typedef struct
13{
14 kal_bool is_ebi_active[ESM_FAKE_SMIC_MAX_EBI + 1]; // ebi -> If state is active;
15} smic_4g_if_ebi_mapped_success_context_struct;
16
17typedef struct
18{
19 esm_smic_epsb_context_struct epsb_context[ESM_FAKE_SMIC_MAX_EBI + 1]; // ebi -> EPSB Context;
20} smic_4g_get_5g4_ebi_context_struct;
21
22typedef struct
23{
24 kal_uint8 psi;
25 kal_uint64 qfi_bitmap;
26} smic_get_ebi_mapped_psi_and_qfi_struct;
27
28typedef struct
29{
30 kal_uint8 psi; //ebi[1] = 5 => ebi 1 <> psi 5
31} smic_get_ebi_mapped_psi_after_23G4_struct;
32
33typedef struct
34{
35 ps_cause_enum cause_to_nw;
36 smic_4g_set_result_enum ret;
37} smic_4g_peer_msg_precheck_struct;
38typedef struct
39{
40 smic_4g_if_ebi_mapped_success_context_struct smic_4g_if_ebi_mapped_success_api;
41 smic_4g_get_5g4_ebi_context_struct smic_4g_get_5g4_ebi_api;
42 smic_get_ebi_mapped_psi_and_qfi_struct smic_get_ebi_mapped_psi_and_qfi_api[ESM_FAKE_SMIC_MAX_EBI + 1]; // ebi -> PSI and QFI Info;
43 smic_get_ebi_mapped_psi_after_23G4_struct smic_4g_get_psi_by_ebi_after_23G4_api[ESM_FAKE_SMIC_MAX_EBI + 1]; // ebi -> PSI
44 smic_4g_peer_msg_precheck_struct smic_4g_peer_msg_precheck[ESM_FAKE_SMIC_MAX_PSI + 1]; // psi -> smic_4g_peer_msg_precheck() output
45 esm_smic_precheck_epsb_context_struct smic_4g_precheck_epsb_context;
46} esm_ut_fake_smic_context_struct;
47
48
49
50typedef struct
51{
52 LOCAL_PARA_HDR
53 esm_ut_fake_smic_context_struct esm_ut_fake_smic_context;
54} esm_ut_set_fake_smic_context_struct; // MSG_ID_ESM_UT_SET_FAKE_SMIC_CONTEXT, used to set g_esm_ut_fake_smic_context
55
56//---- [End] For Simulating SMIC APIS ----//
57
58typedef enum
59{
60 FUNC_IDX_smic_4g_do_context_transfer_4g5 = 1, // Align with the start idx example in esm_uniontag.txt
61 FUNC_IDX_smic_4g_if_ebi_mapped_success,
62 FUNC_IDX_smic_4g_process_pdn_released,
63 FUNC_IDX_smic_4g_get_5g4_ebi_context,
64 FUNC_IDX_smic_get_ebi_mapped_psi_and_qfi,
65 FUNC_IDX_smic_4g_set_associated_ctx_and_pco,
66 FUNC_IDX_smic_4g_get_psi_by_ebi_after_23G4,
67 FUNC_IDX_smic_4g_peer_msg_precheck,
68} esm_log_args_of_smic_api_enum; // Define func_idx<>func_name mapping in esm_uniontag.txt
69
70
71typedef struct
72{
73 kal_uint16 protocol_id;
74 kal_uint16 protocol_config_len;
75 kal_uint8 protocol_config[ESM_FAKE_SMIC_MAX_5G_CONFIG_LEN];
76} log_smic_5g_config_option_struct; // This is only for ESM UT, and should include the same content as smic_5g_config_option_struct
77
78typedef struct
79{
80 LOCAL_PARA_HDR
81 esm_log_args_of_smic_api_enum func_idx; // Will determine the which member to use in the union func_name
82 union {
83 struct{
84 //[In]
85 kal_uint8 sim_idx;
86 //[Out]
87 kal_bool ret;
88 } smic_4g_do_context_transfer_4g5;
89
90 struct{
91 //[In]
92 kal_uint8 sim_idx;
93 kal_uint8 ebi;
94 kal_uint8 psi;
95 //[Out]
96 kal_bool ret;
97 } smic_4g_if_ebi_mapped_success;
98
99 struct{
100 //[In]
101 kal_uint8 sim_idx;
102 kal_uint8 ebi;
103 //[Out]
104 //(void)
105 } smic_4g_process_pdn_released;
106
107 struct{
108 //[In]
109 kal_uint8 sim_idx;
110 kal_uint8 ebi;
111 //[Out]
112 esm_smic_epsb_context_struct ebi_ctx;
113 kal_bool ret;
114 } smic_4g_get_5g4_ebi_context;
115
116 struct{
117 //[In]
118 kal_uint8 sim_idx;
119 kal_uint8 ebi;
120 //[Out]
121 kal_uint8 psi;
122 kal_uint64 qfi_bitmap;
123 kal_bool ret;
124 } smic_get_ebi_mapped_psi_and_qfi;
125
126 struct{
127 //[In]
128 kal_uint8 sim_idx;
129 kal_uint8 ebi;
130 kal_uint8 psi;
131 esm_smic_epsb_context_struct associated_ctx;
132 log_smic_5g_config_option_struct pco_5g[SMIC_MAX_NUM_OF_5G_IE_IN_PCO];
133 kal_uint8 num_of_pco_5g;
134 //[Out]
135 //ps_cause_enum cause_to_nw;
136 //tft_bearer_act_enum bearer_action;
137 smic_4g_set_result_enum ret;
138 } smic_4g_set_associated_ctx_and_pco;
139
140 struct
141 {
142 //[In]
143 kal_uint8 sim_idx;
144 kal_uint8 ebi;
145 //[Out]
146 kal_uint8 psi;
147 kal_bool ret;
148 } smic_4g_get_psi_by_ebi_after_23G4;
149
150
151 struct
152 {
153 //[in]
154 kal_uint8 sim_idx;
155 kal_uint8 psi;
156 kal_uint8 ebi;
157 smic_esm_peer_msg_precheck_info_struct esm_precheck_info;
158 log_smic_5g_config_option_struct pco_5g[SMIC_MAX_NUM_OF_5G_IE_IN_PCO];
159 kal_uint8 num_of_pco_5g;
160 tft_bearer_act_enum bearer_action;
161 //[out]
162 ps_cause_enum cause_to_nw;
163 smic_4g_set_result_enum ret;
164 } smic_4g_peer_msg_precheck;
165
166 } func_name;
167} esm_log_args_of_smic_api_struct; // MSG_ID_ESM_LOG_ARGS_OF_SMIC_API
168
169#endif