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