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 in596 //--------------------------------------------------------------------------------------------------600 //--------------------------------------------------------------------------------------------------603 //--------------------------------------------------------------------------------------------------606 * Connect the current client thread to the service providing this API. Block until the service is609 * For each thread that wants to use this API, either ConnectService or TryConnectService must be610 * called before any other functions in this API. Normally, ConnectService is automatically called615 //--------------------------------------------------------------------------------------------------621 //--------------------------------------------------------------------------------------------------624 * Try to connect the current client thread to the service providing this API. Return with an error627 * For each thread that wants to use this API, either ConnectService or TryConnectService must be628 * called before any other functions in this API. Normally, ConnectService is automatically called637 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).640 //--------------------------------------------------------------------------------------------------646 //--------------------------------------------------------------------------------------------------650 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants653 //--------------------------------------------------------------------------------------------------660 //--------------------------------------------------------------------------------------------------666 * longer a connection to the service, and the functions in this API can't be used. For details, see671 //--------------------------------------------------------------------------------------------------678 //--------------------------------------------------------------------------------------------------682 //--------------------------------------------------------------------------------------------------685 //--------------------------------------------------------------------------------------------------689 //--------------------------------------------------------------------------------------------------692 //--------------------------------------------------------------------------------------------------696 //--------------------------------------------------------------------------------------------------699 //--------------------------------------------------------------------------------------------------703 //--------------------------------------------------------------------------------------------------706 //--------------------------------------------------------------------------------------------------710 //--------------------------------------------------------------------------------------------------713 //--------------------------------------------------------------------------------------------------717 //--------------------------------------------------------------------------------------------------720 //--------------------------------------------------------------------------------------------------724 //--------------------------------------------------------------------------------------------------727 //--------------------------------------------------------------------------------------------------732 //--------------------------------------------------------------------------------------------------735 //--------------------------------------------------------------------------------------------------740 //--------------------------------------------------------------------------------------------------743 //--------------------------------------------------------------------------------------------------747 //--------------------------------------------------------------------------------------------------750 //--------------------------------------------------------------------------------------------------755 //--------------------------------------------------------------------------------------------------758 //--------------------------------------------------------------------------------------------------762 //--------------------------------------------------------------------------------------------------765 //--------------------------------------------------------------------------------------------------778 //--------------------------------------------------------------------------------------------------784 //--------------------------------------------------------------------------------------------------793 //--------------------------------------------------------------------------------------------------799 //--------------------------------------------------------------------------------------------------801 * This function exits from eCall Only mode. It configures the eCall operation mode to Normal mode,802 * the modem uses the default operation mode at power up (or after U/SIM hotswap). The modem behaves803 * following the U/SIM eCall operation mode; for example the U/SIM can be configured only for eCall,811 //--------------------------------------------------------------------------------------------------817 //--------------------------------------------------------------------------------------------------829 //--------------------------------------------------------------------------------------------------836 //--------------------------------------------------------------------------------------------------843 //--------------------------------------------------------------------------------------------------852 //--------------------------------------------------------------------------------------------------856 //--------------------------------------------------------------------------------------------------863 //--------------------------------------------------------------------------------------------------876 //--------------------------------------------------------------------------------------------------882 //--------------------------------------------------------------------------------------------------889 //--------------------------------------------------------------------------------------------------896 //--------------------------------------------------------------------------------------------------905 //--------------------------------------------------------------------------------------------------912 //--------------------------------------------------------------------------------------------------921 //--------------------------------------------------------------------------------------------------928 //--------------------------------------------------------------------------------------------------937 //--------------------------------------------------------------------------------------------------944 //--------------------------------------------------------------------------------------------------953 //--------------------------------------------------------------------------------------------------960 //--------------------------------------------------------------------------------------------------969 //--------------------------------------------------------------------------------------------------976 //--------------------------------------------------------------------------------------------------985 //--------------------------------------------------------------------------------------------------992 //--------------------------------------------------------------------------------------------------1001 //--------------------------------------------------------------------------------------------------1008 //--------------------------------------------------------------------------------------------------1018 //--------------------------------------------------------------------------------------------------1027 //--------------------------------------------------------------------------------------------------1036 //--------------------------------------------------------------------------------------------------1043 //--------------------------------------------------------------------------------------------------1054 //--------------------------------------------------------------------------------------------------1061 //--------------------------------------------------------------------------------------------------1070 //--------------------------------------------------------------------------------------------------1077 //--------------------------------------------------------------------------------------------------1089 //--------------------------------------------------------------------------------------------------1096 //--------------------------------------------------------------------------------------------------1108 //--------------------------------------------------------------------------------------------------1129 //--------------------------------------------------------------------------------------------------1131 * Set the position Delta N-1 from position set in le_ecall_SetMsdPosition() transmitted by the MSD.1141 //--------------------------------------------------------------------------------------------------1158 //--------------------------------------------------------------------------------------------------1160 * Set the position Delta N-2 from position set in le_ecall_SetMsdPositionN1() transmitted by the MSD.1170 //--------------------------------------------------------------------------------------------------1187 //--------------------------------------------------------------------------------------------------1198 //--------------------------------------------------------------------------------------------------1207 //--------------------------------------------------------------------------------------------------1209 * Set the ECALL_DIAL_DURATION time. It's the maximum time the IVS have to connect the emergency1218 * @note This ECALL_DIAL_DURATION time is only applicable to initial call (call never established1222 //--------------------------------------------------------------------------------------------------1229 //--------------------------------------------------------------------------------------------------1237 //--------------------------------------------------------------------------------------------------1244 //--------------------------------------------------------------------------------------------------1259 //--------------------------------------------------------------------------------------------------1270 //--------------------------------------------------------------------------------------------------1284 //--------------------------------------------------------------------------------------------------1295 //--------------------------------------------------------------------------------------------------1308 //--------------------------------------------------------------------------------------------------1315 //--------------------------------------------------------------------------------------------------1328 //--------------------------------------------------------------------------------------------------1335 //--------------------------------------------------------------------------------------------------1348 //--------------------------------------------------------------------------------------------------1355 //--------------------------------------------------------------------------------------------------1368 //--------------------------------------------------------------------------------------------------1375 //--------------------------------------------------------------------------------------------------1382 * - For manual session, it is possible to end the ongoing session if the eCall is not connected1383 * (LE_ECALL_STATE_CONNECTED not yet received) and after LE_ECALL_STATE_STOPPED event is notified.1384 * - Using this API doesn't affect the NAD deregistration mechanism. However, it disables the call1393 //--------------------------------------------------------------------------------------------------1400 //--------------------------------------------------------------------------------------------------1409 //--------------------------------------------------------------------------------------------------1416 //--------------------------------------------------------------------------------------------------1420 * @note That PSAP number is not applied to Manually or Automatically initiated eCall. For those1433 //--------------------------------------------------------------------------------------------------1440 //--------------------------------------------------------------------------------------------------1445 * @note That PSAP number is not applied to Manually or Automatically initiated eCall. For those1459 //--------------------------------------------------------------------------------------------------1469 //--------------------------------------------------------------------------------------------------1474 * @note If FDN directory is updated with new dial numbers, be sure that the SIM card is refreshed.1480 //--------------------------------------------------------------------------------------------------1486 //--------------------------------------------------------------------------------------------------1488 * Set the NAD (network access device) deregistration time value. After termination of an emergency1489 * call the in-vehicle system remains registered on the network for the period of time, defined by1499 //--------------------------------------------------------------------------------------------------1506 //--------------------------------------------------------------------------------------------------1514 //--------------------------------------------------------------------------------------------------1521 //--------------------------------------------------------------------------------------------------1529 //--------------------------------------------------------------------------------------------------1536 //--------------------------------------------------------------------------------------------------1544 //--------------------------------------------------------------------------------------------------1551 //--------------------------------------------------------------------------------------------------1556 * Redial attempts stop once the call has been cleared down correctly, or if counter/timer reached1563 //--------------------------------------------------------------------------------------------------1570 //--------------------------------------------------------------------------------------------------1575 * Redial attempts stop once the call has been cleared down correctly, or if counter/timer reached1582 //--------------------------------------------------------------------------------------------------1589 //--------------------------------------------------------------------------------------------------1591 * Set the ECALL_DIAL_DURATION time. It's the maximum time the IVS have to connect the emergency1601 //--------------------------------------------------------------------------------------------------1608 //--------------------------------------------------------------------------------------------------1612 * When the delay is reached and IVS NAD didn't receive a call clear-down indication then the call1622 //--------------------------------------------------------------------------------------------------1629 //--------------------------------------------------------------------------------------------------1631 * Set the ECALL_AUTO_ANSWER_TIME time, the time interval wherein IVDS responds to incoming calls1641 //--------------------------------------------------------------------------------------------------1648 //--------------------------------------------------------------------------------------------------1659 //--------------------------------------------------------------------------------------------------1666 //--------------------------------------------------------------------------------------------------1674 * @note The ECALL_POST_TEST_REGISTRATION_TIME setting takes effect immediately and is persistent to1677 * @note An ECALL_POST_TEST_REGISTRATION_TIME value of zero means the IVS doesn't remain registered1685 //--------------------------------------------------------------------------------------------------1692 //--------------------------------------------------------------------------------------------------1700 //--------------------------------------------------------------------------------------------------1707 //--------------------------------------------------------------------------------------------------1715 //--------------------------------------------------------------------------------------------------1722 //--------------------------------------------------------------------------------------------------1730 //--------------------------------------------------------------------------------------------------1737 //--------------------------------------------------------------------------------------------------1745 //--------------------------------------------------------------------------------------------------1752 //--------------------------------------------------------------------------------------------------1760 //--------------------------------------------------------------------------------------------------1767 //--------------------------------------------------------------------------------------------------1776 //--------------------------------------------------------------------------------------------------1783 //--------------------------------------------------------------------------------------------------1792 //--------------------------------------------------------------------------------------------------1800 //--------------------------------------------------------------------------------------------------1810 //--------------------------------------------------------------------------------------------------1819 //--------------------------------------------------------------------------------------------------1821 * Reset the ERA-GLONASS crash severity parameter. Therefore that optional parameter is not included1830 //--------------------------------------------------------------------------------------------------1837 //--------------------------------------------------------------------------------------------------1847 //--------------------------------------------------------------------------------------------------1856 //--------------------------------------------------------------------------------------------------1867 //--------------------------------------------------------------------------------------------------1874 //--------------------------------------------------------------------------------------------------1884 //--------------------------------------------------------------------------------------------------1893 //--------------------------------------------------------------------------------------------------1904 //--------------------------------------------------------------------------------------------------1911 //--------------------------------------------------------------------------------------------------1921 //--------------------------------------------------------------------------------------------------1930 //--------------------------------------------------------------------------------------------------1932 * Reset the ERA-GLONASS coordinate system type. Therefore that optional parameter is not included1941 //--------------------------------------------------------------------------------------------------1948 //--------------------------------------------------------------------------------------------------1957 //--------------------------------------------------------------------------------------------------1964 //--------------------------------------------------------------------------------------------------1973 //--------------------------------------------------------------------------------------------------1980 //--------------------------------------------------------------------------------------------------1982 * Terminate NAD registered on the network. After termination of an emergency call the in-vehicle1983 * system remains registered on the network for a period of time, this API will deregister device1991 //--------------------------------------------------------------------------------------------------int32_t le_ecall_GetPlatformSpecificTerminationCode(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_SetMsdVersion(uint32_t msdVersion)le_result_t le_ecall_StartTest(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_SetMsdPositionN2(le_ecall_CallRef_t ecallRef, int32_t latitudeDeltaN2, int32_t longitudeDeltaN2)le_result_t le_ecall_SetPsapNumber(const char *LE_NONNULL psap)le_result_t le_ecall_ForceOnlyMode(void)le_result_t le_ecall_SendMsd(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_ResetMsdEraGlonassCrashSeverity(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_SetEraGlonassDialDuration(uint16_t duration)le_result_t le_ecall_GetMsdVersion(uint32_t *msdVersionPtr)le_result_t le_ecall_SetMsdEraGlonassDiagnosticResult(le_ecall_CallRef_t ecallRef, le_ecall_DiagnosticResultBitMask_t diagnosticResultMask)le_result_t le_ecall_GetEraGlonassAutoAnswerTime(uint16_t *autoAnswerTimePtr)le_result_t le_ecall_SetMsdEraGlonassCrashSeverity(le_ecall_CallRef_t ecallRef, uint32_t crashSeverity)le_result_t le_ecall_ForcePersistentOnlyMode(void)le_result_t le_ecall_TerminateRegistration(void)le_result_t le_ecall_SetMsdTxMode(le_ecall_MsdTxMode_t mode)void le_ecall_ConnectService(void)le_result_t le_ecall_SetEraGlonassMSDMaxTransmissionTime(uint16_t msdMaxTransTime)le_result_t le_ecall_GetMsdTxMode(le_ecall_MsdTxMode_t *modePtr)le_result_t le_ecall_GetVehicleType(le_ecall_MsdVehicleType_t *vehicleTypePtr)le_result_t le_ecall_GetEraGlonassPostTestRegistrationTime(uint16_t *postTestRegTimePtr)le_result_t le_ecall_ResetMsdEraGlonassCrashInfo(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_SetPanInitialDialDuration(uint16_t duration)le_result_t le_ecall_ResetMsdEraGlonassCoordinateSystemType(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_GetConfiguredOperationMode(le_ecall_OpMode_t *opModePtr)le_result_t le_ecall_SetNadDeregistrationTime(uint16_t deregTime)le_result_t le_ecall_GetEraGlonassMSDMaxTransmissionTime(uint16_t *msdMaxTransTimePtr)void le_ecall_DisconnectService(void)le_result_t le_ecall_GetEraGlonassFallbackTime(uint16_t *durationPtr)le_result_t le_ecall_SetEraGlonassAutoDialAttempts(uint16_t attempts)le_result_t le_ecall_SetEraGlonassManualDialAttempts(uint16_t attempts)le_mcc_TerminationReason_t le_ecall_GetTerminationReason(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_SetMsdEraGlonassCoordinateSystemType(le_ecall_CallRef_t ecallRef, le_ecall_MsdCoordinateType_t coordinateSystemType)void le_ecall_RemoveStateChangeHandler(le_ecall_StateChangeHandlerRef_t handlerRef)le_result_t le_ecall_SetMsdPassengersCount(le_ecall_CallRef_t ecallRef, uint32_t paxCount)le_ecall_State_t le_ecall_GetState(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_End(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_StartManual(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_ResetMsdEraGlonassDiagnosticResult(le_ecall_CallRef_t ecallRef)le_result_t le_ecall_GetSystemStandard(le_ecall_SystemStandard_t *systemStandardPtr)le_result_t le_ecall_SetMsdEraGlonassCrashInfo(le_ecall_CallRef_t ecallRef, le_ecall_CrashInfoBitMask_t crashInfoMask)void(* le_ecall_DisconnectHandler_t)(void *)Definition: le_ecall_interface.h:601le_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_SetVehicleType(le_ecall_MsdVehicleType_t vehicleType)le_ecall_CallRef_t le_ecall_Create(void)le_result_t le_ecall_ImportMsd(le_ecall_CallRef_t ecallRef, const uint8_t *msdPtr, size_t msdSize)le_result_t le_ecall_UseUSimNumbers(void)le_result_t le_ecall_GetEraGlonassManualDialAttempts(uint16_t *attemptsPtr)le_result_t le_ecall_GetNadDeregistrationTime(uint16_t *deregTimePtr)le_result_t le_ecall_GetEraGlonassAutoDialAttempts(uint16_t *attemptsPtr)le_result_t le_ecall_GetPanInitialDialDuration(uint16_t *durationPtr)le_result_t le_ecall_ExitOnlyMode(void)le_result_t le_ecall_SetMsdPositionN1(le_ecall_CallRef_t ecallRef, int32_t latitudeDeltaN1, int32_t longitudeDeltaN1)le_result_t le_ecall_GetPropulsionType(le_ecall_PropulsionTypeBitMask_t *propulsionTypePtr)le_result_t le_ecall_GetEraGlonassDialDuration(uint16_t *durationPtr)le_result_t le_ecall_SetIntervalBetweenDialAttempts(uint16_t pause)le_result_t le_ecall_StartAutomatic(le_ecall_CallRef_t ecallRef)LE_FULL_API void le_ecall_SetServerDisconnectHandler(le_ecall_DisconnectHandler_t disconnectHandler, void *contextPtr)le_result_t le_ecall_SetEraGlonassPostTestRegistrationTime(uint16_t postTestRegTime)le_result_t le_ecall_SetEraGlonassAutoAnswerTime(uint16_t autoAnswerTime)le_result_t le_ecall_TryConnectService(void)le_result_t le_ecall_SetVIN(const char *LE_NONNULL vin)le_ecall_StateChangeHandlerRef_t le_ecall_AddStateChangeHandler(le_ecall_StateChangeHandlerFunc_t handlerPtr, void *contextPtr)le_result_t le_ecall_ExportMsd(le_ecall_CallRef_t ecallRef, uint8_t *msdPtr, size_t *msdSizePtr)le_result_t le_ecall_SetEraGlonassFallbackTime(uint16_t duration)le_result_t le_ecall_GetPsapNumber(char *psap, size_t psapSize)le_result_t le_ecall_GetVIN(char *vin, size_t vinSize)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_SetPropulsionType(le_ecall_PropulsionTypeBitMask_t propulsionType)le_result_t le_ecall_GetIntervalBetweenDialAttempts(uint16_t *pausePtr)