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