le_ecall_interface.h

Go to the documentation of this file.
1 
2 
3 /*
4  * ====================== WARNING ======================
5  *
6  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
7  * DO NOT MODIFY IN ANY WAY.
8  *
9  * ====================== WARNING ======================
10  */
11 
12 /**
13  * @page c_ecall eCall
14  *
15  * @ref le_ecall_interface.h "API Reference" <br>
16  * @ref legatoServicesModemECall <br>
17  * @ref sampleApps_eCall sample app <br>
18  * @ref le_ecall_samples <br>
19  *
20  * eCall is a technology initiative intended to bring rapid assistance to auto
21  * accidents anywhere in the European Union. When a serious vehicle accident occurs,
22  * sensors automatically trigger an eCall. When activated, the in-vehicle system (IVS)
23  * establishes a 112-voice connection.
24  *
25  * The Mobile Network Operator handles the eCall like any other 112 call and routes the call to the
26  * most appropriate emergency response centre - Public Safety Answering Point (PSAP).
27  *
28  * At the same time, a digital "minimum set of data" (MSD) message is sent over the voice call using
29  * in-band modem signals. The MSD includes accident information like time, location, driving
30  * direction, and vehicle description.
31  *
32  * The eCall can also be activated manually. The mobile network operator identifies that the 112
33  * call is an eCall from the “eCall flag” inserted by the vehicle’s communication module.
34  *
35  * This API applies for both PAN-EUROPEAN and ERA-GLONASS standards.
36  *
37  * @note eCall service is only available on automotive products.
38  *
39  * @section le_ecall_binding IPC interfaces binding
40  *
41  * All the functions of this API are provided by the @b modemService service.
42  *
43  * Here's a code sample binding to modem services:
44  * @verbatim
45  bindings:
46  {
47  clientExe.clientComponent.le_ecall -> modemService.le_ecall
48  }
49  @endverbatim
50  *
51  * @section le_ecall_operation Operation modes
52  *
53  * The modem can be configured to operate in three different operation modes:
54  * - le_ecall_ForceOnlyMode(): this function configures the eCall operation mode to eCall only, only
55  * emergency number can be used to start an eCall session. The modem doesn't try to register on
56  * the Cellular network. This function forces the modem to behave as eCall only mode whatever
57  * U/SIM operation mode. The change doesn't persist over power cycles.
58  * This function can be called before making an eCall.
59  *
60  * - le_ecall_ForcePersistentOnlyMode(): Same as le_ecall_ForceOnlyMode(), but the change persists
61  * over power cycles.
62  *
63  * - le_ecall_ExitOnlyMode(): this function exits from eCall Only mode. It configures the eCall
64  * operation mode to Normal mode, the modem uses the default operation mode at power up (or after
65  * U/SIM hotswap). The modem behaves following the U/SIM eCall operation mode; for example the
66  * U/SIM can be configured only for eCall, or a combination of eCall and commercial service
67  * provision.
68  *
69  * - le_ecall_GetConfiguredOperationMode(): this function allows the user to retrieve the configured
70  * Operation mode.
71  * The configured operation mode can be:
72  * - @c LE_ECALL_NORMAL_MODE : normal mode. The modem behaves following the U/SIM eCall operation
73  * mode.
74  * - @c LE_ECALL_ONLY_MODE : eCall only mode according to U/SIM operation mode or forced by
75  * application through the le_ecall_ForceOnlyMode() function.
76  * - @c LE_ECALL_FORCED_PERSISTENT_ONLY_MODE : persistent eCall only mode.
77  *
78  * @section le_ecall_session eCall Session
79  *
80  * le_ecall_Create() creates a new eCall object and returns a reference to the eCall session.
81  * The eCall is not yet initiated at this point, the session must be started using one of the
82  * following functions:
83  * - le_ecall_StartManual(): initiate a manual eCall session (triggered by a passenger)
84  * - le_ecall_StartAutomatic(): initiate an automatic eCall session (automatically triggered by
85  * the IVS in case of accident)
86  * - le_ecall_StartTest(): initiate a test eCall session (to test the communication between the
87  * IVS and the PSAP)
88  *
89  * The session can be stopped by calling le_ecall_End(). Note that in some cases, the ongoing eCall
90  * session cannot be ended until a specific eCall state is reached. These cases are listed below:
91  * - During an automatic eCall session, it is not possible to end the ongoing session until
92  * LE_ECALL_STATE_STOPPED event is notified.
93  * - For manual session, it is possible to end the ongoing session if the eCall is not connected
94  * (LE_ECALL_STATE_CONNECTED not yet received) and after LE_ECALL_STATE_STOPPED event is notified.
95  *
96  * @warning An application must wait for the end of the ongoing eCall before triggering another
97  * one with the @c le_ecall_StartXxx() functions. An eCall is ended when:
98  * - the application successfully ended it with le_ecall_End() returning @c LE_OK
99  * - or the event @ref LE_ECALL_STATE_STOPPED is received
100  * - or the event @ref LE_ECALL_STATE_ALACK_RECEIVED_CLEAR_DOWN is received
101  * - or the event @ref LE_ECALL_STATE_DISCONNECTED is received and no redial is launched (see
102  * @ref le_ecall_redial section for more information about the redial process).
103  *
104  * When the eCall object is no longer needed, call le_ecall_Delete() to free all allocated
105  * resources associated with the object.
106  *
107  * The current state of an eCall session can be queried using le_ecall_GetState().
108  * Alternatively, an application can register a handler be notified when the session state
109  * changes. The handler can be managed using le_ecall_AddStateChangeHandler() and
110  * le_ecall_RemoveStateChangeHandler().
111  *
112  * An application can also call le_ecall_GetTerminationReason() to retrieve the reason of the call
113  * termination when call state is @ref LE_ECALL_STATE_DISCONNECTED, and also
114  * le_ecall_GetPlatformSpecificTerminationCode() to get platform specific termination code (refer
115  * to your platform documentation for further details).
116  *
117  * @section le_ecall_concurrency Concurrency
118  *
119  * If another application tries to use the eCall service while a session is already in progress, the
120  * le_ecall_StartManual(), le_ecall_StartAutomatic(), le_ecall_StartTest() functions will return a
121  * @c LE_BUSY error. The eCall session in progress won't be interrupted or disturbed. The
122  * application can follow the session progress with 'state' functions like le_ecall_GetState() and
123  * le_ecall_AddStateChangeHandler().
124  * A manual eCall can't interrupt an automatic eCall, and an automatic eCall can't interrupt a
125  * manual eCall.
126  *
127  * @section le_ecall_msd Minimum Set of Data (MSD)
128  *
129  * The dynamic values of the MSD can be set with:
130  * - le_ecall_SetMsdPosition() sets the position of the vehicle.
131  * - le_ecall_SetMsdPositionN1() sets the first delta position of the vehicle.
132  * - le_ecall_SetMsdPositionN2() sets the second delta position of the vehicle.
133  * - le_ecall_SetMsdPassengersCount() sets the number of passengers.
134  *
135  * The MSD is automatically encoded with the values previously set.
136  *
137  * @warning Those functions return a LE_DUPLICATE error when the MSD has been already imported with
138  * le_ecall_ImportMsd() function.
139  *
140  * The MSD transmission mode can be set or get with:
141  * - le_ecall_SetMsdTxMode()
142  * - le_ecall_GetMsdTxMode()
143  *
144  * The transmission mode can be:
145  * - @c LE_ECALL_TX_MODE_PUSH : the MSD is pushed by the IVS
146  * - @c LE_ECALL_TX_MODE_PULL : the MSD is sent when requested by the PSAP
147  *
148  * It's possible to import a prepared MSD using the le_ecall_ImportMsd() function.
149  * The prepared MSD must answer the requirements described in the "EN 15722:2013" publication (this
150  * publication has been prepared by Technical Committee CEN/TC 278 “Intelligent Transport Systems").
151  *
152  * @warning The imported MSD doesn't take into account the values provided by the
153  * le_ecall_SetMsdXxx() functions. It overwrites any previous imported MSD or encoded MSD.
154  *
155  * @warning The imported MSD overwrites the control flags (automaticActivation and testCall) set by
156  * le_ecall_StartXxx() functions (Manual, Automatic, Test). The User App is in charge of their
157  * correct settings.
158  *
159  * The encoded MSD can be retrieved with le_ecall_ExportMsd() function.
160  *
161  * @note The User app must perform the MSD transmission by calling le_ecall_SendMsd() when the
162  * LE_ECALL_STATE_PSAP_START_IND_RECEIVED event is received.
163  * The MSD can be updated before calling le_ecall_SendMsd(), using the e_ecall_ImportMsd() function
164  * or the le_ecall_SetMsdXxx() functions.
165  *
166  * The date/time on MSD information is internally set by fetching the time from linux system time
167  * (epoch time since 1970-01-01 00:00:00 +0000 (UTC)).
168  *
169  * This time is automatically updated if NITS is supported by the cellular network. Otherwise, it is
170  * up to the user to update the system date/time by calling le_clk_SetAbsoluteTime() function. The
171  * time provided to le_clk_SetAbsoluteTime() function can be retrieved by:
172  * - le_data_GetTime()/le_data_GetDate(): the time from the network NTP.
173  * - le_gnss_GetEpochTime() the GPS epoch time.
174  *
175  * @note Only unsandboxed application can set the date/time by le_clk_SetAbsoluteTime(). In case of
176  * sandboxed application, please contact Sierra Wireless support to update the system date/time in
177  * different ways.
178  *
179  * @section le_ecall_eraglonass ERA-GLONASS compliancy
180  *
181  * To perform an emergency call following the ERA-GLONASS requirements, the 'systemStandard' entry
182  * of the configuration database must be set to 'ERA-GLONASS'.
183  *
184  * Moreover, the User can set some specific configuration settings in accordance with the PSAP
185  * configuration:
186  *
187  * - le_ecall_SetEraGlonassManualDialAttempts(): set the ECALL_MANUAL_DIAL_ATTEMPTS value. If a dial
188  * attempt under manual emergency call initiation failed, it should be repeated maximally
189  * ECALL_MANUAL_DIAL_ATTEMPTS-1 times within the maximal time limit of ECALL_DIAL_DURATION.
190  * The default value is 10.
191  * Redial attempts stop once the call has been cleared down correctly, or if counter / timer
192  * reached their limits.
193  *
194  * Available for both manual and test modes:
195  * - le_ecall_SetEraGlonassAutoDialAttempts(): set the ECALL_AUTO_DIAL_ATTEMPTS value. If a dial
196  * attempt under automatic emergency call initiation failed, it should be repeated maximally
197  * ECALL_AUTO_DIAL_ATTEMPTS-1 times within the maximal time limit of ECALL_DIAL_DURATION.
198  * The default value is 10.
199  * Redial attempts stop once the call has been cleared down correctly, or if counter / timer
200  * reached their limits.
201  * - le_ecall_SetEraGlonassDialDuration(): set the ECALL_DIAL_DURATION time. It is the maximum time
202  * the IVS have to connect the emergency call to the PSAP, including all redial attempts.
203  * If the call is not connected within this time (or ManualDialAttempts/AutoDialAttempts dial
204  * attempts), it will stop.
205  * - le_ecall_SetEraGlonassFallbackTime(): set the ECALL_CCFT time. When the specified timer
206  * duration is reached and IVS NAD didn't receive a call clear-down indication then the call
207  * is automatically terminated.
208  * - le_ecall_SetEraGlonassAutoAnswerTime(): sets the ECALL_AUTO_ANSWER_TIME time, the
209  * maximum time interval wherein IVDS responds to incoming calls automatically after emergency
210  * call completion.
211  * - le_ecall_SetEraGlonassMSDMaxTransmissionTime(): sets the ECALL_MSD_MAX_TRANSMISSION_TIME time,
212  * the maximum time for MSD transmission.
213  *
214  * Available for test mode only:
215  * - le_ecall_SetEraGlonassPostTestRegistrationTime(): sets the ECALL_POST_TEST_REGISTRATION_TIME,
216  * the time interval wherein IVS remains registered in the network after the completion of
217  * transmission of test results to System Operator. The ECALL_POST_TEST_REGISTRATION_TIME default
218  * time value is 120 seconds.
219  *
220  * The corresponding getter functions let you retrieve the configuration settings values:
221  *
222  * - le_ecall_GetEraGlonassManualDialAttempts(): get the ECALL_MANUAL_DIAL_ATTEMPTS value.
223  * - le_ecall_GetEraGlonassAutoDialAttempts(): get the ECALL_AUTO_DIAL_ATTEMPTS value.
224  * - le_ecall_GetEraGlonassDialDuration(): get the ECALL_DIAL_DURATION time.
225  * - le_ecall_GetEraGlonassFallbackTime(): get the ECALL_CCFT time.
226  * - le_ecall_GetEraGlonassAutoAnswerTime(): get the ECALL_AUTO_ANSWER_TIME time.
227  * - le_ecall_GetEraGlonassMSDMaxTransmissionTime(): get the ECALL_MSD_MAX_TRANSMISSION_TIME time.
228  * - le_ecall_GetEraGlonassPostTestRegistrationTime(): get the ECALL_POST_TEST_REGISTRATION_TIME
229  * time.
230  *
231  * @section le_ecall_eraGlonassData ERA-GLONASS MSD additional data
232  *
233  * ERA-GLONASS additional data are optional and provided in the MSD message if any.
234  * They are located in MSD data block number 12 as optional additional data.
235  *
236  * ERA-GLONASS MSD additional data for MSD version 1 describes:
237  * - The crash severity (Accident Severity Index - ASI15)
238  * - The diagnostic result
239  * - The crash information
240  *
241  * ERA-GLONASS MSD additional data for MSD version 2 describes:
242  * - The crash severity (Accident Severity Index - ASI15)
243  * - The diagnostic result
244  * - The crash information
245  * - The coordinate system type
246  *
247  * ERA-GLONASS MSD additional data can be specified through the following functions:
248  * - le_ecall_SetMsdEraGlonassCrashSeverity().
249  * - le_ecall_ResetMsdEraGlonassCrashSeverity().
250  * - le_ecall_SetMsdEraGlonassDiagnosticResult().
251  * - le_ecall_ResetMsdEraGlonassDiagnosticResult().
252  * - le_ecall_SetMsdEraGlonassCrashInfo().
253  * - le_ecall_ResetMsdEraGlonassCrashInfo().
254  * - le_ecall_SetMsdEraGlonassCoordinateSystemType().
255  * - le_ecall_ResetMsdEraGlonassCoordinateSystemType().
256  *
257  * ERA-GLONASS additional data is encoded using the OID version "1.4.1" for
258  * MSD version 1 and the OID version "1.4.2" for MSD version 2.
259  * This was assigned to ERA-GLONASS optional additional data by CEN.
260  *
261  * Content of data block in the AdditionalData for MSD version 1 should be:
262  *
263  * @code
264  *
265  * ERAOADASN1Module
266  * DEFINITIONS
267  * AUTOMATIC TAGS ::=
268  * BEGIN
269  * ERADataFormatId::= INTEGER (1)
270  *
271  * ERAAdditionalData ::= SEQUENCE {
272  * crashSeverity INTEGER(0..2047) OPTIONAL,
273  * diagnosticResult DiagnosticResult OPTIONAL,
274  * crashInfo CrashInfo OPTIONAL,
275  * ...
276  * }
277  *
278  * DiagnosticResult ::= SEQUENCE {
279  * micConnectionFailure BOOLEAN OPTIONAL,
280  * micFailure BOOLEAN OPTIONAL,
281  * rightSpeakerFailure BOOLEAN OPTIONAL,
282  * leftSpeakerFailure BOOLEAN OPTIONAL,
283  * speakersFailure BOOLEAN OPTIONAL,
284  * ignitionLineFailure BOOLEAN OPTIONAL,
285  * uimFailure BOOLEAN OPTIONAL,
286  * statusIndicatorFailure BOOLEAN OPTIONAL,
287  * batteryFailure BOOLEAN OPTIONAL,
288  * batteryVoltageLow BOOLEAN OPTIONAL,
289  * crashSensorFailure BOOLEAN OPTIONAL,
290  * firmwareImageCorruption BOOLEAN OPTIONAL,
291  * commModuleInterfaceFailure BOOLEAN OPTIONAL,
292  * gnssReceiverFailure BOOLEAN OPTIONAL,
293  * raimProblem BOOLEAN OPTIONAL,
294  * gnssAntennaFailure BOOLEAN OPTIONAL,
295  * commModuleFailure BOOLEAN OPTIONAL,
296  * eventsMemoryOverflow BOOLEAN OPTIONAL,
297  * crashProfileMemoryOverflow BOOLEAN OPTIONAL,
298  * otherCriticalFailires BOOLEAN OPTIONAL,
299  * otherNotCriticalFailures BOOLEAN OPTIONAL
300  * }
301  *
302  * CrashInfo ::= SEQUENCE {
303  * crashFront BOOLEAN OPTIONAL,
304  * crashLeft BOOLEAN OPTIONAL,
305  * crashRight BOOLEAN OPTIONAL,
306  * crashRear BOOLEAN OPTIONAL,
307  * crashRollover BOOLEAN OPTIONAL,
308  * crashSide BOOLEAN OPTIONAL,
309  * crashFrontOrSide BOOLEAN OPTIONAL,
310  * crashAnotherType BOOLEAN OPTIONAL
311  * }
312  * END
313  * @endcode
314  *
315  * Content of data block in the AdditionalData for MSD version 2 should be:
316  *
317  * @code
318  *
319  * ERAOADASN1Module
320  * DEFINITIONS
321  * AUTOMATIC TAGS ::=
322  * BEGIN
323  * ERADataFormatId::= INTEGER (1)
324  *
325  * ERAAdditionalData ::= SEQUENCE {
326  * crashSeverity INTEGER(0..2047) OPTIONAL,
327  * diagnosticResult DiagnosticResult OPTIONAL,
328  * crashInfo CrashInfo OPTIONAL,
329  * coordinateSystemType CoordinateSystemType DEFAULT wgs84,
330  * ...
331  * }
332  *
333  * DiagnosticResult ::= SEQUENCE {
334  * micConnectionFailure BOOLEAN OPTIONAL,
335  * micFailure BOOLEAN OPTIONAL,
336  * rightSpeakerFailure BOOLEAN OPTIONAL,
337  * leftSpeakerFailure BOOLEAN OPTIONAL,
338  * speakersFailure BOOLEAN OPTIONAL,
339  * ignitionLineFailure BOOLEAN OPTIONAL,
340  * uimFailure BOOLEAN OPTIONAL,
341  * statusIndicatorFailure BOOLEAN OPTIONAL,
342  * batteryFailure BOOLEAN OPTIONAL,
343  * batteryVoltageLow BOOLEAN OPTIONAL,
344  * crashSensorFailure BOOLEAN OPTIONAL,
345  * firmwareImageCorruption BOOLEAN OPTIONAL,
346  * commModuleInterfaceFailure BOOLEAN OPTIONAL,
347  * gnssReceiverFailure BOOLEAN OPTIONAL,
348  * raimProblem BOOLEAN OPTIONAL,
349  * gnssAntennaFailure BOOLEAN OPTIONAL,
350  * commModuleFailure BOOLEAN OPTIONAL,
351  * eventsMemoryOverflow BOOLEAN OPTIONAL,
352  * crashProfileMemoryOverflow BOOLEAN OPTIONAL,
353  * otherCriticalFailires BOOLEAN OPTIONAL,
354  * otherNotCriticalFailures BOOLEAN OPTIONAL
355  * }
356  *
357  * CrashInfo ::= SEQUENCE {
358  * crashFront BOOLEAN OPTIONAL,
359  * crashLeft BOOLEAN OPTIONAL,
360  * crashRight BOOLEAN OPTIONAL,
361  * crashRear BOOLEAN OPTIONAL,
362  * crashRollover BOOLEAN OPTIONAL,
363  * crashSide BOOLEAN OPTIONAL,
364  * crashFrontOrSide BOOLEAN OPTIONAL,
365  * crashAnotherType BOOLEAN OPTIONAL
366  * }
367  *
368  * CoordinateSystemType ::= ENUMERATED {
369  * wgs64 (1),
370  * ps90 (2)
371  * }
372  * END
373  *
374  * @endcode
375  *
376  * @section le_ecall_redial Redial management
377  *
378  * In the case of PAN-EUROPEAN, the redial can be performed as many times as desired but should be
379  * performed within 2 minutes. (EN 16062:2014 -7.14.3).
380  *
381  * In the case of ERA-GLONASS, the redial can be performed ECALL_MANUAL_DIAL_ATTEMPTS times within
382  * the maximal time limit of ECALL_DIAL_DURATION (GOST 54620 2013 -- Appendix A).
383  *
384  * The \b LE_ECALL_STATE_END_OF_REDIAL_PERIOD state event notifies the User of the redial period
385  * end.
386  *
387  * @section le_ecall_configuration eCall configuration
388  *
389  * Some parameters used by the eCall service can be configured through APIs. This includes the
390  * number to dial, the deregistration time, the redial interval, and some MSD information.
391  *
392  * @note It is not possible to change the current configuration if an eCall session is already
393  * started. The ongoing session needs to be stopped first by calling le_ecall_End() before
394  * calling the eCall configuration setting functions.
395  * There is one exception to the previous statement: if the NAD deregistration mechanism is enabled
396  * an T9/T10 timers have not expired yet, it is not possible to change the eCall settings even after
397  * calling le_ecall_End(). It is recommended to wait for T9/T10 expiry notification first, then
398  * call le_ecall_End() to apply new eCall settings for the next session.
399  *
400  * @subsection le_ecall_configuration_callNumber eCall number
401  *
402  * By default, the number to dial is read from the FDN/SDN (Fixed Dialling Numbers/Service
403  * Dialling Numbers) of the U/SIM, depending upon the eCall operating mode.
404  *
405  * However, the PSAP phone number can be queried and set with:
406  * - le_ecall_GetPsapNumber()
407  * - le_ecall_SetPsapNumber()
408  *
409  * @snippet "apps/test/modemServices/ecall/ecallIntegrationTest/eCallTest/le_ecallTest.c" PsapNumber
410  *
411  * @note That PSAP number is not applied to a manual or an automatically initiated eCall. For these
412  * modes, an emergency call is launched.
413  *
414  * @warning These two functions don't modify or read the U/SIM content.
415  *
416  * When modem is in @ref LE_ECALL_FORCED_PERSISTENT_ONLY_MODE or @ref LE_ECALL_ONLY_MODE,
417  * le_ecall_UseUSimNumbers() API can be called to request the modem to read the number to
418  * dial from the FDN/SDN of the U/SIM.
419  *
420  * @note If FDN directory is updated with new dial numbers, be sure that the SIM card is refreshed.
421  *
422  * @subsection le_ecall_configuration_nad NAD deregistration time
423  *
424  * The NAD (Network Access Device, i.e. the Modem) deregistration allows the device to remain
425  * registered to the network for an amount of time after the eCall is exited whether remotely or
426  * user-initiated using le_ecall_End().
427  * The time value can be set with the le_ecall_SetNadDeregistrationTime() API and retrieved with the
428  * le_ecall_GetNadDeregistrationTime() API.
429  *
430  * @snippet "apps/test/modemServices/ecall/ecallIntegrationTest/eCallTest/le_ecallTest.c" NadTime
431  *
432  * 1. PAN-EUROPEAN standard (<em>EN 16062</em>) defines the T9 and T10 timers. After an eCall
433  * clear-down, an <b>eCall only</b> IVS shall:
434  * - Remain registered on the network for at least the duration of T9, which is set to
435  * one hour by default.
436  * - Deregister from the network after the expiration of T10, which duration is set to
437  * twelve hours by default.
438  * 2. ERA-GLONASS standard (<em>ENG_GOST_R_54620</em>) defines the NAD_DEREGISTRATION_TIME
439  * with a minimal value of 2 hours and a maximum value of 12 hours. After an eCall clear-down,
440  * the IVS shall remain registered on the network and deregister from the network after the
441  * expiration of the NAD_DEREGISTRATION_TIME.
442  *
443  * The le_ecall_SetNadDeregistrationTime() API is used to set the duration of a
444  * <em>deregistration timer</em>: after an eCall clear-down, the IVS remains registered on the
445  * network for the duration of this timer and then automatically deregisters from the network upon
446  * its expiration.
447  *
448  * Moreover, when IVS NAD is in <b>eCall only</b> mode, and the eCall has been normally ended by
449  * PSAP or by le_ecall_End(), then the user can terminate registration state before T9/T10 or
450  * NAD_DEREGISTRATION_TIME expired by le_ecall_TerminateRegistration().
451  *
452  * @subsubsection le_ecall_configuration_nad_panEU PAN-EUROPEAN standard
453  * As the T9 timer duration is fixed to one hour, the notified events depend on the
454  * <em>deregistration timer</em> duration:
455  * - If its duration is set to one hour, the @ref LE_ECALL_STATE_TIMEOUT_T9 event will be reported.
456  * In this case deregistration is automatically performed when the T9 timeout indication is
457  * received.
458  * - If its duration is set to more than one hour and less than twelve hours then the
459  * @ref LE_ECALL_STATE_TIMEOUT_T10 event will be reported when the <em>deregistration timer</em>
460  * expires. The T9 timeout (@ref LE_ECALL_STATE_TIMEOUT_T9 event) will not be notified.
461  * In this case deregistration is automatically performed when the <em>deregistration timer</em>
462  * expires, provided that the application didn't already deregister from the network before.
463  *
464  * @subsubsection le_ecall_configuration_nad_eraGlonass ERA-GLONASS standard
465  * - The @ref LE_ECALL_STATE_TIMEOUT_T9 event is not reported as it is not defined in the
466  * ERA-GLONASS standard.
467  * - The NAD_DEREGISTRATION_TIME default value is eight hours, as defined by
468  * <em>GOST_R 54620 Table A.1</em>. It can be changed with le_ecall_SetNadDeregistrationTime()
469  * and the value must be set between 2 and 12 hours.
470  * - The @ref LE_ECALL_STATE_TIMEOUT_T10 event will be reported when the NAD_DEREGISTRATION_TIME
471  * expires. In this case deregistration is automatically performed when the timer expires.
472  *
473  * @subsubsection le_ecall_configuration_nad_timerValue Timer value
474  *
475  * Although the time is set in minutes the value is taken in hours, for example:
476  * - from 1 to 60 minutes -> 1 hour
477  * - from 61 to 120 minutes -> 2 hours, etc.
478  *
479  * Example: if @c deregTime parameter unit is minutes, the effective time is:
480  * @code ECallConfiguration.nad_deregistration_time = (deregTime+59)/60; @endcode
481  *
482  * After termination of an emergency call the in-vehicle system remains registered on the network
483  * for the period of time, defined by the installation parameter NAD_DEREGISTRATION_TIME.
484  *
485  * @warning Be sure to check the possible values of NAD_DEREGISTRATION_TIME for your specific
486  * platform.
487  *
488  * @subsection le_ecall_configuration_postTestRegistrationTime Post test registration time
489  *
490  * The ECALL_POST_TEST_REGISTRATION_TIME time value can be set with the
491  * le_ecall_SetEraGlonassPostTestRegistrationTime() function and retrieved by the
492  * le_ecall_GetEraGlonassPostTestRegistrationTime() function.
493  *
494  * @snippet "apps/test/modemServices/ecall/ecallIntegrationTest/eCallTest/le_ecallTest.c" PostTest
495  *
496  * @subsection le_ecall_configuration_redialInterval Redial interval
497  *
498  * The minimum interval value between dial attempts can be set or get with:
499  * - le_ecall_SetIntervalBetweenDialAttempts()
500  * - le_ecall_GetIntervalBetweenDialAttempts()
501  *
502  * @snippet "apps/test/modemServices/ecall/ecallIntegrationTest/eCallTest/le_ecallTest.c" DialTimer
503  *
504  * The default value is set to 30 seconds.
505  *
506  * The time is counted from the start of the first dial attempt.
507  *
508  * If more time has expired during the dial attempt, it will wait for 1 second to allow hangup
509  * before redialing.
510  *
511  * If less time has expired during the dial attempt, it will wait for
512  * (interval - 'dial attempt duration') seconds to allow hangup before redialing.
513  *
514  * In the case the call was connected, the redial will be immediate.
515  *
516  * le_ecall_SetIntervalBetweenDialAttempts() is available for both manual and test modes.
517  *
518  * @subsection le_ecall_configuration_misc Miscellaneous
519  *
520  * The preferred system standard defaults to PAN-EUROPEAN
521  * It can be set an gotten with the following functions:
522  * - le_ecall_SetSystemStandard()
523  * - le_ecall_GetSystemStandard()
524  *
525  * @snippet "apps/test/modemServices/ecall/ecallIntegrationTest/eCallTest/le_ecallTest.c" Standard
526  *
527  * The MSD version can be set and and gotten with the following functions:
528  * - le_ecall_SetMsdVersion()
529  * - le_ecall_GetMsdVersion()
530  *
531  * @snippet "apps/test/modemServices/ecall/ecallIntegrationTest/eCallTest/le_ecallTest.c" MsdVersion
532  *
533  * The vehicle type can be set and gotten with the following functions:
534  * - le_ecall_SetVehicleType()
535  * - le_ecall_GetVehicleType()
536  *
537  * @snippet "apps/test/modemServices/ecall/ecallIntegrationTest/eCallTest/le_ecallTest.c" Vehicle
538  *
539  * The vehicle identifier can be set and gotten with the following functions:
540  * - le_ecall_SetVIN()
541  * - le_ecall_GetVIN()
542  *
543  * @snippet "apps/test/modemServices/ecall/ecallIntegrationTest/eCallTest/le_ecallTest.c" VIN
544  *
545  * The propulsion type can be set and gotten with the following functions:
546  * - le_ecall_SetPropulsionType()
547  * - le_ecall_GetPropulsionType()
548  *
549  * @snippet "apps/test/modemServices/ecall/ecallIntegrationTest/eCallTest/le_ecallTest.c" Propulsion
550  *
551  * @section le_ecall_samples Code samples
552  *
553  * A sample code that implements an eCall test session with a local voice prompt can be found in
554  * \b eCallWPrompt.c file (please refer to @ref c_ecallWPromptSample page).
555  *
556  * A sample code that implements an eCall test session with a voice call connection can be found in
557  * \b eCallWVoice.c file (please refer to @ref c_ecallWVoiceSample page).
558  *
559  * If you want to have a look at a more in-depth usage of these APIs, please refer to the
560  * @ref le_ecall_interface.h.
561  *
562  * <HR>
563  *
564  * Copyright (C) Sierra Wireless Inc.
565  */
566 /**
567  * @file le_ecall_interface.h
568  *
569  * Legato @ref c_ecall include file.
570  *
571  * Copyright (C) Sierra Wireless Inc.
572  */
573 /**
574  * @page c_ecallWPromptSample Sample code of an eCall test session with a local voice prompt
575  *
576  * @include "apps/test/modemServices/ecall/ecallWPrompt/eCallWPrompt/eCallWPrompt.c"
577  */
578 /**
579  * @page c_ecallWVoiceSample Sample code an eCall test session with a voice call connection
580  *
581  * @include "apps/test/modemServices/ecall/ecallWVoice/eCallWVoice/eCallWVoice.c"
582  */
583 
584 #ifndef LE_ECALL_INTERFACE_H_INCLUDE_GUARD
585 #define LE_ECALL_INTERFACE_H_INCLUDE_GUARD
586 
587 
588 #include "legato.h"
589 
590 // Interface specific includes
591 #include "le_mdmDefs_interface.h"
592 #include "le_mcc_interface.h"
593 
594 // Internal includes for this interface
595 #include "le_ecall_common.h"
596 //--------------------------------------------------------------------------------------------------
597 /**
598  * Type for handler called when a server disconnects.
599  */
600 //--------------------------------------------------------------------------------------------------
601 typedef void (*le_ecall_DisconnectHandler_t)(void *);
602 
603 //--------------------------------------------------------------------------------------------------
604 /**
605  *
606  * Connect the current client thread to the service providing this API. Block until the service is
607  * available.
608  *
609  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
610  * called before any other functions in this API. Normally, ConnectService is automatically called
611  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
612  *
613  * This function is created automatically.
614  */
615 //--------------------------------------------------------------------------------------------------
617 (
618  void
619 );
620 
621 //--------------------------------------------------------------------------------------------------
622 /**
623  *
624  * Try to connect the current client thread to the service providing this API. Return with an error
625  * if the service is not available.
626  *
627  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
628  * called before any other functions in this API. Normally, ConnectService is automatically called
629  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
630  *
631  * This function is created automatically.
632  *
633  * @return
634  * - LE_OK if the client connected successfully to the service.
635  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is
636  * bound.
637  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
638  * - LE_COMM_ERROR if the Service Directory cannot be reached.
639  */
640 //--------------------------------------------------------------------------------------------------
642 (
643  void
644 );
645 
646 //--------------------------------------------------------------------------------------------------
647 /**
648  * Set handler called when server disconnection is detected.
649  *
650  * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants
651  * to continue without exiting, it should call longjmp() from inside the handler.
652  */
653 //--------------------------------------------------------------------------------------------------
655 (
656  le_ecall_DisconnectHandler_t disconnectHandler,
657  void *contextPtr
658 );
659 
660 //--------------------------------------------------------------------------------------------------
661 /**
662  *
663  * Disconnect the current client thread from the service providing this API.
664  *
665  * Normally, this function doesn't need to be called. After this function is called, there's no
666  * longer a connection to the service, and the functions in this API can't be used. For details, see
667  * @ref apiFilesC_client.
668  *
669  * This function is created automatically.
670  */
671 //--------------------------------------------------------------------------------------------------
673 (
674  void
675 );
676 
677 
678 //--------------------------------------------------------------------------------------------------
679 /**
680  * Reference returned by Create function and used by other functions
681  */
682 //--------------------------------------------------------------------------------------------------
683 
684 
685 //--------------------------------------------------------------------------------------------------
686 /**
687  * Configured operation modes.
688  */
689 //--------------------------------------------------------------------------------------------------
690 
691 
692 //--------------------------------------------------------------------------------------------------
693 /**
694  * Configure which standard to follow for the eCall, either PAN European eCall or ERA GLONASS.
695  */
696 //--------------------------------------------------------------------------------------------------
697 
698 
699 //--------------------------------------------------------------------------------------------------
700 /**
701  * eCall session states.
702  */
703 //--------------------------------------------------------------------------------------------------
704 
705 
706 //--------------------------------------------------------------------------------------------------
707 /**
708  * eCall MSD transmission mode.
709  */
710 //--------------------------------------------------------------------------------------------------
711 
712 
713 //--------------------------------------------------------------------------------------------------
714 /**
715  * eCall MSD vehicle type
716  */
717 //--------------------------------------------------------------------------------------------------
718 
719 
720 //--------------------------------------------------------------------------------------------------
721 /**
722  * Propulsion type Bit Mask
723  */
724 //--------------------------------------------------------------------------------------------------
725 
726 
727 //--------------------------------------------------------------------------------------------------
728 /**
729  * Diagnostic result Bit Mask (64 bits)
730  *
731  */
732 //--------------------------------------------------------------------------------------------------
733 
734 
735 //--------------------------------------------------------------------------------------------------
736 /**
737  * Crash information Bit Mask (16 bits) indicating the type of road accident.
738  *
739  */
740 //--------------------------------------------------------------------------------------------------
741 
742 
743 //--------------------------------------------------------------------------------------------------
744 /**
745  * eCall MSD coordinate system type
746  */
747 //--------------------------------------------------------------------------------------------------
748 
749 
750 //--------------------------------------------------------------------------------------------------
751 /**
752  * Handler for eCall state changes.
753  *
754  */
755 //--------------------------------------------------------------------------------------------------
756 
757 
758 //--------------------------------------------------------------------------------------------------
759 /**
760  * Reference type used by Add/Remove functions for EVENT 'le_ecall_StateChange'
761  */
762 //--------------------------------------------------------------------------------------------------
763 
764 
765 //--------------------------------------------------------------------------------------------------
766 /**
767  * This function configures the eCall operation mode to eCall only, only emergency number can be
768  * used to start an eCall session. The modem doesn't try to register on the Cellular network.
769  * This function forces the modem to behave as eCall only mode whatever U/SIM operation mode.
770  * The change doesn't persist over power cycles.
771  * This function can be called before making an eCall.
772  *
773  * @return
774  * - LE_OK on success
775  * - LE_FAULT for other failures
776  * - LE_UNSUPPORTED Not supported on this platform
777  */
778 //--------------------------------------------------------------------------------------------------
780 (
781  void
782 );
783 
784 //--------------------------------------------------------------------------------------------------
785 /**
786  * Same as le_ecall_ForceOnlyMode(), but the change persists over power cycles.
787  *
788  * @return
789  * - LE_OK on success
790  * - LE_FAULT for other failures
791  * - LE_UNSUPPORTED Not supported on this platform
792  */
793 //--------------------------------------------------------------------------------------------------
795 (
796  void
797 );
798 
799 //--------------------------------------------------------------------------------------------------
800 /**
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 behaves
803  * following the U/SIM eCall operation mode; for example the U/SIM can be configured only for eCall,
804  * or a combination of eCall and commercial service provision.
805  *
806  * @return
807  * - LE_OK on success
808  * - LE_FAULT for other failures
809  * - LE_UNSUPPORTED Not supported on this platform
810  */
811 //--------------------------------------------------------------------------------------------------
813 (
814  void
815 );
816 
817 //--------------------------------------------------------------------------------------------------
818 /**
819  * Get the configured Operation mode.
820  *
821  * @return
822  * - LE_OK on success
823  * - LE_FAULT for other failures
824  * - LE_UNSUPPORTED Not supported on this platform
825  *
826  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
827  * function will not return.
828  */
829 //--------------------------------------------------------------------------------------------------
831 (
832  le_ecall_OpMode_t* opModePtr
833  ///< [OUT] Operation mode
834 );
835 
836 //--------------------------------------------------------------------------------------------------
837 /**
838  * Add handler function for EVENT 'le_ecall_StateChange'
839  *
840  * This event provides information on eCall state changes.
841  *
842  */
843 //--------------------------------------------------------------------------------------------------
844 le_ecall_StateChangeHandlerRef_t le_ecall_AddStateChangeHandler
845 (
846  le_ecall_StateChangeHandlerFunc_t handlerPtr,
847  ///< [IN]
848  void* contextPtr
849  ///< [IN]
850 );
851 
852 //--------------------------------------------------------------------------------------------------
853 /**
854  * Remove handler function for EVENT 'le_ecall_StateChange'
855  */
856 //--------------------------------------------------------------------------------------------------
858 (
859  le_ecall_StateChangeHandlerRef_t handlerRef
860  ///< [IN]
861 );
862 
863 //--------------------------------------------------------------------------------------------------
864 /**
865  * Create a new eCall object
866  *
867  * The eCall is not actually established at this point. It's still up to the caller to call
868  * le_ecall_Start() when ready.
869  *
870  * @return
871  * - A reference to the new Call object.
872  *
873  * @note On failure, the process exits; you don't have to worry about checking the returned
874  * reference for validity.
875  */
876 //--------------------------------------------------------------------------------------------------
877 le_ecall_CallRef_t le_ecall_Create
878 (
879  void
880 );
881 
882 //--------------------------------------------------------------------------------------------------
883 /**
884  * Call to free up a call reference.
885  *
886  * @note This will free the reference, but not necessarily stop an active eCall. If there are
887  * other holders of this reference the eCall will remain active.
888  */
889 //--------------------------------------------------------------------------------------------------
890 void le_ecall_Delete
891 (
892  le_ecall_CallRef_t ecallRef
893  ///< [IN] eCall reference
894 );
895 
896 //--------------------------------------------------------------------------------------------------
897 /**
898  * Set the system standard.
899  * Default is PAN EUROPEAN
900  *
901  * @return
902  * - LE_OK on success
903  * - LE_FAULT for other failures
904  */
905 //--------------------------------------------------------------------------------------------------
907 (
908  le_ecall_SystemStandard_t systemStandard
909  ///< [IN] System standard
910 );
911 
912 //--------------------------------------------------------------------------------------------------
913 /**
914  * Get the system standard.
915  *
916  * @return
917  * - LE_OK on success
918  * - LE_FAULT for other failures
919  * - LE_BAD_PARAMETER parameter is NULL
920  */
921 //--------------------------------------------------------------------------------------------------
923 (
924  le_ecall_SystemStandard_t* systemStandardPtr
925  ///< [OUT] System Standard
926 );
927 
928 //--------------------------------------------------------------------------------------------------
929 /**
930  * Set the MSDs version.
931  * Default value is 1
932  *
933  * @return
934  * - LE_OK on success
935  * - LE_FAULT for other failures
936  */
937 //--------------------------------------------------------------------------------------------------
939 (
940  uint32_t msdVersion
941  ///< [IN] Msd version
942 );
943 
944 //--------------------------------------------------------------------------------------------------
945 /**
946  * Get the MSD version.
947  *
948  * @return
949  * - LE_OK on success
950  * - LE_FAULT for other failures
951  * - LE_BAD_PARAMETER parameter is NULL
952  */
953 //--------------------------------------------------------------------------------------------------
955 (
956  uint32_t* msdVersionPtr
957  ///< [OUT] Msd version
958 );
959 
960 //--------------------------------------------------------------------------------------------------
961 /**
962  * Set the Vehicled Type
963  * Default value is 0
964  *
965  * @return
966  * - LE_OK on success
967  * - LE_FAULT for other failures
968  */
969 //--------------------------------------------------------------------------------------------------
971 (
972  le_ecall_MsdVehicleType_t vehicleType
973  ///< [IN] Vehicle type
974 );
975 
976 //--------------------------------------------------------------------------------------------------
977 /**
978  * Get the Vehicled Type.
979  *
980  * @return
981  * - LE_OK on success
982  * - LE_BAD_PARAMETER parameter is NULL
983  * - LE_FAULT for other failures
984  */
985 //--------------------------------------------------------------------------------------------------
987 (
988  le_ecall_MsdVehicleType_t* vehicleTypePtr
989  ///< [OUT] Vehicle type
990 );
991 
992 //--------------------------------------------------------------------------------------------------
993 /**
994  * Set the VIN (Vehicle Identification Number).
995  *
996  * @return
997  * - LE_OK on success
998  * - LE_BAD_PARAMETER parameter is NULL.
999  * - LE_FAULT for other failures
1000  */
1001 //--------------------------------------------------------------------------------------------------
1003 (
1004  const char* LE_NONNULL vin
1005  ///< [IN] VIN (Vehicle Identification Number)
1006 );
1007 
1008 //--------------------------------------------------------------------------------------------------
1009 /**
1010  * Get the VIN (Vehicle Identification Number).
1011  *
1012  * @return
1013  * - LE_OK on success
1014  * - LE_NOT_FOUND if the value is not set.
1015  * - LE_BAD_PARAMETER parameter is NULL or to small
1016  * - LE_FAULT for other failures
1017  */
1018 //--------------------------------------------------------------------------------------------------
1020 (
1021  char* vin,
1022  ///< [OUT] VIN is gotten with a null termination.
1023  size_t vinSize
1024  ///< [IN]
1025 );
1026 
1027 //--------------------------------------------------------------------------------------------------
1028 /**
1029  * Set the propulsion type.
1030  * Note that a vehicle may have more than one propulsion type.
1031  *
1032  * @return
1033  * - LE_OK on success
1034  * - LE_FAULT for other failures
1035  */
1036 //--------------------------------------------------------------------------------------------------
1038 (
1039  le_ecall_PropulsionTypeBitMask_t propulsionType
1040  ///< [IN] bitmask
1041 );
1042 
1043 //--------------------------------------------------------------------------------------------------
1044 /**
1045  * Get the propulsion stored.
1046  * Note that a vehicle may have more than one propulsion type.
1047  *
1048  * @return
1049  * - LE_OK on success
1050  * - LE_NOT_FOUND if the value is not set.
1051  * - LE_FAULT for other failures
1052  * - LE_BAD_PARAMETER parameter is NULL
1053  */
1054 //--------------------------------------------------------------------------------------------------
1056 (
1057  le_ecall_PropulsionTypeBitMask_t* propulsionTypePtr
1058  ///< [OUT] bitmask
1059 );
1060 
1061 //--------------------------------------------------------------------------------------------------
1062 /**
1063  * Set the push/pull transmission mode.
1064  *
1065  * @return
1066  * - LE_OK on success
1067  * - LE_FAULT for other failures
1068  * - LE_UNSUPPORTED Not supported on this platform
1069  */
1070 //--------------------------------------------------------------------------------------------------
1072 (
1073  le_ecall_MsdTxMode_t mode
1074  ///< [IN] Transmission mode
1075 );
1076 
1077 //--------------------------------------------------------------------------------------------------
1078 /**
1079  * Get the push/pull transmission mode.
1080  *
1081  * @return
1082  * - LE_OK on success
1083  * - LE_FAULT for other failures
1084  * - LE_UNSUPPORTED Not supported on this platform
1085  *
1086  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1087  * function will not return.
1088  */
1089 //--------------------------------------------------------------------------------------------------
1091 (
1092  le_ecall_MsdTxMode_t* modePtr
1093  ///< [OUT] Transmission mode
1094 );
1095 
1096 //--------------------------------------------------------------------------------------------------
1097 /**
1098  * Set the position transmitted by the MSD.
1099  *
1100  * @return
1101  * - LE_OK on success
1102  * - LE_DUPLICATE an MSD has been already imported
1103  * - LE_BAD_PARAMETER bad input parameter
1104  * - LE_FAULT on other failures
1105  *
1106  * @note The process exits, if an invalid eCall reference is given
1107  */
1108 //--------------------------------------------------------------------------------------------------
1110 (
1111  le_ecall_CallRef_t ecallRef,
1112  ///< [IN] eCall reference
1113  bool isTrusted,
1114  ///< [IN] true if the position is accurate, false otherwise
1115  int32_t latitude,
1116  ///< [IN] latitude in degrees with 6 decimal places, positive North.
1117  ///< Maximum value is +90 degrees (+90000000), minimum value is -90
1118  ///< degrees (-90000000).
1119  int32_t longitude,
1120  ///< [IN] longitude in degrees with 6 decimal places, positive East.
1121  ///< Maximum value is +180 degrees (+180000000), minimum value is
1122  ///< -180 degrees (-180000000).
1123  int32_t direction
1124  ///< [IN] direction of the vehicle from magnetic north (0 to 358, clockwise)
1125  ///< in 2-degrees unit. Valid range is 0 to 179. If direction of
1126  ///< travel is invalid or unknown, the value 0xFF shall be used.
1127 );
1128 
1129 //--------------------------------------------------------------------------------------------------
1130 /**
1131  * Set the position Delta N-1 from position set in le_ecall_SetMsdPosition() transmitted by the MSD.
1132  *
1133  * @return
1134  * - LE_OK on success
1135  * - LE_DUPLICATE an MSD has been already imported
1136  * - LE_BAD_PARAMETER bad input parameter
1137  * - LE_FAULT on other failures
1138  *
1139  * @note The process exits, if an invalid eCall reference is given
1140  */
1141 //--------------------------------------------------------------------------------------------------
1143 (
1144  le_ecall_CallRef_t ecallRef,
1145  ///< [IN] eCall reference
1146  int32_t latitudeDeltaN1,
1147  ///< [IN] longitude delta from position set in SetMsdPosition
1148  ///< 1 Unit = 100 miliarcseconds, which is approximately 3m
1149  ///< maximum value: 511 = 0 0'51.100'' (+- 1580m)
1150  ///< minimum value: -512 = -0 0'51.200'' (+- -1583m)
1151  int32_t longitudeDeltaN1
1152  ///< [IN] longitude delta from position set in SetMsdPosition
1153  ///< 1 Unit = 100 miliarcseconds, which is approximately 3m
1154  ///< maximum value: 511 = 0 0'51.100'' (+-1580m)
1155  ///< minimum value: -512 = -0 0'51.200'' (+- -1583m) )
1156 );
1157 
1158 //--------------------------------------------------------------------------------------------------
1159 /**
1160  * Set the position Delta N-2 from position set in le_ecall_SetMsdPositionN1() transmitted by the MSD.
1161  *
1162  * @return
1163  * - LE_OK on success
1164  * - LE_DUPLICATE an MSD has been already imported
1165  * - LE_BAD_PARAMETER bad input parameter
1166  * - LE_FAULT on other failures
1167  *
1168  * @note The process exits, if an invalid eCall reference is given
1169  */
1170 //--------------------------------------------------------------------------------------------------
1172 (
1173  le_ecall_CallRef_t ecallRef,
1174  ///< [IN] eCall reference
1175  int32_t latitudeDeltaN2,
1176  ///< [IN] longitude delta from position set in SetMsdPositionN1
1177  ///< 1 Unit = 100 miliarcseconds, which is approximately 3m
1178  ///< maximum value: 511 = 0 0'51.100'' (+-1580m)
1179  ///< minimum value: -512 = -0 0'51.200'' (+- -1583m)
1180  int32_t longitudeDeltaN2
1181  ///< [IN] longitude delta from position set in SetMsdPositionN1
1182  ///< 1 Unit = 100 miliarcseconds, which is approximately 3m
1183  ///< maximum value: 511 = 0 0'51.100'' (+-1580m)
1184  ///< minimum value: -512 = -0 0'51.200'' (+- -1583m) )
1185 );
1186 
1187 //--------------------------------------------------------------------------------------------------
1188 /**
1189  * Set the number of passengers transmitted by the MSD.
1190  *
1191  * @return
1192  * - LE_OK on success
1193  * - LE_DUPLICATE an MSD has been already imported
1194  * - LE_BAD_PARAMETER bad eCall reference
1195  *
1196  * @note The process exits, if an invalid eCall reference is given
1197  */
1198 //--------------------------------------------------------------------------------------------------
1200 (
1201  le_ecall_CallRef_t ecallRef,
1202  ///< [IN] eCall reference
1203  uint32_t paxCount
1204  ///< [IN] number of passengers
1205 );
1206 
1207 //--------------------------------------------------------------------------------------------------
1208 /**
1209  * Import an already prepared MSD.
1210  *
1211  * MSD is transmitted only after an emergency call has been established.
1212  *
1213  * @return
1214  * - LE_OK on success
1215  * - LE_OVERFLOW The imported MSD length exceeds the MSD_MAX_LEN maximum length.
1216  * - LE_BAD_PARAMETER bad eCall reference
1217  * - LE_FAULT for other failures
1218  *
1219  * @note On failure, the process exits; you don't have to worry about checking the returned
1220  * reference for validity.
1221  */
1222 //--------------------------------------------------------------------------------------------------
1224 (
1225  le_ecall_CallRef_t ecallRef,
1226  ///< [IN] eCall reference
1227  const uint8_t* msdPtr,
1228  ///< [IN] the prepared MSD
1229  size_t msdSize
1230  ///< [IN]
1231 );
1232 
1233 //--------------------------------------------------------------------------------------------------
1234 /**
1235  * Export the encoded MSD.
1236  *
1237  * @return
1238  * - LE_OK on success
1239  * - LE_OVERFLOW The encoded MSD length exceeds the user's buffer length.
1240  * - LE_NOT_FOUND No encoded MSD is available.
1241  * - LE_BAD_PARAMETER bad eCall reference.
1242  * - LE_FAULT for other failures.
1243  *
1244  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1245  * function will not return.
1246  */
1247 //--------------------------------------------------------------------------------------------------
1249 (
1250  le_ecall_CallRef_t ecallRef,
1251  ///< [IN] eCall reference
1252  uint8_t* msdPtr,
1253  ///< [OUT] the encoded MSD
1254  size_t* msdSizePtr
1255  ///< [INOUT]
1256 );
1257 
1258 //--------------------------------------------------------------------------------------------------
1259 /**
1260  * Send the MSD.
1261  *
1262  * @return
1263  * - LE_OK on success
1264  * - LE_BAD_PARAMETER bad eCall reference
1265  * - LE_FAULT for other failures
1266  * - LE_UNSUPPORTED Not supported on this platform
1267  *
1268  * @note On failure, the process exits, so you don't have to worry about checking the returned
1269  * reference for validity.
1270  */
1271 //--------------------------------------------------------------------------------------------------
1273 (
1274  le_ecall_CallRef_t ecallRef
1275  ///< [IN] eCall reference
1276 );
1277 
1278 //--------------------------------------------------------------------------------------------------
1279 /**
1280  * Start an automatic eCall session
1281  *
1282  * @return
1283  * - LE_OK on success
1284  * - LE_BUSY an eCall session is already in progress
1285  * - LE_BAD_PARAMETER bad eCall reference
1286  * - LE_FAULT for other failures
1287  * - LE_UNSUPPORTED Not supported on this platform
1288  *
1289  * @note The process exits, if an invalid eCall reference is given
1290  */
1291 //--------------------------------------------------------------------------------------------------
1293 (
1294  le_ecall_CallRef_t ecallRef
1295  ///< [IN] eCall reference
1296 );
1297 
1298 //--------------------------------------------------------------------------------------------------
1299 /**
1300  * Start a manual eCall session
1301  *
1302  * @return
1303  * - LE_OK on success
1304  * - LE_BUSY an eCall session is already in progress
1305  * - LE_BAD_PARAMETER bad eCall reference
1306  * - LE_FAULT for other failures
1307  * - LE_UNSUPPORTED Not supported on this platform
1308  *
1309  * @note The process exits, if an invalid eCall reference is given
1310  */
1311 //--------------------------------------------------------------------------------------------------
1313 (
1314  le_ecall_CallRef_t ecallRef
1315  ///< [IN] eCall reference
1316 );
1317 
1318 //--------------------------------------------------------------------------------------------------
1319 /**
1320  * Start a test eCall session
1321  *
1322  * @return
1323  * - LE_OK on success
1324  * - LE_BUSY an eCall session is already in progress
1325  * - LE_BAD_PARAMETER bad eCall reference
1326  * - LE_FAULT for other failures
1327  * - LE_UNSUPPORTED Not supported on this platform
1328  *
1329  * @note The process exits, if an invalid eCall reference is given
1330  */
1331 //--------------------------------------------------------------------------------------------------
1333 (
1334  le_ecall_CallRef_t ecallRef
1335  ///< [IN] eCall reference
1336 );
1337 
1338 //--------------------------------------------------------------------------------------------------
1339 /**
1340  * End the current eCall session
1341  *
1342  * @note
1343  * - During an automatic eCall session, it is not possible to end the ongoing session until
1344  * LE_ECALL_STATE_STOPPED event is notified.
1345  * - For manual session, it is possible to end the ongoing session if the eCall is not connected
1346  * (LE_ECALL_STATE_CONNECTED not yet received) and after LE_ECALL_STATE_STOPPED event is notified.
1347  * - Using this API doesn't affect the NAD deregistration mechanism. However, it disables the call
1348  * auto answer function if already running.
1349  *
1350  * @return
1351  * - LE_OK on success
1352  * - LE_BAD_PARAMETER bad eCall reference
1353  * - LE_FAULT for other failures
1354  * - LE_UNSUPPORTED Not supported on this platform
1355  */
1356 //--------------------------------------------------------------------------------------------------
1358 (
1359  le_ecall_CallRef_t ecallRef
1360  ///< [IN] eCall reference
1361 );
1362 
1363 //--------------------------------------------------------------------------------------------------
1364 /**
1365  * Get the current state for the given eCall
1366  *
1367  * @return
1368  * - The current state for the given eCall
1369  *
1370  * @note The process exits, if an invalid eCall reference is given
1371  */
1372 //--------------------------------------------------------------------------------------------------
1373 le_ecall_State_t le_ecall_GetState
1374 (
1375  le_ecall_CallRef_t ecallRef
1376  ///< [IN] eCall reference
1377 );
1378 
1379 //--------------------------------------------------------------------------------------------------
1380 /**
1381  * Set the Public Safely Answering Point telephone number.
1382  *
1383  * @note That PSAP number is not applied to Manually or Automatically initiated eCall. For those
1384  * modes, an emergency call is launched.
1385  *
1386  * @warning This function doesn't modify the U/SIM content.
1387  *
1388  * @return
1389  * - LE_OK On success
1390  * - LE_FAULT For other failures
1391  * - LE_UNSUPPORTED Not supported on this platform
1392  *
1393  * @note If PSAP number is empty or too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it is a
1394  * fatal error, the function will not return.
1395  */
1396 //--------------------------------------------------------------------------------------------------
1398 (
1399  const char* LE_NONNULL psap
1400  ///< [IN] Public Safely Answering Point number
1401 );
1402 
1403 //--------------------------------------------------------------------------------------------------
1404 /**
1405  * Get the Public Safely Answering Point telephone number set with le_ecall_SetPsapNumber()
1406  * function.
1407  *
1408  * @note That PSAP number is not applied to Manually or Automatically initiated eCall. For those
1409  * modes, an emergency call is launched.
1410  *
1411  * @warning This function doesn't read the U/SIM content.
1412  *
1413  * @return
1414  * - LE_OK On success
1415  * - LE_FAULT On failures or if le_ecall_SetPsapNumber() has never been called before
1416  * * - LE_OVERFLOW Retrieved PSAP number is too long for the out parameter
1417  * - LE_UNSUPPORTED Not supported on this platform
1418  *
1419  * @note If the passed PSAP pointer is NULL, a fatal error is raised and the function will not
1420  * return.
1421  */
1422 //--------------------------------------------------------------------------------------------------
1424 (
1425  char* psap,
1426  ///< [OUT] Public Safely Answering Point telephone
1427  ///< number
1428  size_t psapSize
1429  ///< [IN]
1430 );
1431 
1432 //--------------------------------------------------------------------------------------------------
1433 /**
1434  * When modem is in ECALL_FORCED_PERSISTENT_ONLY_MODE or ECALL_ONLY_MODE, this function
1435  * can be called to request the modem to read the number to dial from the FDN/SDN of the U/SIM.
1436  *
1437  * @note If FDN directory is updated with new dial numbers, be sure that the SIM card is refreshed.
1438  *
1439  * @return
1440  * - LE_OK on success
1441  * - LE_FAULT for other failures
1442  */
1443 //--------------------------------------------------------------------------------------------------
1445 (
1446  void
1447 );
1448 
1449 //--------------------------------------------------------------------------------------------------
1450 /**
1451  * Set the NAD (network access device) deregistration time value. After termination of an emergency
1452  * call the in-vehicle system remains registered on the network for the period of time, defined by
1453  * the installation parameter NAD (network access device) deregistration time.
1454  *
1455  * @return
1456  * - LE_OK on success
1457  * - LE_FAULT on failure
1458  *
1459  * @note The formula to calculate NAD deregistration time for PAN_EUROPEAN is as below:
1460  * ECallConfiguration.nad_deregistration_time = (deregTime+59)/60;
1461  */
1462 //--------------------------------------------------------------------------------------------------
1464 (
1465  uint16_t deregTime
1466  ///< [IN] the NAD (network access device) deregistration time value (in minutes).
1467 );
1468 
1469 //--------------------------------------------------------------------------------------------------
1470 /**
1471  * Get the NAD (network access device) deregistration time value.
1472  *
1473  * @return
1474  * - LE_OK on success
1475  * - LE_FAULT on failure
1476  */
1477 //--------------------------------------------------------------------------------------------------
1479 (
1480  uint16_t* deregTimePtr
1481  ///< [OUT] the NAD (network access device) deregistration time value
1482 );
1483 
1484 //--------------------------------------------------------------------------------------------------
1485 /**
1486  * Set the minimum interval value between dial attempts.
1487  *
1488  * @return
1489  * - LE_OK on success
1490  * - LE_FAULT for other failures
1491  */
1492 //--------------------------------------------------------------------------------------------------
1494 (
1495  uint16_t pause
1496  ///< [IN] the minimum interval value in seconds
1497 );
1498 
1499 //--------------------------------------------------------------------------------------------------
1500 /**
1501  * Get the minimum interval value between dial attempts.
1502  *
1503  * @return
1504  * - LE_OK on success
1505  * - LE_FAULT for other failures
1506  */
1507 //--------------------------------------------------------------------------------------------------
1509 (
1510  uint16_t* pausePtr
1511  ///< [OUT] the minimum interval value in seconds
1512 );
1513 
1514 //--------------------------------------------------------------------------------------------------
1515 /**
1516  * Set the ECALL_MANUAL_DIAL_ATTEMPTS value. If a dial attempt under manual emergency call
1517  * initiation failed, it should be repeated maximally ECALL_MANUAL_DIAL_ATTEMPTS-1 times within
1518  * the maximal time limit of ECALL_DIAL_DURATION. The default value is 10.
1519  * Redial attempts stop once the call has been cleared down correctly, or if counter/timer reached
1520  * their limits.
1521  *
1522  * @return
1523  * - LE_OK on success
1524  * - LE_FAULT on failure
1525  */
1526 //--------------------------------------------------------------------------------------------------
1528 (
1529  uint16_t attempts
1530  ///< [IN] the ECALL_MANUAL_DIAL_ATTEMPTS value
1531 );
1532 
1533 //--------------------------------------------------------------------------------------------------
1534 /**
1535  * Set the ECALL_AUTO_DIAL_ATTEMPTS value. If a dial attempt under automatic emergency call
1536  * initiation failed, it should be repeated maximally ECALL_AUTO_DIAL_ATTEMPTS-1 times within
1537  * the maximal time limit of ECALL_DIAL_DURATION. The default value is 10.
1538  * Redial attempts stop once the call has been cleared down correctly, or if counter/timer reached
1539  * their limits.
1540  *
1541  * @return
1542  * - LE_OK on success
1543  * - LE_FAULT on failure
1544  */
1545 //--------------------------------------------------------------------------------------------------
1547 (
1548  uint16_t attempts
1549  ///< [IN] the ECALL_AUTO_DIAL_ATTEMPTS value
1550 );
1551 
1552 //--------------------------------------------------------------------------------------------------
1553 /**
1554  * Set the ECALL_DIAL_DURATION time. It's the maximum time the IVS have to connect the emergency
1555  * call to the PSAP, including all redial attempts.
1556  * If the call is not connected within this time (or ManualDialAttempts/AutoDialAttempts dial
1557  * attempts), it will stop.
1558  *
1559  * @return
1560  * - LE_OK on success
1561  * - LE_FAULT on failure
1562  * - LE_UNSUPPORTED if the function is not supported by the target
1563  */
1564 //--------------------------------------------------------------------------------------------------
1566 (
1567  uint16_t duration
1568  ///< [IN] the ECALL_DIAL_DURATION time value (in seconds)
1569 );
1570 
1571 //--------------------------------------------------------------------------------------------------
1572 /**
1573  * Set the ECALL_CCFT time. It's the maximum delay before initiating an an automatic call
1574  * termination.
1575  * When the delay is reached and IVS NAD didn't receive a call clear-down indication then the call
1576  * is immediatly terminated.
1577  *
1578  * @note Allowed range of values is 1 to 720 minutes.
1579  *
1580  * @return
1581  * - LE_OK on success
1582  * - LE_FAULT on failure
1583  * - LE_UNSUPPORTED if the function is not supported by the target
1584  */
1585 //--------------------------------------------------------------------------------------------------
1587 (
1588  uint16_t duration
1589  ///< [IN] the ECALL_CCFT time value (in minutes)
1590 );
1591 
1592 //--------------------------------------------------------------------------------------------------
1593 /**
1594  * Set the ECALL_AUTO_ANSWER_TIME time, the time interval wherein IVDS responds to incoming calls
1595  * automatically after emergency call completion.
1596  *
1597  * @note Default value of auto answer time is 20 minutes. Maximum value is 720 minutes.
1598  *
1599  * @return
1600  * - LE_OK on success
1601  * - LE_FAULT on failure
1602  * - LE_UNSUPPORTED if the function is not supported by the target
1603  */
1604 //--------------------------------------------------------------------------------------------------
1606 (
1607  uint16_t autoAnswerTime
1608  ///< [IN] The ECALL_AUTO_ANSWER_TIME time value (in minutes)
1609 );
1610 
1611 //--------------------------------------------------------------------------------------------------
1612 /**
1613  * Set the ECALL_MSD_MAX_TRANSMISSION_TIME time, the time period for MSD transmission.
1614  *
1615  * @note Default value of MSD transmission time is 20 seconds.
1616  *
1617  * @return
1618  * - LE_OK on success
1619  * - LE_FAULT on failure
1620  * - LE_UNSUPPORTED if the function is not supported by the target
1621  */
1622 //--------------------------------------------------------------------------------------------------
1624 (
1625  uint16_t msdMaxTransTime
1626  ///< [IN] The ECALL_MSD_MAX_TRANSMISSION_TIME time value (in seconds)
1627 );
1628 
1629 //--------------------------------------------------------------------------------------------------
1630 /**
1631  * Set the ERA-GLONASS ECALL_POST_TEST_REGISTRATION_TIME time.
1632  *
1633  * After completion of transmission of test diagnostics results in an eCall test session, the
1634  * in-vehicle system remains registered on the network for the period of time defined by the
1635  * ECALL_POST_TEST_REGISTRATION_TIME value.
1636  *
1637  * @note The ECALL_POST_TEST_REGISTRATION_TIME setting takes effect immediately and is persistent to
1638  * reset.
1639  *
1640  * @note An ECALL_POST_TEST_REGISTRATION_TIME value of zero means the IVS doesn't remain registered
1641  * after completion of transmission of test (diagnostics) results.
1642  *
1643  * @return
1644  * - LE_OK on success
1645  * - LE_FAULT on failure
1646  * - LE_UNSUPPORTED if the function is not supported by the target
1647  */
1648 //--------------------------------------------------------------------------------------------------
1650 (
1651  uint16_t postTestRegTime
1652  ///< [IN] The ECALL_POST_TEST_REGISTRATION_TIME time value (in seconds)
1653 );
1654 
1655 //--------------------------------------------------------------------------------------------------
1656 /**
1657  * Get the ECALL_MANUAL_DIAL_ATTEMPTS value.
1658  *
1659  * @return
1660  * - LE_OK on success
1661  * - LE_FAULT on failure
1662  */
1663 //--------------------------------------------------------------------------------------------------
1665 (
1666  uint16_t* attemptsPtr
1667  ///< [OUT] the ECALL_MANUAL_DIAL_ATTEMPTS value
1668 );
1669 
1670 //--------------------------------------------------------------------------------------------------
1671 /**
1672  * Get the ECALL_AUTO_DIAL_ATTEMPTS value.
1673  *
1674  * @return
1675  * - LE_OK on success
1676  * - LE_FAULT on failure
1677  */
1678 //--------------------------------------------------------------------------------------------------
1680 (
1681  uint16_t* attemptsPtr
1682  ///< [OUT] the ECALL_AUTO_DIAL_ATTEMPTS value
1683 );
1684 
1685 //--------------------------------------------------------------------------------------------------
1686 /**
1687  * Get the ECALL_DIAL_DURATION time.
1688  *
1689  * @return
1690  * - LE_OK on success
1691  * - LE_FAULT on failure
1692  */
1693 //--------------------------------------------------------------------------------------------------
1695 (
1696  uint16_t* durationPtr
1697  ///< [OUT] the ECALL_DIAL_DURATION time value (in seconds)
1698 );
1699 
1700 //--------------------------------------------------------------------------------------------------
1701 /**
1702  * Get the ECALL_CCFT time.
1703  *
1704  * @return
1705  * - LE_OK on success
1706  * - LE_FAULT on failure
1707  */
1708 //--------------------------------------------------------------------------------------------------
1710 (
1711  uint16_t* durationPtr
1712  ///< [OUT] the ECALL_CCFT time value (in minutes)
1713 );
1714 
1715 //--------------------------------------------------------------------------------------------------
1716 /**
1717  * Get the ECALL_AUTO_ANSWER_TIME time.
1718  *
1719  * @return
1720  * - LE_OK on success
1721  * - LE_FAULT on execution failure
1722  */
1723 //--------------------------------------------------------------------------------------------------
1725 (
1726  uint16_t* autoAnswerTimePtr
1727  ///< [OUT] The ECALL_AUTO_ANSWER_TIME time value (in minutes)
1728 );
1729 
1730 //--------------------------------------------------------------------------------------------------
1731 /**
1732  * Get the ECALL_MSD_MAX_TRANSMISSION_TIME time.
1733  *
1734  * @return
1735  * - LE_OK on success
1736  * - LE_FAULT on failure
1737  * - LE_UNSUPPORTED if the function is not supported by the target
1738  */
1739 //--------------------------------------------------------------------------------------------------
1741 (
1742  uint16_t* msdMaxTransTimePtr
1743  ///< [OUT] The ECALL_MSD_MAX_TRANSMISSION_TIME time value (in seconds)
1744 );
1745 
1746 //--------------------------------------------------------------------------------------------------
1747 /**
1748  * Get the ERA-GLONASS ECALL_POST_TEST_REGISTRATION_TIME time.
1749  *
1750  * @return
1751  * - LE_OK on success
1752  * - LE_FAULT on failure
1753  * - LE_UNSUPPORTED if the function is not supported by the target
1754  */
1755 //--------------------------------------------------------------------------------------------------
1757 (
1758  uint16_t* postTestRegTimePtr
1759  ///< [OUT] The ECALL_POST_TEST_REGISTRATION_TIME time value (in
1760  ///< seconds).
1761 );
1762 
1763 //--------------------------------------------------------------------------------------------------
1764 /**
1765  * Set the ERA-GLONASS crash severity parameter.
1766  *
1767  * @return
1768  * - LE_OK on success
1769  * - LE_DUPLICATE an MSD has been already imported
1770  * - LE_BAD_PARAMETER bad eCall reference
1771  * - LE_FAULT on other failures
1772  */
1773 //--------------------------------------------------------------------------------------------------
1775 (
1776  le_ecall_CallRef_t ecallRef,
1777  ///< [IN] eCall reference
1778  uint32_t crashSeverity
1779  ///< [IN] the ERA-GLONASS crash severity parameter
1780 );
1781 
1782 //--------------------------------------------------------------------------------------------------
1783 /**
1784  * Reset the ERA-GLONASS crash severity parameter. Therefore that optional parameter is not included
1785  * in the MSD message.
1786  *
1787  * @return
1788  * - LE_OK on success
1789  * - LE_DUPLICATE an MSD has been already imported
1790  * - LE_BAD_PARAMETER bad eCall reference
1791  * - LE_FAULT on other failures
1792  */
1793 //--------------------------------------------------------------------------------------------------
1795 (
1796  le_ecall_CallRef_t ecallRef
1797  ///< [IN] eCall reference
1798 );
1799 
1800 //--------------------------------------------------------------------------------------------------
1801 /**
1802  * Set the ERA-GLONASS diagnostic result using a bit mask.
1803  *
1804  * @return
1805  * - LE_OK on success
1806  * - LE_DUPLICATE an MSD has been already imported
1807  * - LE_BAD_PARAMETER bad eCall reference
1808  * - LE_FAULT on other failures
1809  */
1810 //--------------------------------------------------------------------------------------------------
1812 (
1813  le_ecall_CallRef_t ecallRef,
1814  ///< [IN] eCall reference
1815  le_ecall_DiagnosticResultBitMask_t diagnosticResultMask
1816  ///< [IN] ERA-GLONASS diagnostic result bit mask.
1817 );
1818 
1819 //--------------------------------------------------------------------------------------------------
1820 /**
1821  * Reset the ERA-GLONASS diagnostic result bit mask. Optional parameter is not
1822  * included in the MSD message.
1823  *
1824  * @return
1825  * - LE_OK on success
1826  * - LE_DUPLICATE an MSD has been already imported
1827  * - LE_BAD_PARAMETER bad eCall reference
1828  * - LE_FAULT on other failures
1829  */
1830 //--------------------------------------------------------------------------------------------------
1832 (
1833  le_ecall_CallRef_t ecallRef
1834  ///< [IN] eCall reference
1835 );
1836 
1837 //--------------------------------------------------------------------------------------------------
1838 /**
1839  * Set the ERA-GLONASS crash type bit mask
1840  *
1841  * @return
1842  * - LE_OK on success
1843  * - LE_DUPLICATE an MSD has been already imported
1844  * - LE_BAD_PARAMETER bad eCall reference
1845  * - LE_FAULT on other failures
1846  */
1847 //--------------------------------------------------------------------------------------------------
1849 (
1850  le_ecall_CallRef_t ecallRef,
1851  ///< [IN] eCall reference
1852  le_ecall_CrashInfoBitMask_t crashInfoMask
1853  ///< [IN] ERA-GLONASS crash type bit mask.
1854 );
1855 
1856 //--------------------------------------------------------------------------------------------------
1857 /**
1858  * Reset the ERA-GLONASS crash type bit mask. Optional parameter is not included
1859  * in the MSD message.
1860  *
1861  * @return
1862  * - LE_OK on success
1863  * - LE_DUPLICATE an MSD has been already imported
1864  * - LE_BAD_PARAMETER bad eCall reference
1865  * - LE_FAULT on other failures
1866  */
1867 //--------------------------------------------------------------------------------------------------
1869 (
1870  le_ecall_CallRef_t ecallRef
1871  ///< [IN] eCall reference
1872 );
1873 
1874 //--------------------------------------------------------------------------------------------------
1875 /**
1876  * Set the ERA-GLONASS coordinate system type.
1877  *
1878  * @return
1879  * - LE_OK on success
1880  * - LE_DUPLICATE an MSD has been already imported
1881  * - LE_BAD_PARAMETER bad eCall reference
1882  * - LE_FAULT on other failures
1883  */
1884 //--------------------------------------------------------------------------------------------------
1886 (
1887  le_ecall_CallRef_t ecallRef,
1888  ///< [IN] eCall reference
1889  le_ecall_MsdCoordinateType_t coordinateSystemType
1890  ///< [IN] the ERA-GLONASS coordinate system type
1891 );
1892 
1893 //--------------------------------------------------------------------------------------------------
1894 /**
1895  * Reset the ERA-GLONASS coordinate system type. Therefore that optional parameter is not included
1896  * in the MSD message.
1897  *
1898  * @return
1899  * - LE_OK on success
1900  * - LE_DUPLICATE an MSD has been already imported
1901  * - LE_BAD_PARAMETER bad eCall reference
1902  * - LE_FAULT on other failures
1903  */
1904 //--------------------------------------------------------------------------------------------------
1906 (
1907  le_ecall_CallRef_t ecallRef
1908  ///< [IN] eCall reference
1909 );
1910 
1911 //--------------------------------------------------------------------------------------------------
1912 /**
1913  * Called to get the termination reason.
1914  *
1915  * @return The termination reason.
1916  *
1917  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1918  * function will not return.
1919  */
1920 //--------------------------------------------------------------------------------------------------
1921 le_mcc_TerminationReason_t le_ecall_GetTerminationReason
1922 (
1923  le_ecall_CallRef_t ecallRef
1924  ///< [IN] eCall reference.
1925 );
1926 
1927 //--------------------------------------------------------------------------------------------------
1928 /**
1929  * Called to get the platform specific termination code.
1930  *
1931  * @return The platform specific termination code.
1932  *
1933  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1934  * function will not return.
1935  */
1936 //--------------------------------------------------------------------------------------------------
1938 (
1939  le_ecall_CallRef_t ecallRef
1940  ///< [IN] eCall reference.
1941 );
1942 
1943 //--------------------------------------------------------------------------------------------------
1944 /**
1945  * Terminate NAD registered on the network. After termination of an emergency call the in-vehicle
1946  * system remains registered on the network for a period of time, this API will deregister device
1947  * from network in this period.
1948  *
1949  * @return
1950  * - LE_OK on success
1951  * - LE_FAULT on failure
1952  * - LE_UNSUPPORTED if the function is not supported by the target
1953  */
1954 //--------------------------------------------------------------------------------------------------
1956 (
1957  void
1958 );
1959 
1960 #endif // LE_ECALL_INTERFACE_H_INCLUDE_GUARD
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
Definition: le_basics.h:45
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_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:601
#define LE_FULL_API
Definition: le_apiFeatures.h:40
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_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_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)