예제 #1
0
//--------------------------------------------------------------------------------------------------
static void* CellNetThread
(
    void* contextPtr
)
{
    // Connect to the services required by this thread
    le_cfg_ConnectService();
    le_mrc_ConnectService();
    le_sim_ConnectService();

    LE_INFO("CellNet Thread Started");

    // Register for command events
    le_event_AddHandler("ProcessCommand",
                        CommandEvent,
                        ProcessCommand);


    // Register for SIM state changes
    le_sim_AddNewStateHandler(SimStateHandler, NULL);

    // Register for MRC Network Registration state changes
    le_mrc_AddNetRegStateEventHandler(MrcNetRegHandler, NULL);


    // Run the event loop
    le_event_RunLoop();
    return NULL;
}
예제 #2
0
//--------------------------------------------------------------------------------------------------
static void* SimPowerCycleIndThread
(
    void* context   ///< Context
)
{
    le_sim_ConnectService();

    SimPowerCycleHdlrRef = le_sim_AddNewStateHandler(TestSimStateHandler, NULL);

    LE_ASSERT(SimPowerCycleHdlrRef);

    //First sem post and  the "simPowerCycleStarted" flag indicate this thread is running
    le_sem_Post(SimPowerCycleSemaphore);
    SimPowerCycleStarted = true;

    LE_INFO("SimPowerCycleIndThread started ...");

    le_event_RunLoop();

    return NULL;
}