le_ecall_interface.h
Go to the documentation of this file.
25 * The Mobile Network Operator handles the eCall like any other 112 call and routes the call to the28 * At the same time, a digital "minimum set of data" (MSD) message is sent over the voice call using54 * - le_ecall_ForceOnlyMode(): this function configures the eCall operation mode to eCall only, only60 * - le_ecall_ForcePersistentOnlyMode(): Same as le_ecall_ForceOnlyMode(), but the change persists69 * - le_ecall_GetConfiguredOperationMode(): this function allows the user to retrieve the configured89 * The session can be stopped by calling le_ecall_End(). Note that in some cases, the ongoing eCall94 * (LE_ECALL_STATE_CONNECTED not yet received) and after LE_ECALL_STATE_STOPPED event is notified.112 * An application can also call le_ecall_GetTerminationReason() to retrieve the reason of the call114 * le_ecall_GetPlatformSpecificTerminationCode() to get platform specific termination code (refer119 * If another application tries to use the eCall service while a session is already in progress, the120 * le_ecall_StartManual(), le_ecall_StartAutomatic(), le_ecall_StartTest() functions will return a122 * application can follow the session progress with 'state' functions like le_ecall_GetState() and137 * @warning Those functions return a LE_DUPLICATE error when the MSD has been already imported with149 * The prepared MSD must answer the requirements described in the "EN 15722:2013" publication (this150 * publication has been prepared by Technical Committee CEN/TC 278 “Intelligent Transport Systems").155 * @warning The imported MSD overwrites the control flags (automaticActivation and testCall) set by163 * The MSD can be updated before calling le_ecall_SendMsd(), using the e_ecall_ImportMsd() function166 * The date/time on MSD information is internally set by fetching the time from linux system time169 * This time is automatically updated if NITS is supported by the cellular network. Otherwise, it is170 * up to the user to update the system date/time by calling le_clk_SetAbsoluteTime() function. The175 * @note Only unsandboxed application can set the date/time by le_clk_SetAbsoluteTime(). In case of176 * sandboxed application, please contact Sierra Wireless support to update the system date/time in181 * To perform an emergency call following the ERA-GLONASS requirements, the 'systemStandard' entry187 * - le_ecall_SetEraGlonassManualDialAttempts(): set the ECALL_MANUAL_DIAL_ATTEMPTS value. If a dial201 * - le_ecall_SetEraGlonassDialDuration(): set the ECALL_DIAL_DURATION time. It is the maximum time211 * - le_ecall_SetEraGlonassMSDMaxTransmissionTime(): sets the ECALL_MSD_MAX_TRANSMISSION_TIME time,215 * - le_ecall_SetEraGlonassPostTestRegistrationTime(): sets the ECALL_POST_TEST_REGISTRATION_TIME,217 * transmission of test results to System Operator. The ECALL_POST_TEST_REGISTRATION_TIME default227 * - le_ecall_GetEraGlonassMSDMaxTransmissionTime(): get the ECALL_MSD_MAX_TRANSMISSION_TIME time.378 * In the case of PAN-EUROPEAN, the redial can be performed as many times as desired but should be381 * In the case of ERA-GLONASS, the redial can be performed ECALL_MANUAL_DIAL_ATTEMPTS times within395 * There is one exception to the previous statement: if the NAD deregistration mechanism is enabled396 * an T9/T10 timers have not expired yet, it is not possible to change the eCall settings even after409 * @snippet "apps/test/modemServices/ecall/ecallIntegrationTest/eCallTest/le_ecallTest.c" PsapNumber411 * @note That PSAP number is not applied to a manual or an automatically initiated eCall. For these420 * @note If FDN directory is updated with new dial numbers, be sure that the SIM card is refreshed.427 * The time value can be set with the le_ecall_SetNadDeregistrationTime() API and retrieved with the430 * @snippet "apps/test/modemServices/ecall/ecallIntegrationTest/eCallTest/le_ecallTest.c" NadTime445 * network for the duration of this timer and then automatically deregisters from the network upon455 * - If its duration is set to one hour, the @ref LE_ECALL_STATE_TIMEOUT_T9 event will be reported.482 * After termination of an emergency call the in-vehicle system remains registered on the network494 * @snippet "apps/test/modemServices/ecall/ecallIntegrationTest/eCallTest/le_ecallTest.c" PostTest502 * @snippet "apps/test/modemServices/ecall/ecallIntegrationTest/eCallTest/le_ecallTest.c" DialTimer525 * @snippet "apps/test/modemServices/ecall/ecallIntegrationTest/eCallTest/le_ecallTest.c" Standard531 * @snippet "apps/test/modemServices/ecall/ecallIntegrationTest/eCallTest/le_ecallTest.c" MsdVersion537 * @snippet "apps/test/modemServices/ecall/ecallIntegrationTest/eCallTest/le_ecallTest.c" Vehicle549 * @snippet "apps/test/modemServices/ecall/ecallIntegrationTest/eCallTest/le_ecallTest.c" Propulsion556 * A sample code that implements an eCall test session with a voice call connection can be found in600 //--------------------------------------------------------------------------------------------------604 //--------------------------------------------------------------------------------------------------607 //--------------------------------------------------------------------------------------------------610 * Connect the current client thread to the service providing this API. Block until the service is613 * For each thread that wants to use this API, either ConnectService or TryConnectService must be614 * called before any other functions in this API. Normally, ConnectService is automatically called619 //--------------------------------------------------------------------------------------------------625 //--------------------------------------------------------------------------------------------------628 * Try to connect the current client thread to the service providing this API. Return with an error631 * For each thread that wants to use this API, either ConnectService or TryConnectService must be632 * called before any other functions in this API. Normally, ConnectService is automatically called641 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).644 //--------------------------------------------------------------------------------------------------650 //--------------------------------------------------------------------------------------------------654 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants657 //--------------------------------------------------------------------------------------------------664 //--------------------------------------------------------------------------------------------------670 * longer a connection to the service, and the functions in this API can't be used. For details, see675 //--------------------------------------------------------------------------------------------------682 //--------------------------------------------------------------------------------------------------686 //--------------------------------------------------------------------------------------------------689 //--------------------------------------------------------------------------------------------------693 //--------------------------------------------------------------------------------------------------696 //--------------------------------------------------------------------------------------------------700 //--------------------------------------------------------------------------------------------------703 //--------------------------------------------------------------------------------------------------707 //--------------------------------------------------------------------------------------------------710 //--------------------------------------------------------------------------------------------------714 //--------------------------------------------------------------------------------------------------717 //--------------------------------------------------------------------------------------------------721 //--------------------------------------------------------------------------------------------------724 //--------------------------------------------------------------------------------------------------728 //--------------------------------------------------------------------------------------------------731 //--------------------------------------------------------------------------------------------------736 //--------------------------------------------------------------------------------------------------739 //--------------------------------------------------------------------------------------------------744 //--------------------------------------------------------------------------------------------------747 //--------------------------------------------------------------------------------------------------751 //--------------------------------------------------------------------------------------------------754 //--------------------------------------------------------------------------------------------------759 //--------------------------------------------------------------------------------------------------762 //--------------------------------------------------------------------------------------------------766 //--------------------------------------------------------------------------------------------------769 //--------------------------------------------------------------------------------------------------782 //--------------------------------------------------------------------------------------------------788 //--------------------------------------------------------------------------------------------------797 //--------------------------------------------------------------------------------------------------803 //--------------------------------------------------------------------------------------------------805 * This function exits from eCall Only mode. It configures the eCall operation mode to Normal mode,806 * the modem uses the default operation mode at power up (or after U/SIM hotswap). The modem behaves807 * following the U/SIM eCall operation mode; for example the U/SIM can be configured only for eCall,815 //--------------------------------------------------------------------------------------------------821 //--------------------------------------------------------------------------------------------------833 //--------------------------------------------------------------------------------------------------840 //--------------------------------------------------------------------------------------------------847 //--------------------------------------------------------------------------------------------------856 //--------------------------------------------------------------------------------------------------860 //--------------------------------------------------------------------------------------------------867 //--------------------------------------------------------------------------------------------------880 //--------------------------------------------------------------------------------------------------886 //--------------------------------------------------------------------------------------------------893 //--------------------------------------------------------------------------------------------------900 //--------------------------------------------------------------------------------------------------909 //--------------------------------------------------------------------------------------------------916 //--------------------------------------------------------------------------------------------------925 //--------------------------------------------------------------------------------------------------932 //--------------------------------------------------------------------------------------------------941 //--------------------------------------------------------------------------------------------------948 //--------------------------------------------------------------------------------------------------957 //--------------------------------------------------------------------------------------------------964 //--------------------------------------------------------------------------------------------------973 //--------------------------------------------------------------------------------------------------980 //--------------------------------------------------------------------------------------------------989 //--------------------------------------------------------------------------------------------------996 //--------------------------------------------------------------------------------------------------1005 //--------------------------------------------------------------------------------------------------1012 //--------------------------------------------------------------------------------------------------1022 //--------------------------------------------------------------------------------------------------1031 //--------------------------------------------------------------------------------------------------1040 //--------------------------------------------------------------------------------------------------1047 //--------------------------------------------------------------------------------------------------1058 //--------------------------------------------------------------------------------------------------1065 //--------------------------------------------------------------------------------------------------1074 //--------------------------------------------------------------------------------------------------1081 //--------------------------------------------------------------------------------------------------1093 //--------------------------------------------------------------------------------------------------1100 //--------------------------------------------------------------------------------------------------1112 //--------------------------------------------------------------------------------------------------1133 //--------------------------------------------------------------------------------------------------1135 * Set the position Delta N-1 from position set in le_ecall_SetMsdPosition() transmitted by the MSD.1145 //--------------------------------------------------------------------------------------------------1162 //--------------------------------------------------------------------------------------------------1164 * Set the position Delta N-2 from position set in le_ecall_SetMsdPositionN1() transmitted by the MSD.1174 //--------------------------------------------------------------------------------------------------1191 //--------------------------------------------------------------------------------------------------1202 //--------------------------------------------------------------------------------------------------1211 //--------------------------------------------------------------------------------------------------1213 * Set the ECALL_DIAL_DURATION time. It's the maximum time the IVS have to connect the emergency1222 * @note This ECALL_DIAL_DURATION time is only applicable to initial call (call never established1226 //--------------------------------------------------------------------------------------------------1233 //--------------------------------------------------------------------------------------------------1241 //--------------------------------------------------------------------------------------------------1248 //--------------------------------------------------------------------------------------------------1263 //--------------------------------------------------------------------------------------------------1274 //--------------------------------------------------------------------------------------------------1288 //--------------------------------------------------------------------------------------------------1299 //--------------------------------------------------------------------------------------------------1312 //--------------------------------------------------------------------------------------------------1319 //--------------------------------------------------------------------------------------------------1332 //--------------------------------------------------------------------------------------------------1339 //--------------------------------------------------------------------------------------------------1352 //--------------------------------------------------------------------------------------------------1359 //--------------------------------------------------------------------------------------------------1372 //--------------------------------------------------------------------------------------------------1379 //--------------------------------------------------------------------------------------------------1386 * - For manual session, it is possible to end the ongoing session if the eCall is not connected1387 * (LE_ECALL_STATE_CONNECTED not yet received) and after LE_ECALL_STATE_STOPPED event is notified.1388 * - Using this API doesn't affect the NAD deregistration mechanism. However, it disables the call1397 //--------------------------------------------------------------------------------------------------1404 //--------------------------------------------------------------------------------------------------1413 //--------------------------------------------------------------------------------------------------1420 //--------------------------------------------------------------------------------------------------1424 * @note That PSAP number is not applied to Manually or Automatically initiated eCall. For those1437 //--------------------------------------------------------------------------------------------------1444 //--------------------------------------------------------------------------------------------------1449 * @note That PSAP number is not applied to Manually or Automatically initiated eCall. For those1463 //--------------------------------------------------------------------------------------------------1473 //--------------------------------------------------------------------------------------------------1478 * @note If FDN directory is updated with new dial numbers, be sure that the SIM card is refreshed.1484 //--------------------------------------------------------------------------------------------------1490 //--------------------------------------------------------------------------------------------------1492 * Set the NAD (network access device) deregistration time value. After termination of an emergency1493 * call the in-vehicle system remains registered on the network for the period of time, defined by1503 //--------------------------------------------------------------------------------------------------1510 //--------------------------------------------------------------------------------------------------1518 //--------------------------------------------------------------------------------------------------1525 //--------------------------------------------------------------------------------------------------1533 //--------------------------------------------------------------------------------------------------1540 //--------------------------------------------------------------------------------------------------1548 //--------------------------------------------------------------------------------------------------1555 //--------------------------------------------------------------------------------------------------1560 * Redial attempts stop once the call has been cleared down correctly, or if counter/timer reached1567 //--------------------------------------------------------------------------------------------------1574 //--------------------------------------------------------------------------------------------------1579 * Redial attempts stop once the call has been cleared down correctly, or if counter/timer reached1586 //--------------------------------------------------------------------------------------------------1593 //--------------------------------------------------------------------------------------------------1595 * Set the ECALL_DIAL_DURATION time. It's the maximum time the IVS have to connect the emergency1605 //--------------------------------------------------------------------------------------------------1612 //--------------------------------------------------------------------------------------------------1616 * When the delay is reached and IVS NAD didn't receive a call clear-down indication then the call1626 //--------------------------------------------------------------------------------------------------1633 //--------------------------------------------------------------------------------------------------1635 * Set the ECALL_AUTO_ANSWER_TIME time, the time interval wherein IVDS responds to incoming calls1645 //--------------------------------------------------------------------------------------------------1652 //--------------------------------------------------------------------------------------------------1663 //--------------------------------------------------------------------------------------------------1670 //--------------------------------------------------------------------------------------------------1678 * @note The ECALL_POST_TEST_REGISTRATION_TIME setting takes effect immediately and is persistent to1681 * @note An ECALL_POST_TEST_REGISTRATION_TIME value of zero means the IVS doesn't remain registered1689 //--------------------------------------------------------------------------------------------------1696 //--------------------------------------------------------------------------------------------------1704 //--------------------------------------------------------------------------------------------------1711 //--------------------------------------------------------------------------------------------------1719 //--------------------------------------------------------------------------------------------------1726 //--------------------------------------------------------------------------------------------------1734 //--------------------------------------------------------------------------------------------------1741 //--------------------------------------------------------------------------------------------------1749 //--------------------------------------------------------------------------------------------------1756 //--------------------------------------------------------------------------------------------------1764 //--------------------------------------------------------------------------------------------------1771 //--------------------------------------------------------------------------------------------------1780 //--------------------------------------------------------------------------------------------------1787 //--------------------------------------------------------------------------------------------------1796 //--------------------------------------------------------------------------------------------------1804 //--------------------------------------------------------------------------------------------------1814 //--------------------------------------------------------------------------------------------------1823 //--------------------------------------------------------------------------------------------------1825 * Reset the ERA-GLONASS crash severity parameter. Therefore that optional parameter is not included1834 //--------------------------------------------------------------------------------------------------1841 //--------------------------------------------------------------------------------------------------1851 //--------------------------------------------------------------------------------------------------1860 //--------------------------------------------------------------------------------------------------1871 //--------------------------------------------------------------------------------------------------1878 //--------------------------------------------------------------------------------------------------1888 //--------------------------------------------------------------------------------------------------1897 //--------------------------------------------------------------------------------------------------1908 //--------------------------------------------------------------------------------------------------1915 //--------------------------------------------------------------------------------------------------1925 //--------------------------------------------------------------------------------------------------1934 //--------------------------------------------------------------------------------------------------1936 * Reset the ERA-GLONASS coordinate system type. Therefore that optional parameter is not included1945 //--------------------------------------------------------------------------------------------------1952 //--------------------------------------------------------------------------------------------------1961 //--------------------------------------------------------------------------------------------------1968 //--------------------------------------------------------------------------------------------------1977 //--------------------------------------------------------------------------------------------------1984 //--------------------------------------------------------------------------------------------------1986 * Terminate NAD registered on the network. After termination of an emergency call the in-vehicle1987 * system remains registered on the network for a period of time, this API will deregister device1995 //--------------------------------------------------------------------------------------------------le_result_t le_ecall_TerminateRegistration(void)le_result_t le_ecall_SetMsdPositionN2(le_ecall_CallRef_t ecallRef, int32_t latitudeDeltaN2, int32_t longitudeDeltaN2)le_result_t le_ecall_ExportMsd(le_ecall_CallRef_t ecallRef, uint8_t *msdPtr, size_t *msdSizePtr)int32_t le_ecall_GetPlatformSpecificTerminationCode(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_SetMsdVersion(uint32_t msdVersion)le_mcc_TerminationReason_t le_ecall_GetTerminationReason(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_ImportMsd(le_ecall_CallRef_t ecallRef, const uint8_t *msdPtr, size_t msdSize)le_result_t le_ecall_SetVehicleType(le_ecall_MsdVehicleType_t vehicleType)le_result_t le_ecall_GetNadDeregistrationTime(uint16_t *deregTimePtr)le_result_t le_ecall_SetPropulsionType(le_ecall_PropulsionTypeBitMask_t propulsionType)le_result_t le_ecall_GetEraGlonassManualDialAttempts(uint16_t *attemptsPtr)le_result_t le_ecall_SetEraGlonassMSDMaxTransmissionTime(uint16_t msdMaxTransTime)le_result_t le_ecall_GetMsdVersion(uint32_t *msdVersionPtr)le_result_t le_ecall_SetEraGlonassDialDuration(uint16_t duration)le_result_t le_ecall_SetEraGlonassManualDialAttempts(uint16_t attempts)le_result_t le_ecall_GetEraGlonassMSDMaxTransmissionTime(uint16_t *msdMaxTransTimePtr)le_result_t le_ecall_SetMsdPositionN1(le_ecall_CallRef_t ecallRef, int32_t latitudeDeltaN1, int32_t longitudeDeltaN1)le_result_t le_ecall_SetMsdPosition(le_ecall_CallRef_t ecallRef, bool isTrusted, int32_t latitude, int32_t longitude, int32_t direction)le_result_t le_ecall_SetEraGlonassFallbackTime(uint16_t duration)le_result_t le_ecall_GetEraGlonassFallbackTime(uint16_t *durationPtr)le_ecall_CallRef_t le_ecall_Create(void)le_result_t le_ecall_SetMsdTxMode(le_ecall_MsdTxMode_t mode)le_result_t le_ecall_SetEraGlonassPostTestRegistrationTime(uint16_t postTestRegTime)void le_ecall_DisconnectService(void)le_result_t le_ecall_SetMsdEraGlonassCrashInfo(le_ecall_CallRef_t ecallRef, le_ecall_CrashInfoBitMask_t crashInfoMask)le_result_t le_ecall_SetEraGlonassAutoDialAttempts(uint16_t attempts)le_result_t le_ecall_GetPropulsionType(le_ecall_PropulsionTypeBitMask_t *propulsionTypePtr)le_result_t le_ecall_ResetMsdEraGlonassCrashInfo(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_TryConnectService(void)le_result_t le_ecall_ExitOnlyMode(void)le_result_t le_ecall_ForcePersistentOnlyMode(void)le_result_t le_ecall_ResetMsdEraGlonassDiagnosticResult(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_ResetMsdEraGlonassCrashSeverity(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_StartManual(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_SetMsdEraGlonassCrashSeverity(le_ecall_CallRef_t ecallRef, uint32_t crashSeverity)le_result_t le_ecall_GetEraGlonassPostTestRegistrationTime(uint16_t *postTestRegTimePtr)void le_ecall_RemoveStateChangeHandler(le_ecall_StateChangeHandlerRef_t handlerRef)le_result_t le_ecall_End(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_UseUSimNumbers(void)LE_FULL_API void le_ecall_SetServerDisconnectHandler(le_ecall_DisconnectHandler_t disconnectHandler, void *contextPtr)void le_ecall_Delete(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_SetSystemStandard(le_ecall_SystemStandard_t systemStandard)le_result_t le_ecall_SetNadDeregistrationTime(uint16_t deregTime)le_result_t le_ecall_GetVIN(char *vin, size_t vinSize)le_result_t le_ecall_SetMsdPassengersCount(le_ecall_CallRef_t ecallRef, uint32_t paxCount)le_result_t le_ecall_GetConfiguredOperationMode(le_ecall_OpMode_t *opModePtr)le_result_t le_ecall_GetIntervalBetweenDialAttempts(uint16_t *pausePtr)le_result_t le_ecall_SetPsapNumber(const char *LE_NONNULL psap)le_result_t le_ecall_SetPanInitialDialDuration(uint16_t duration)le_result_t le_ecall_GetEraGlonassAutoAnswerTime(uint16_t *autoAnswerTimePtr)le_result_t le_ecall_SetEraGlonassAutoAnswerTime(uint16_t autoAnswerTime)struct le_ecall_StateChangeHandler * le_ecall_StateChangeHandlerRef_tDefinition: le_ecall_common.h:324le_result_t le_ecall_SetMsdEraGlonassDiagnosticResult(le_ecall_CallRef_t ecallRef, le_ecall_DiagnosticResultBitMask_t diagnosticResultMask)le_ecall_State_t le_ecall_GetState(le_ecall_CallRef_t ecallRef)le_ecall_StateChangeHandlerRef_t le_ecall_AddStateChangeHandler(le_ecall_StateChangeHandlerFunc_t handlerPtr, void *contextPtr)le_result_t le_ecall_GetVehicleType(le_ecall_MsdVehicleType_t *vehicleTypePtr)le_result_t le_ecall_SetVIN(const char *LE_NONNULL vin)void(* le_ecall_StateChangeHandlerFunc_t)(le_ecall_CallRef_t ecallRef, le_ecall_State_t state, void *contextPtr)Definition: le_ecall_common.h:334le_result_t le_ecall_StartAutomatic(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_SendMsd(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_GetEraGlonassAutoDialAttempts(uint16_t *attemptsPtr)le_result_t le_ecall_GetSystemStandard(le_ecall_SystemStandard_t *systemStandardPtr)le_result_t le_ecall_ForceOnlyMode(void)le_result_t le_ecall_StartTest(le_ecall_CallRef_t ecallRef)void le_ecall_ConnectService(void)le_result_t le_ecall_GetPsapNumber(char *psap, size_t psapSize)le_result_t le_ecall_GetEraGlonassDialDuration(uint16_t *durationPtr)void(* le_ecall_DisconnectHandler_t)(void *)Definition: le_ecall_interface.h:605le_result_t le_ecall_GetMsdTxMode(le_ecall_MsdTxMode_t *modePtr)le_result_t le_ecall_ResetMsdEraGlonassCoordinateSystemType(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_SetMsdEraGlonassCoordinateSystemType(le_ecall_CallRef_t ecallRef, le_ecall_MsdCoordinateType_t coordinateSystemType)le_result_t le_ecall_GetPanInitialDialDuration(uint16_t *durationPtr)le_result_t le_ecall_SetIntervalBetweenDialAttempts(uint16_t pause)