| #ifndef ESM_FAKE_SMIC_STRUCT_H |
| #define ESM_FAKE_SMIC_STRUCT_H |
| |
| #include "kal_general_types.h" |
| #include "kal_public_defs.h" |
| #include "smic_struct.h" |
| |
| #define ESM_FAKE_SMIC_MAX_PSI 10 |
| #define ESM_FAKE_SMIC_MAX_EBI 15 //Should refer to ESM_EPSB_ID_TOTAL_NUM in module, ESM |
| #define ESM_FAKE_SMIC_MAX_5G_CONFIG_LEN 20 // This only used by log_smic_5g_config_option_struct |
| //----- For Simulating SMIC APIs -----// |
| typedef struct |
| { |
| kal_bool is_ebi_active[ESM_FAKE_SMIC_MAX_EBI + 1]; // ebi -> If state is active; |
| } smic_4g_if_ebi_mapped_success_context_struct; |
| |
| typedef struct |
| { |
| esm_smic_epsb_context_struct epsb_context[ESM_FAKE_SMIC_MAX_EBI + 1]; // ebi -> EPSB Context; |
| } smic_4g_get_5g4_ebi_context_struct; |
| |
| typedef struct |
| { |
| kal_uint8 psi; |
| kal_uint64 qfi_bitmap; |
| } smic_get_ebi_mapped_psi_and_qfi_struct; |
| |
| typedef struct |
| { |
| kal_uint8 psi; //ebi[1] = 5 => ebi 1 <> psi 5 |
| } smic_get_ebi_mapped_psi_after_23G4_struct; |
| |
| typedef struct |
| { |
| ps_cause_enum cause_to_nw; |
| smic_4g_set_result_enum ret; |
| } smic_4g_peer_msg_precheck_struct; |
| typedef struct |
| { |
| smic_4g_if_ebi_mapped_success_context_struct smic_4g_if_ebi_mapped_success_api; |
| smic_4g_get_5g4_ebi_context_struct smic_4g_get_5g4_ebi_api; |
| 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; |
| 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 |
| smic_4g_peer_msg_precheck_struct smic_4g_peer_msg_precheck[ESM_FAKE_SMIC_MAX_PSI + 1]; // psi -> smic_4g_peer_msg_precheck() output |
| esm_smic_precheck_epsb_context_struct smic_4g_precheck_epsb_context; |
| } esm_ut_fake_smic_context_struct; |
| |
| |
| |
| typedef struct |
| { |
| LOCAL_PARA_HDR |
| esm_ut_fake_smic_context_struct esm_ut_fake_smic_context; |
| } esm_ut_set_fake_smic_context_struct; // MSG_ID_ESM_UT_SET_FAKE_SMIC_CONTEXT, used to set g_esm_ut_fake_smic_context |
| |
| //---- [End] For Simulating SMIC APIS ----// |
| |
| typedef enum |
| { |
| FUNC_IDX_smic_4g_do_context_transfer_4g5 = 1, // Align with the start idx example in esm_uniontag.txt |
| FUNC_IDX_smic_4g_if_ebi_mapped_success, |
| FUNC_IDX_smic_4g_process_pdn_released, |
| FUNC_IDX_smic_4g_get_5g4_ebi_context, |
| FUNC_IDX_smic_get_ebi_mapped_psi_and_qfi, |
| FUNC_IDX_smic_4g_set_associated_ctx_and_pco, |
| FUNC_IDX_smic_4g_get_psi_by_ebi_after_23G4, |
| FUNC_IDX_smic_4g_peer_msg_precheck, |
| } esm_log_args_of_smic_api_enum; // Define func_idx<>func_name mapping in esm_uniontag.txt |
| |
| |
| typedef struct |
| { |
| kal_uint16 protocol_id; |
| kal_uint16 protocol_config_len; |
| kal_uint8 protocol_config[ESM_FAKE_SMIC_MAX_5G_CONFIG_LEN]; |
| } log_smic_5g_config_option_struct; // This is only for ESM UT, and should include the same content as smic_5g_config_option_struct |
| |
| typedef struct |
| { |
| LOCAL_PARA_HDR |
| esm_log_args_of_smic_api_enum func_idx; // Will determine the which member to use in the union func_name |
| union { |
| struct{ |
| //[In] |
| kal_uint8 sim_idx; |
| //[Out] |
| kal_bool ret; |
| } smic_4g_do_context_transfer_4g5; |
| |
| struct{ |
| //[In] |
| kal_uint8 sim_idx; |
| kal_uint8 ebi; |
| kal_uint8 psi; |
| //[Out] |
| kal_bool ret; |
| } smic_4g_if_ebi_mapped_success; |
| |
| struct{ |
| //[In] |
| kal_uint8 sim_idx; |
| kal_uint8 ebi; |
| //[Out] |
| //(void) |
| } smic_4g_process_pdn_released; |
| |
| struct{ |
| //[In] |
| kal_uint8 sim_idx; |
| kal_uint8 ebi; |
| //[Out] |
| esm_smic_epsb_context_struct ebi_ctx; |
| kal_bool ret; |
| } smic_4g_get_5g4_ebi_context; |
| |
| struct{ |
| //[In] |
| kal_uint8 sim_idx; |
| kal_uint8 ebi; |
| //[Out] |
| kal_uint8 psi; |
| kal_uint64 qfi_bitmap; |
| kal_bool ret; |
| } smic_get_ebi_mapped_psi_and_qfi; |
| |
| struct{ |
| //[In] |
| kal_uint8 sim_idx; |
| kal_uint8 ebi; |
| kal_uint8 psi; |
| esm_smic_epsb_context_struct associated_ctx; |
| log_smic_5g_config_option_struct pco_5g[SMIC_MAX_NUM_OF_5G_IE_IN_PCO]; |
| kal_uint8 num_of_pco_5g; |
| //[Out] |
| //ps_cause_enum cause_to_nw; |
| //tft_bearer_act_enum bearer_action; |
| smic_4g_set_result_enum ret; |
| } smic_4g_set_associated_ctx_and_pco; |
| |
| struct |
| { |
| //[In] |
| kal_uint8 sim_idx; |
| kal_uint8 ebi; |
| //[Out] |
| kal_uint8 psi; |
| kal_bool ret; |
| } smic_4g_get_psi_by_ebi_after_23G4; |
| |
| |
| struct |
| { |
| //[in] |
| kal_uint8 sim_idx; |
| kal_uint8 psi; |
| kal_uint8 ebi; |
| smic_esm_peer_msg_precheck_info_struct esm_precheck_info; |
| log_smic_5g_config_option_struct pco_5g[SMIC_MAX_NUM_OF_5G_IE_IN_PCO]; |
| kal_uint8 num_of_pco_5g; |
| tft_bearer_act_enum bearer_action; |
| //[out] |
| ps_cause_enum cause_to_nw; |
| smic_4g_set_result_enum ret; |
| } smic_4g_peer_msg_precheck; |
| |
| } func_name; |
| } esm_log_args_of_smic_api_struct; // MSG_ID_ESM_LOG_ARGS_OF_SMIC_API |
| |
| #endif |