Exemplo n.º 1
0
/**
 * MRC Stub initialization.
 *
 * @return LE_OK           The function succeeded.
 */
le_result_t mrc_simu_Init
(
    void
)
{
    LE_INFO("PA MRC Init");

    NewRegStateEvent = le_event_CreateIdWithRefCounting("NewRegStateEvent");
    RatChangeEvent = le_event_CreateIdWithRefCounting("RatChangeEvent");

    ScanInformationPool = le_mem_CreatePool("ScanInformationPool", sizeof(pa_mrc_ScanInformation_t));

    return LE_OK;
}
Exemplo n.º 2
0
//--------------------------------------------------------------------------------------------------
le_result_t pa_mdc_Init
(
    void
)
{
    if (atports_GetInterface(ATPORT_COMMAND)==NULL) {
        LE_WARN("DATA Module is not initialize in this session");
        return LE_FAULT;
    }

    if (atports_GetInterface(ATPORT_PPP)==false) {
        LE_WARN("PPP Module is not initialize in this session");
        return LE_FAULT;
    }

    NewSessionStateEvent = le_event_CreateIdWithRefCounting("NewSessionStateEvent");
    UnsolicitedEvent     = le_event_CreateId("SessionUnsolicitedEvent",sizeof(atmgr_UnsolResponse_t));
    NewSessionStatePool  = le_mem_CreatePool("NewSessionStatePool", sizeof(pa_mdc_SessionStateData_t));

    InternalEventCall = le_event_CreateId("MDCInternalEventCall",sizeof(atmgr_UnsolResponse_t));
    le_event_AddHandler("MDCUnsolHandler",InternalEventCall  ,MDCInternalHandler);

    // set unsolicited +CGEV to Register our own handler.
    SetIndicationHandler(2);

    le_event_AddHandler("MDCUnsolHandler",UnsolicitedEvent  ,CGEVUnsolHandler);

    return LE_OK;
}
//--------------------------------------------------------------------------------------------------
le_result_t pa_gnss_Init
(
    void
)
{
    InitializeDefaultGnssPositionData(&GnssPositionData);
    InitializeDefaultSatInfo(&GnssPositionData);
    InitializeDefaultSatUsedInfo(&GnssPositionData);

    GnssEventId = le_event_CreateIdWithRefCounting("GnssEventId");
    NmeaEventId = le_event_CreateIdWithRefCounting("GnssNmeaEventId");

    PositionEventDataPool = le_mem_CreatePool("PositionEventDataPool", sizeof(pa_Gnss_Position_t));
    NmeaEventDataPool = le_mem_CreatePool("NmeaEventDataPool", NMEA_STR_LEN * sizeof(char));
    return LE_OK;
}
Exemplo n.º 4
0
//--------------------------------------------------------------------------------------------------
le_result_t pa_gnss_Init
(
    void
)
{
    GnssEventId = le_event_CreateIdWithRefCounting("gnssEventId");

    return LE_OK;
}
Exemplo n.º 5
0
//--------------------------------------------------------------------------------------------------
void le_ips_Init
(
    void
)
{
    // Create an event Id for input voltage change notification
    VoltageThresholdEventId = le_event_CreateIdWithRefCounting("VoltageThresholdEvent");

    // Register a handler function for new input voltage Threshold Event
    pa_ips_AddVoltageEventHandler(VoltageChangeHandler);
}
//--------------------------------------------------------------------------------------------------
le_result_t pa_ipsSimu_Init
(
    void
)
{
    // Create the event for signaling user handlers.
    VoltageThresholdEventId = le_event_CreateIdWithRefCounting("VoltageStatusEvent");

    LE_INFO("simulation pa_ips init - stub");

    return LE_OK;
}
//--------------------------------------------------------------------------------------------------
le_result_t pa_lptSimu_Init
(
    void
)
{
    LE_INFO("LPT simulated PA initialization");

    // Create event
    EDrxParamsChangeEventId = le_event_CreateIdWithRefCounting("EDrxParamsChangeEvent");

    // Create associated memory pool
    EDrxParamsChangeIndPool = le_mem_CreatePool("EDrxParamsChangeIndPool",
                                                sizeof(pa_lpt_EDrxParamsIndication_t));

    return LE_OK;
}
Exemplo n.º 8
0
//--------------------------------------------------------------------------------------------------
void le_temp_Init
(
    void
)
{
    // Add a handler to the close session service
    le_msg_AddServiceCloseHandler(
                    le_temp_GetServiceRef(),
                    CloseSessionEventHandler,
                    NULL
    );

    // Create an event Id for temperature change notification
    TemperatureThresholdEventId = le_event_CreateIdWithRefCounting("TemperatureThresholdEvent");

    // Register a handler function for new temparute Threshold Event
    pa_temp_AddTempEventHandler (TemperatureChangeHandler);
}
Exemplo n.º 9
0
//--------------------------------------------------------------------------------------------------
void le_mrc_Init
(
    void
)
{
    le_result_t                 result=LE_OK;
    pa_mrc_NetworkRegSetting_t  setting;

    // Create an event Id for new Network Registration State notification
    NewNetRegStateId = le_event_CreateIdWithRefCounting("NewNetRegState");

    ScanInformationListPool = le_mem_CreatePool("ScanInformationListPool",
                                                sizeof(le_mrc_ScanInformationList_t));

    ScanInformationSafeRefPool = le_mem_CreatePool("ScanInformationSafeRefPool",
                                                sizeof(le_mrc_ScanInformationSafeRef_t));

    // Create the Safe Reference Map to use for Scan Information List object Safe References.
    ScanInformationListRefMap = le_ref_CreateMap("ScanInformationListMap", MRC_MAX_SCANLIST);

    // Create the Safe Reference Map to use for Scan Information List object Safe References.
    ScanInformationRefMap = le_ref_CreateMap("ScanInformationMap", MRC_MAX_SCAN);

    // Register a handler function for new Registration State indication
    LE_DEBUG("Add pa_mrc_SetNetworkRegHandler");
    LE_FATAL_IF((pa_mrc_AddNetworkRegHandler(NewRegStateHandler) == NULL),
                "Add pa_mrc_AddNetworkRegHandler failed");

    // Get & Set the Network registration state notification
    LE_DEBUG("Get the Network registration state notification configuration");
    result=pa_mrc_GetNetworkRegConfig(&setting);
    if ((result != LE_OK) || (setting == PA_MRC_DISABLE_REG_NOTIFICATION))
    {
        LE_ERROR_IF((result != LE_OK),
                    "Fails to get the Network registration state notification configuration");

        LE_INFO("Enable the Network registration state notification");
        LE_FATAL_IF((pa_mrc_ConfigureNetworkReg(PA_MRC_ENABLE_REG_NOTIFICATION)  != LE_OK),
                    "Enable the Network registration state notification failure");
    }

    LoadMrcConfigurationFromConfigDB();
}
Exemplo n.º 10
0
//--------------------------------------------------------------------------------------------------
le_result_t pa_sim_Init
(
    void
)
{
    if (atports_GetInterface(ATPORT_COMMAND)==NULL) {
        LE_DEBUG("SIM Module is not initialize in this session");
        return LE_NOT_POSSIBLE;
    }

    SimEventPoolRef = le_mem_CreatePool("SimEventPool", sizeof(pa_sim_Event_t));
    SimEventPoolRef = le_mem_ExpandPool(SimEventPoolRef,DEFAULT_SIMEVENT_POOL_SIZE);

    EventUnsolicitedId    = le_event_CreateId("SIMEventIdUnsol",sizeof(atmgr_UnsolResponse_t));
    EventNewSimStateId    = le_event_CreateIdWithRefCounting("SIMEventIdNewState");
    le_event_AddHandler("SIMUnsolHandler",EventUnsolicitedId  ,SIMUnsolHandler);

    LE_DEBUG_IF(SetIndicator()!=LE_OK,"cannot set sim +WIND indicator");

    return LE_OK;
}
Exemplo n.º 11
0
//--------------------------------------------------------------------------------------------------
le_result_t pa_mrc_Init
(
    void
)
{
    if (atports_GetInterface(ATPORT_COMMAND)==NULL) {
        LE_WARN("radio control Module is not initialize in this session");
        return LE_NOT_POSSIBLE;
    }

    EventUnsolicitedId    = le_event_CreateId("RCEventIdUnsol",sizeof(atmgr_UnsolResponse_t));
    EventNewRcStatusId    = le_event_CreateIdWithRefCounting("EventNewRcStatus");

    le_event_AddHandler("RCUnsolHandler",EventUnsolicitedId  ,CREGUnsolHandler);

    RegStatePoolRef = le_mem_CreatePool("regStatePool",sizeof(le_mrc_NetRegState_t));
    RegStatePoolRef = le_mem_ExpandPool(RegStatePoolRef,DEFAULT_REGSTATE_POOL_SIZE);

    SubscribeUnsolCREG(PA_MRC_ENABLE_REG_LOC_NOTIFICATION);

    pa_mrc_GetNetworkRegConfig(&ThisMode);

    return LE_OK;
}