Sample code for SIM Select
//--------------------------------------------------------------------------------------------------/*** Test: SIM selection.**///--------------------------------------------------------------------------------------------------void simTest_SimSelect(){// Select the embedded SIMLE_ASSERT_OK(le_sim_SelectCard(LE_SIM_EMBEDDED));// Get the selected cardle_sim_Id_t simId = le_sim_GetSelectedCard();LE_ASSERT(LE_SIM_EMBEDDED == simId);// Select the LE_SIM_EXTERNAL_SLOT_1 SIMLE_ASSERT_OK(le_sim_SelectCard(LE_SIM_EXTERNAL_SLOT_1));// Get the selected cardsimId = le_sim_GetSelectedCard();LE_ASSERT(LE_SIM_EXTERNAL_SLOT_1 == simId);// Check if SIM presentif (!le_sim_IsPresent(LE_SIM_EMBEDDED)){LE_INFO("SIM not present");}// Get the selected card by le_sim_GetSelectedCard()// Notice that the selected card received is the one used by the// last Legato API and not the one set by le_sim_SelectCard().simId = le_sim_GetSelectedCard();LE_ASSERT(LE_SIM_EMBEDDED == simId);// Check SIM readyif (!le_sim_IsReady(LE_SIM_EXTERNAL_SLOT_1)){LE_INFO("SIM not ready");}// Get the selected card by le_sim_GetSelectedCard()// Notice that the selected card received is the one used by the// last Legato API and not the one set by le_sim_SelectCard().simId = le_sim_GetSelectedCard();LE_ASSERT(LE_SIM_EXTERNAL_SLOT_1 == simId);}