le_ecall_interface.h

Go to the documentation of this file.
1 /*
2  * ====================== WARNING ======================
3  *
4  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
5  * DO NOT MODIFY IN ANY WAY.
6  *
7  * ====================== WARNING ======================
8  */
9 
10 /**
11  * @page c_ecall eCall
12  *
13  * @ref le_ecall_interface.h "API Reference" <br>
14  * @ref howToEcall <br>
15  * @ref sampleApps_eCall sample app <br>
16  * @ref le_ecall_samples <br>
17  *
18  * <HR>
19  *
20  * eCall is a technology initiative intended to bring rapid assistance to auto
21  * accidents anywhere in the European Union. When a serious vehicle accident occurs,
22  * sensors automatically trigger an eCall. When activated, the in-vehicle system (IVS)
23  * establishes a 112-voice connection.
24  *
25  * The Mobile Network Operator handles the eCall like any other 112 call and routes the call to the
26  * most appropriate emergency response centre - Public Safety Answering Point (PSAP).
27  *
28  * At the same time, a digital "minimum set of data" (MSD) message is sent over the voice call using
29  * in-band modem signals. The MSD includes accident information like time, location, driving
30  * direction, and vehicle description.
31  *
32  * The eCall can also be activated manually. The mobile network operator identifies that the 112
33  * call is an eCall from the “eCall flag” inserted by the vehicle’s communication module.
34  *
35  * This API applies for both PAN-EUROPEAN and ERA-GLONASS standards.
36  *
37  * @note eCall service is only available on automotive products.
38  *
39  * @section le_ecall_binding IPC interfaces binding
40  *
41  * All the functions of this API are provided by the @b modemService service.
42  *
43  * Here's a code sample binding to modem services:
44  * @verbatim
45  bindings:
46  {
47  clientExe.clientComponent.le_ecall -> modemService.le_ecall
48  }
49  @endverbatim
50  *
51  * @section le_ecall_operation Operation modes
52  *
53  * The modem can be configured to operate in three different operation modes:
54  * - le_ecall_ForceOnlyMode(): this function configures the eCall operation mode to eCall only, only
55  * emergency number can be used to start an eCall session. The modem doesn't try to register on
56  * the Cellular network. This function forces the modem to behave as eCall only mode whatever
57  * U/SIM operation mode. The change doesn't persist over power cycles.
58  * This function can be called before making an eCall.
59  *
60  * - le_ecall_ForcePersistentOnlyMode(): Same as le_ecall_ForceOnlyMode(), but the change persists
61  * over power cycles.
62  *
63  * - le_ecall_ExitOnlyMode(): this function exits from eCall Only mode. It configures the eCall
64  * operation mode to Normal mode, the modem uses the default operation mode at power up (or after
65  * U/SIM hotswap). The modem behaves following the U/SIM eCall operation mode; for example the
66  * U/SIM can be configured only for eCall, or a combination of eCall and commercial service
67  * provision.
68  *
69  * - le_ecall_GetConfiguredOperationMode(): this function allows the user to retrieve the configured
70  * Operation mode.
71  * The configured operation mode can be:
72  * - @c LE_ECALL_NORMAL_MODE : normal mode. The modem behaves following the U/SIM eCall operation
73  * mode.
74  * - @c LE_ECALL_ONLY_MODE : eCall only mode according to U/SIM operation mode or forced by
75  * application through the le_ecall_ForceOnlyMode() function.
76  * - @c LE_ECALL_FORCED_PERSISTENT_ONLY_MODE : persistent eCall only mode.
77  *
78  * @section le_ecall_session eCall Session
79  *
80  * Start an eCall session by creating an eCall object that calls
81  * le_ecall_Create(). Stop an eCall session with le_ecall_End().
82  *
83  * The type of eCall and the kind of activation are specified using different functions to start the
84  * eCall session:
85  * - le_ecall_StartManual(): initiate a manual eCall session (triggered by a passenger)
86  * - le_ecall_StartAutomatic(): initiate an automatic eCall session (automatically triggered by
87  * the IVS in case of accident)
88  * - le_ecall_StartTest(): initiate a test eCall session (to test the communication between the
89  * IVS and the PSAP)
90  *
91  * @warning An application must wait for @c LE_ECALL_STATE_DISCONNECTED event before calling again
92  * the @c le_ecall_StartXxx() functions.
93  *
94  * When the eCall object is no longer needed, call le_ecall_Delete() to free all allocated
95  * resources associated with the object.
96  *
97  * The current state of an eCall session can be queried using le_ecall_GetState().
98  * Alternatively, an application can register a handler be notified when the session state
99  * changes. The handler can be managed using le_ecall_AddStateChangeHandler() and
100  * le_ecall_RemoveStateChangeHandler().
101  *
102  * An application can call le_ecall_GetTerminationReason() to know the reason of the call
103  * termination when call state is LE_ECALL_STATE_DISCONNECTED, and also
104  * le_ecall_GetPlatformSpecificTerminationCode() to get platform specific termination code (refer
105  * to your platform documentation for further details).
106  *
107  * @section le_ecall_msd Minimum Set of Data (MSD)
108  *
109  * The dynamic values of the MSD can be set with:
110  * - le_ecall_SetMsdPosition() sets the position of the vehicle.
111  * - le_ecall_SetMsdPositionN1() sets the first delta position of the vehicle.
112  * - le_ecall_SetMsdPositionN2() sets the second delta position of the vehicle.
113  * - le_ecall_SetMsdPassengersCount() sets the number of passengers.
114  *
115  * The MSD is automatically encoded with the dynamic values and the static values retrieved from
116  * the configuration tree each time those functions are called.
117  *
118  * @warning Those functions return a LE_DUPLICATE error when the MSD has been already imported with
119  * le_ecall_ImportMsd() function.
120  *
121  * The MSD transmission mode can be set or get with:
122  * - le_ecall_SetMsdTxMode()
123  * - le_ecall_GetMsdTxMode()
124  *
125  * The transmission mode can be:
126  * - @c LE_ECALL_TX_MODE_PUSH : the MSD is pushed by the IVS
127  * - @c LE_ECALL_TX_MODE_PULL : the MSD is sent when requested by the PSAP
128  *
129  * It's possible to import a prepared MSD using the le_ecall_ImportMsd() function.
130  * The prepared MSD must answer the requirements described in the "EN 15722:2013" publication (this
131  * publication has been prepared by Technical Committee CEN/TC 278 “Intelligent Transport Systems").
132  *
133  * @warning The imported MSD doesn't take into account the values provided by the
134  * le_ecall_SetMsdXxx() functions and the configuration tree. It overwrites any previous imported
135  * MSD or encoded MSD.
136  *
137  * @warning The imported MSD overwrites the control flags (automaticActivation and testCall) set by
138  * le_ecall_StartXxx() functions (Manual, Automatic, Test). The User App is in charge of their
139  * correct settings.
140  *
141  * The encoded MSD can be retrieved with le_ecall_ExportMsd() function.
142  *
143  * @note The User app must perform the MSD transmission by calling le_ecall_SendMsd() when the
144  * LE_ECALL_STATE_PSAP_START_IND_RECEIVED event is received.
145  * The MSD can be updated before calling le_ecall_SendMsd(), using the e_ecall_ImportMsd() function
146  * or the le_ecall_SetMsdXxx() functions.
147  *
148  * @section le_ecall_concurrency Concurrency
149  *
150  * If another application tries to use the eCall service while a session is already in progress, the
151  * le_ecall_StartManual(), le_ecall_StartAutomatic(), le_ecall_StartTest() functions will return a
152  * LE_BUSY error. The eCall session in progress won't be interrupted or disturbed. The application
153  * can follow the session progress with 'state' functions like le_ecall_GetState() and
154  * le_ecall_AddStateChangeHandler().
155  * A manual eCall can't interrupt an automatic eCall, and an automatic eCall can't interrupt a
156  * manual eCall.
157  *
158  * @section le_ecall_eraglonass ERA-GLONASS compliancy
159  *
160  * To perform an emergency call following the ERA-GLONASS requirements, the 'systemStandard' entry
161  * of the configuration database must be set to 'ERA-GLONASS'.
162  *
163  * Moreover, the User can set some specific configuration settings in accordance with the PSAP
164  * configuration:
165  *
166  * - le_ecall_SetEraGlonassManualDialAttempts(): set the MANUAL_DIAL_ATTEMPTS value. If a dial
167  * attempt under manual emergency call initiation failed, it should be repeated maximally
168  * ECALL_MANUAL_DIAL_ATTEMPTS-1 times within the maximal time limit of ECALL_DIAL_DURATION.
169  * The default value is 10.
170  * Redial attempts stop once the call has been cleared down correctly, or if counter / timer
171  * reached their limits.
172  * Available for both manual and test modes.
173  * - le_ecall_SetEraGlonassAutoDialAttempts(): set the AUTO_DIAL_ATTEMPTS value. If a dial attempt
174  * under automatic emergency call initiation failed, it should be repeated maximally
175  * ECALL_AUTO_DIAL_ATTEMPTS-1 times within the maximal time limit of ECALL_DIAL_DURATION.
176  * The default value is 10.
177  * Redial attempts stop once the call has been cleared down correctly, or if counter / timer
178  * reached their limits.
179  * - le_ecall_SetEraGlonassDialDuration(): set the ECALL_DIAL_DURATION time. It is the maximum time
180  * the IVS have to connect the emergency call to the PSAP, including all redial attempts.
181  * If the call is not connected within this time (or ManualDialAttempts/AutoDialAttempts dial
182  * attempts), it will stop.
183  *
184  * The corresponding getter functions let you retrieve the configuration settings values:
185  *
186  * - le_ecall_GetEraGlonassManualDialAttempts(): get the MANUAL_DIAL_ATTEMPTS value.
187  * - le_ecall_GetEraGlonassAutoDialAttempts(): get the AUTO_DIAL_ATTEMPTS value.
188  * - le_ecall_GetEraGlonassDialDuration(): get the ECALL_DIAL_DURATION time.
189  *
190  * @section le_ecall_eraGlonassData ERA-GLONASS MSD additional data
191  *
192  * ERA-GLONASS additional data are optional and provided in the MSD message if any.
193  * They are located in MSD data block number 12 as optional additional data.
194  *
195  * ERA-GLONASS MSD additional data describes:
196  * - The crash severity (Accident Severity Index - ASI15)
197  * - The diagnostic result
198  * - The crash information
199  *
200  * ERA-GLONASS MSD additional data can be specified through the following functions:
201  * - le_ecall_SetMsdEraGlonassCrashSeverity().
202  * - le_ecall_ResetMsdEraGlonassCrashSeverity().
203  * - le_ecall_SetMsdEraGlonassDiagnosticResult().
204  * - le_ecall_ResetMsdEraGlonassDiagnosticResult().
205  * - le_ecall_SetMsdEraGlonassCrashInfo().
206  * - le_ecall_ResetMsdEraGlonassCrashInfo().
207  *
208  * ERA-GLONASS additional data is encoded using the OID version "1.4.1".
209  * This was assigned to ERA-GLONASS optional additional data by CEN. Content of data
210  * block in the AdditionalData should be:
211  *
212  * @code
213  *
214  * ERAOADASN1Module
215  * DEFINITIONS
216  * AUTOMATIC TAGS ::=
217  * BEGIN
218  * ERADataFormatId::= INTEGER (1)
219  *
220  * ERAAdditionalData ::= SEQUENCE {
221  * crashSeverity INTEGER(0..2047) OPTIONAL,
222  * diagnosticResult DiagnosticResult OPTIONAL,
223  * crashInfo CrashInfo OPTIONAL,
224  * ...
225  * }
226  *
227  * DiagnosticResult ::= SEQUENCE {
228  * micConnectionFailure BOOLEAN OPTIONAL,
229  * micFailure BOOLEAN OPTIONAL,
230  * rightSpeakerFailure BOOLEAN OPTIONAL,
231  * leftSpeakerFailure BOOLEAN OPTIONAL,
232  * speakersFailure BOOLEAN OPTIONAL,
233  * ignitionLineFailure BOOLEAN OPTIONAL,
234  * uimFailure BOOLEAN OPTIONAL,
235  * statusIndicatorFailure BOOLEAN OPTIONAL,
236  * batteryFailure BOOLEAN OPTIONAL,
237  * batteryVoltageLow BOOLEAN OPTIONAL,
238  * crashSensorFailure BOOLEAN OPTIONAL,
239  * firmwareImageCorruption BOOLEAN OPTIONAL,
240  * commModuleInterfaceFailure BOOLEAN OPTIONAL,
241  * gnssReceiverFailure BOOLEAN OPTIONAL,
242  * raimProblem BOOLEAN OPTIONAL,
243  * gnssAntennaFailure BOOLEAN OPTIONAL,
244  * commModuleFailure BOOLEAN OPTIONAL,
245  * eventsMemoryOverflow BOOLEAN OPTIONAL,
246  * crashProfileMemoryOverflow BOOLEAN OPTIONAL,
247  * otherCriticalFailires BOOLEAN OPTIONAL,
248  * otherNotCriticalFailures BOOLEAN OPTIONAL
249  * }
250  *
251  * CrashInfo ::= SEQUENCE {
252  * crashFront BOOLEAN OPTIONAL,
253  * crashLeft BOOLEAN OPTIONAL,
254  * crashRight BOOLEAN OPTIONAL,
255  * crashRear BOOLEAN OPTIONAL,
256  * crashRollover BOOLEAN OPTIONAL,
257  * crashSide BOOLEAN OPTIONAL,
258  * crashFrontOrSide BOOLEAN OPTIONAL,
259  * crashAnotherType BOOLEAN OPTIONAL
260  * }
261  * END
262  * @endcode
263  *
264  * @section le_ecall_redial Redial management
265  *
266  * In the case of PAN-EUROPEAN, the redial can be performed as many times as desired but should be
267  * performed within 2 minutes. (EN 16062:2014 -7.14.3).
268  *
269  * In the case of ERA-GLONASS, the redial can be performed ECALL_MANUAL_DIAL_ATTEMPTS times within
270  * the maximal time limit of ECALL_DIAL_DURATION (GOST 54620 2013 -- Appendix A).
271  *
272  * The \b LE_ECALL_STATE_END_OF_REDIAL_PERIOD state event notifies the User of the redial period
273  * end.
274  *
275  * @section le_ecall_samples Code samples
276  *
277  * A sample code that implements an eCall test session with a local voice prompt can be found in
278  * \b eCallWPrompt.c file (please refer to @ref c_ecallWPromptSample page).
279  *
280  * A sample code that implements an eCall test session with a voice call connection can be found in
281  * \b eCallWVoice.c file (please refer to @ref c_ecallWVoiceSample page).
282  *
283  * If you want to have a look at a more in-depth usage of these APIs, please refer to the
284  * @subpage c_ecallAppMain .
285  *
286  * @section le_ecall_configuration eCall configuration
287  *
288  * By default, the number to dial is read from the FDN/SDN (Fixed Dialling Numbers/Service
289  * Dialling Numbers) of the U/SIM, depending upon the eCall operating mode.
290  *
291  * However, the PSAP telephone number can be specified and retrieved with:
292  * - le_ecall_SetPsapNumber()
293  * - le_ecall_GetPsapNumber()
294  *
295  * @note That PSAP number is not applied to Manually or Automatically initiated eCall. For those
296  * modes, an emergency call is launched.
297 
298  * @warning These two functions don't modified the U/SIM content nor read the U/SIM content.
299  *
300  * le_ecall_UseUSimNumbers() function can be recalled to indicate the modem to read the number to
301  * dial from the FDN/SDN of the U/SIM, depending upon the eCall operating mode.
302  *
303  * The NAD (Network Access Device, i.e. the Modem) deregistration time value can be set or get with:
304  * - le_ecall_SetNadDeregistrationTime()
305  * - le_ecall_GetNadDeregistrationTime()
306  *
307  * Time is set in hours where:
308  * - from 1 to 60 minutes -> 1 hour
309  * - from 61 to 120 minutes -> 2hours, etc.
310  *
311  * Example: if @c deregTime parameter unit is minutes, the effective time is:
312  * @code ECallConfiguration.nad_deregistration_time = (deregTime+59)/60; @endcode
313  *
314  * After termination of an emergency call the in-vehicle system remains registered on the network
315  * for the period of time, defined by the installation parameter 'NAD_DEREGISTRATION_TIME'.
316  *
317  * @warning Be sure to check the possible values of 'NAD_DEREGISTRATION_TIME' for your specific
318  * platform.
319  *
320  * The minimum interval value between dial attempts can be set or get with:
321  * - le_ecall_SetIntervalBetweenDialAttempts()
322  * - le_ecall_GetIntervalBetweenDialAttempts()
323  *
324  * The default value is set to 30 seconds.
325  *
326  * The time is counted from the start of the first dial attempt.
327  *
328  * If more time has expired during the dial attempt, it will wait for 1 second to allow hangup
329  * before redialing.
330  *
331  * If less time has expired during the dial attempt, it will wait for
332  * (interval - 'dial attempt duration') seconds to allow hangup before redialing.
333  *
334  * In the case the call was connected, the redial will be immediate.
335  *
336  * le_ecall_SetIntervalBetweenDialAttempts() is available for both manual and test modes.
337 
338  * @section le_ecall_configdb Configuration tree
339  * @copydoc le_ecall_configdbPage_Hide
340  *
341  * <HR>
342  *
343  * Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
344  */
345 /**
346  * @interface le_ecall_configdbPage_Hide
347  *
348  * The configuration database path for the eCall is:
349  * @verbatim
350  /
351  modemServices/
352  eCall/
353  systemStandard<string> = <eCall system>
354  msdVersion<int> = <MSD value>
355  vehicleType<string> = <vehicle type>
356  vin<string> = <VIN>
357  propulsionType/
358  0<string> = <propulsion type>
359  1<string> = <propulsion type>
360  ...
361  @endverbatim
362  *
363  * The 'systemStandard' is the kind of eCall system:
364  * - PAN-EUROPEAN
365  * - ERA-GLONASS
366  *
367  * If no value or a bad entry is filled, the default value is 'PAN-EUROPEAN'.
368  *
369  * The 'msdVersion' field is the MSD format version. If the field is not present, the default MSD
370  * version is version 1.
371  *
372  * The 'vehicleType' field can be set with the following choices (string type):
373  * - "Passenger-M1" (Passenger vehicle, Class M1)
374  * - "Bus-M2" (Buses and coaches, Class M2)
375  * - "Bus-M3" (Buses and coaches, Class M3)
376  * - "Commercial-N1" (Light commercial vehicles, Class N1)
377  * - "Heavy-N2" (Heavy duty vehicles, Class N2)
378  * - "Heavy-N3" (Heavy duty vehicles, Class N3)
379  * - "Motorcycle-L1e" (Motorcycles, Class L1e)
380  * - "Motorcycle-L2e" (Motorcycles, Class L2e)
381  * - "Motorcycle-L3e" (Motorcycles, Class L3e)
382  * - "Motorcycle-L4e" (Motorcycles, Class L4e)
383  * - "Motorcycle-L5e" (Motorcycles, Class L5e)
384  * - "Motorcycle-L6e" (Motorcycles, Class L6e)
385  * - "Motorcycle-L7e" (Motorcycles, Class L7e)
386  *
387  * The 'vin' is the vehicle identification number (string type).
388  *
389  * The 'propulsionType' field can be set with the following choices (string type):
390  * - "Gasoline" (Gasoline propulsion)
391  * - "Diesel" (Diesel propulsion)
392  * - "NaturalGas" (Compressed natural gas propulsion)
393  * - "Propane" (Liquid propane gas propulsion)
394  * - "Electric" (Electric propulsion)
395  * - "Hydrogen" (Hydrogen propulsion)
396  * - "Other" (Other type of propulsion)
397  *
398  * Several 'propulsionType' can be applied.
399  *
400  * <HR>
401  *
402  * Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
403  */
404 /**
405  * @file le_ecall_interface.h
406  *
407  * Legato @ref c_ecall include file.
408  *
409  * Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
410  */
411 /**
412  * @page c_ecallWPromptSample Sample code of an eCall test session with a local voice prompt
413  *
414  * @include "apps/test/modemServices/ecall/ecallWPrompt/eCallWPrompt/eCallWPrompt.c"
415  */
416 /**
417  * @page c_ecallWVoiceSample Sample code an eCall test session with a voice call connection
418  *
419  * @include "apps/test/modemServices/ecall/ecallWVoice/eCallWVoice/eCallWVoice.c"
420  */
421 
422 #ifndef LE_ECALL_INTERFACE_H_INCLUDE_GUARD
423 #define LE_ECALL_INTERFACE_H_INCLUDE_GUARD
424 
425 
426 #include "legato.h"
427 
428 // Interface specific includes
429 #include "le_mdmDefs_interface.h"
430 #include "le_mcc_interface.h"
431 
432 
433 //--------------------------------------------------------------------------------------------------
434 /**
435  *
436  * Connect the current client thread to the service providing this API. Block until the service is
437  * available.
438  *
439  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
440  * called before any other functions in this API. Normally, ConnectService is automatically called
441  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
442  *
443  * This function is created automatically.
444  */
445 //--------------------------------------------------------------------------------------------------
447 (
448  void
449 );
450 
451 //--------------------------------------------------------------------------------------------------
452 /**
453  *
454  * Try to connect the current client thread to the service providing this API. Return with an error
455  * if the service is not available.
456  *
457  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
458  * called before any other functions in this API. Normally, ConnectService is automatically called
459  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
460  *
461  * This function is created automatically.
462  *
463  * @return
464  * - LE_OK if the client connected successfully to the service.
465  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.
466  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
467  * - LE_COMM_ERROR if the Service Directory cannot be reached.
468  */
469 //--------------------------------------------------------------------------------------------------
471 (
472  void
473 );
474 
475 //--------------------------------------------------------------------------------------------------
476 /**
477  *
478  * Disconnect the current client thread from the service providing this API.
479  *
480  * Normally, this function doesn't need to be called. After this function is called, there's no
481  * longer a connection to the service, and the functions in this API can't be used. For details, see
482  * @ref apiFilesC_client.
483  *
484  * This function is created automatically.
485  */
486 //--------------------------------------------------------------------------------------------------
488 (
489  void
490 );
491 
492 
493 //--------------------------------------------------------------------------------------------------
494 /**
495  * Reference returned by Create function and used by other functions
496  */
497 //--------------------------------------------------------------------------------------------------
498 typedef struct le_ecall_Call* le_ecall_CallRef_t;
499 
500 
501 //--------------------------------------------------------------------------------------------------
502 /**
503  * MSD message length in bytes.
504  */
505 //--------------------------------------------------------------------------------------------------
506 #define LE_ECALL_MSD_MAX_LEN 140
507 
508 
509 //--------------------------------------------------------------------------------------------------
510 /**
511  * Configured operation modes.
512  */
513 //--------------------------------------------------------------------------------------------------
514 typedef enum
515 {
517  ///< Normal mode.
518 
520  ///< eCall only mode according to U/SIM operation mode or forced
521  ///< by application through the le_ecall_ForceOnlyMode() function.
522 
524  ///< Persistent eCall only mode.
525 }
527 
528 
529 //--------------------------------------------------------------------------------------------------
530 /**
531  * eCall session states.
532  */
533 //--------------------------------------------------------------------------------------------------
534 typedef enum
535 {
537  ///< Unknown state.
538 
540  ///< eCall session started.
541 
543  ///< Emergency call is established.
544 
546  ///< Emergency call is disconnected.
547 
549  ///< Waiting for PSAP start indication.
550 
552  ///< PSAP start indication received.
553 
555  ///< MSD transmission is started.
556 
558  ///< LL-NACK received.
559 
561  ///< LL-ACK received.
562 
564  ///< MSD transmission is complete.
565 
567  ///< MSD transmission has failed.
568 
570  ///< AL-ACK received.
571 
573  ///< AL-ACK clear-down received.
574 
576  ///< eCall session has been stopped by PSAP
577  ///< or IVS le_ecall_End().
578 
580  ///< eCall session has lost synchronization and starts over.
581 
583  ///< eCall session completed. The modem successfully completed
584  ///< the MSD transmission and received two AL-ACKs (positive).
585  ///< Can now switch to voice path.
586 
588  ///< Unsuccessful eCall session.
589 
591  ///< End of the redial period.
592 
594  ///< Timeout for Timer T2 (see CEN-EN 16062, annex A)
595 
597  ///< Timeout for Timer T3 (see CEN-EN 16062, annex A)
598 
600  ///< Timeout for Timer T5 (see CEN-EN 16062, annex A)
601 
603  ///< Timeout for Timer T6 (see CEN-EN 16062, annex A)
604 
606  ///< Timeout for Timer T7 (see CEN-EN 16062, annex A)
607 
609  ///< Timeout for Timer T9 (see CEN-EN 16062, annex A)
610 
612  ///< Timeout for Timer T10 (see CEN-EN 16062, annex A)
613 }
615 
616 
617 //--------------------------------------------------------------------------------------------------
618 /**
619  * eCall MSD transmission mode.
620  */
621 //--------------------------------------------------------------------------------------------------
622 typedef enum
623 {
625  ///< Pull mode (modem/host waits for MSD request from PSAP to send MSD).
626 
628  ///< Push mode (modem/host sends MSD to PSAP right after eCall is connected).
629 }
631 
632 
633 //--------------------------------------------------------------------------------------------------
634 /**
635  * Diagnostic result Bit Mask (64 bits)
636  *
637  */
638 //--------------------------------------------------------------------------------------------------
639 typedef enum
640 {
642  ///< Present Mic connection failure.
643 
645  ///< Mic connection failure status.
646 
648  ///< Present Mic failure.
649 
651  ///< Mic failure status.
652 
654  ///< Present Right speaker failure.
655 
657  ///< Right speaker failure status.
658 
660  ///< Present Left speaker failure.
661 
663  ///< Left speaker failure status.
664 
666  ///< Present Speaker failure.
667 
669  ///< Speaker failure status.
670 
672  ///< Present Ignition line failure.
673 
675  ///< Ignition line failure status.
676 
678  ///< Present UIM failure.
679 
681  ///< UIM failure status.
682 
684  ///< Present Status indicator failure.
685 
687  ///< Status indicator failure status.
688 
690  ///< Present Battery failure.
691 
693  ///< Battery failure status.
694 
696  ///< Present Battery voltage low failure.
697 
699  ///< Battery voltage low failure status.
700 
702  ///< Present Crash sensor failure.
703 
705  ///< Crash sensor failure status.
706 
708  ///< Present Firmware image corruption failure.
709 
711  ///< Firmware image corruption failure status.
712 
714  ///< Present Comm module interface failure.
715 
717  ///< Comm module interface failure status.
718 
720  ///< Present GNSS receiver failure.
721 
723  ///< GNSS receiver failure status.
724 
726  ///< Present RAIM problem.
727 
729  ///< RAIM problem status.
730 
732  ///< Present GNSS antenna failure.
733 
735  ///< GNSS antenna failure status.
736 
738  ///< Present Comm module failure.
739 
741  ///< Comm module failure status.
742 
744  ///< Present Events memory overflow.
745 
747  ///< Events memory overflow status.
748 
750  ///< Present Crash profile memory overflow.
751 
753  ///< Crash profile memory overflow status.
754 
756  ///< Present Other critical failures.
757 
759  ///< Other critical failures status.
760 
762  ///< Present Other not critical failures.
763 
765  ///< Other not critical failures status.
766 }
768 
769 
770 //--------------------------------------------------------------------------------------------------
771 /**
772  * Crash information Bit Mask (16 bits) indicating the type of road accident.
773  *
774  */
775 //--------------------------------------------------------------------------------------------------
776 typedef enum
777 {
779  ///< Present Front collision indicator.
780 
782  ///< Front collision indicator.
783 
785  ///< Present Left collision indicator.
786 
788  ///< Left collision indicator.
789 
791  ///< Present Right collision indicator
792 
794  ///< Right collision indicator
795 
797  ///< Present indicator
798 
800  ///< Rear impact indicator.
801 
803  ///< Present Rollover indicator.
804 
806  ///< Rollover indicator.
807 
809  ///< Present Side collision indicator.
810 
812  ///< Side collision indicator.
813 
815  ///< Present Front or side collision indicator.
816 
818  ///< Front or side collision indicator.
819 
821  ///< Present Other types of damage indicator.
822 
824  ///< Other types of damage indicator.
825 }
827 
828 
829 //--------------------------------------------------------------------------------------------------
830 /**
831  * Reference type used by Add/Remove functions for EVENT 'le_ecall_StateChange'
832  */
833 //--------------------------------------------------------------------------------------------------
834 typedef struct le_ecall_StateChangeHandler* le_ecall_StateChangeHandlerRef_t;
835 
836 
837 //--------------------------------------------------------------------------------------------------
838 /**
839  * Handler for eCall state changes.
840  *
841  *
842  * @param ecallRef
843  * eCall reference
844  * @param state
845  * eCall state
846  * @param contextPtr
847  */
848 //--------------------------------------------------------------------------------------------------
849 typedef void (*le_ecall_StateChangeHandlerFunc_t)
850 (
851  le_ecall_CallRef_t ecallRef,
852  le_ecall_State_t state,
853  void* contextPtr
854 );
855 
856 //--------------------------------------------------------------------------------------------------
857 /**
858  * This function configures the eCall operation mode to eCall only, only emergency number can be
859  * used to start an eCall session. The modem doesn't try to register on the Cellular network.
860  * This function forces the modem to behave as eCall only mode whatever U/SIM operation mode.
861  * The change doesn't persist over power cycles.
862  * This function can be called before making an eCall.
863  *
864  * @return
865  * - LE_OK on success
866  * - LE_FAULT for other failures
867  */
868 //--------------------------------------------------------------------------------------------------
870 (
871  void
872 );
873 
874 //--------------------------------------------------------------------------------------------------
875 /**
876  * Same as le_ecall_ForceOnlyMode(), but the change persists over power cycles.
877  *
878  * @return
879  * - LE_OK on success
880  * - LE_FAULT for other failures
881  */
882 //--------------------------------------------------------------------------------------------------
884 (
885  void
886 );
887 
888 //--------------------------------------------------------------------------------------------------
889 /**
890  * This function exits from eCall Only mode. It configures the eCall operation mode to Normal mode,
891  * the modem uses the default operation mode at power up (or after U/SIM hotswap). The modem behaves
892  * following the U/SIM eCall operation mode; for example the U/SIM can be configured only for eCall,
893  * or a combination of eCall and commercial service provision.
894  *
895  * @return
896  * - LE_OK on success
897  * - LE_FAULT for other failures
898  */
899 //--------------------------------------------------------------------------------------------------
901 (
902  void
903 );
904 
905 //--------------------------------------------------------------------------------------------------
906 /**
907  * Get the configured Operation mode.
908  *
909  * @return
910  * - LE_OK on success
911  * - LE_FAULT for other failures
912  */
913 //--------------------------------------------------------------------------------------------------
915 (
916  le_ecall_OpMode_t* opModePtr
917  ///< [OUT] Operation mode
918 );
919 
920 //--------------------------------------------------------------------------------------------------
921 /**
922  * Add handler function for EVENT 'le_ecall_StateChange'
923  *
924  * This event provides information on eCall state changes.
925  */
926 //--------------------------------------------------------------------------------------------------
928 (
930  ///< [IN]
931 
932  void* contextPtr
933  ///< [IN]
934 );
935 
936 //--------------------------------------------------------------------------------------------------
937 /**
938  * Remove handler function for EVENT 'le_ecall_StateChange'
939  */
940 //--------------------------------------------------------------------------------------------------
942 (
944  ///< [IN]
945 );
946 
947 //--------------------------------------------------------------------------------------------------
948 /**
949  * Create a new eCall object
950  *
951  * The eCall is not actually established at this point. It's still up to the caller to call
952  * le_ecall_Start() when ready.
953  *
954  * @return
955  * - A reference to the new Call object.
956  *
957  * @note On failure, the process exits; you don't have to worry about checking the returned
958  * reference for validity.
959  */
960 //--------------------------------------------------------------------------------------------------
962 (
963  void
964 );
965 
966 //--------------------------------------------------------------------------------------------------
967 /**
968  * Call to free up a call reference.
969  *
970  * @note This will free the reference, but not necessarily stop an active eCall. If there are
971  * other holders of this reference the eCall will remain active.
972  */
973 //--------------------------------------------------------------------------------------------------
974 void le_ecall_Delete
975 (
976  le_ecall_CallRef_t ecallRef
977  ///< [IN] eCall reference
978 );
979 
980 //--------------------------------------------------------------------------------------------------
981 /**
982  * Set the push/pull transmission mode.
983  *
984  * @return
985  * - LE_OK on success
986  * - LE_FAULT for other failures
987  */
988 //--------------------------------------------------------------------------------------------------
990 (
992  ///< [IN] Transmission mode
993 );
994 
995 //--------------------------------------------------------------------------------------------------
996 /**
997  * Get the push/pull transmission mode.
998  *
999  * @return
1000  * - LE_OK on success
1001  * - LE_FAULT for other failures
1002  */
1003 //--------------------------------------------------------------------------------------------------
1005 (
1006  le_ecall_MsdTxMode_t* modePtr
1007  ///< [OUT] Transmission mode
1008 );
1009 
1010 //--------------------------------------------------------------------------------------------------
1011 /**
1012  * Set the position transmitted by the MSD.
1013  *
1014  * @return
1015  * - LE_OK on success
1016  * - LE_DUPLICATE an MSD has been already imported
1017  * - LE_BAD_PARAMETER bad input parameter
1018  * - LE_FAULT on other failures
1019  *
1020  * @note The process exits, if an invalid eCall reference is given
1021  */
1022 //--------------------------------------------------------------------------------------------------
1024 (
1025  le_ecall_CallRef_t ecallRef,
1026  ///< [IN] eCall reference
1027 
1028  bool isTrusted,
1029  ///< [IN] true if the position is accurate, false otherwise
1030 
1031  int32_t latitude,
1032  ///< [IN] latitude in degrees with 6 decimal places, positive North.
1033  ///< Maximum value is +90 degrees (+90000000), minimum value is -90
1034  ///< degrees (-90000000).
1035 
1036  int32_t longitude,
1037  ///< [IN] longitude in degrees with 6 decimal places, positive East.
1038  ///< Maximum value is +180 degrees (+180000000), minimum value is
1039  ///< -180 degrees (-180000000).
1040 
1041  int32_t direction
1042  ///< [IN] direction of the vehicle from magnetic north (0 to 358, clockwise)
1043  ///< in 2-degrees unit. Valid range is 0 to 179. If direction of
1044  ///< travel is invalid or unknown, the value 0xFF shall be used.
1045 );
1046 
1047 //--------------------------------------------------------------------------------------------------
1048 /**
1049  * Set the position Delta N-1 from position set in le_ecall_SetMsdPosition() transmitted by the MSD.
1050  *
1051  * @return
1052  * - LE_OK on success
1053  * - LE_DUPLICATE an MSD has been already imported
1054  * - LE_BAD_PARAMETER bad input parameter
1055  * - LE_FAULT on other failures
1056  *
1057  * @note The process exits, if an invalid eCall reference is given
1058  */
1059 //--------------------------------------------------------------------------------------------------
1061 (
1062  le_ecall_CallRef_t ecallRef,
1063  ///< [IN] eCall reference
1064 
1065  int32_t latitudeDeltaN1,
1066  ///< [IN] longitude delta from position set in SetMsdPosition
1067  ///< 1 Unit = 100 miliarcseconds, which is approximately 3m
1068  ///< maximum value: 511 = 0 0'51.100'' (+- 1580m)
1069  ///< minimum value: -512 = -0 0'51.200'' (+- -1583m)
1070 
1071  int32_t longitudeDeltaN1
1072  ///< [IN] longitude delta from position set in SetMsdPosition
1073  ///< 1 Unit = 100 miliarcseconds, which is approximately 3m
1074  ///< maximum value: 511 = 0 0'51.100'' (+-1580m)
1075  ///< minimum value: -512 = -0 0'51.200'' (+- -1583m) )
1076 );
1077 
1078 //--------------------------------------------------------------------------------------------------
1079 /**
1080  * Set the position Delta N-2 from position set in le_ecall_SetMsdPositionN1() transmitted by the MSD.
1081  *
1082  * @return
1083  * - LE_OK on success
1084  * - LE_DUPLICATE an MSD has been already imported
1085  * - LE_BAD_PARAMETER bad input parameter
1086  * - LE_FAULT on other failures
1087  *
1088  * @note The process exits, if an invalid eCall reference is given
1089  */
1090 //--------------------------------------------------------------------------------------------------
1092 (
1093  le_ecall_CallRef_t ecallRef,
1094  ///< [IN] eCall reference
1095 
1096  int32_t latitudeDeltaN2,
1097  ///< [IN] longitude delta from position set in SetMsdPositionN1
1098  ///< 1 Unit = 100 miliarcseconds, which is approximately 3m
1099  ///< maximum value: 511 = 0 0'51.100'' (+-1580m)
1100  ///< minimum value: -512 = -0 0'51.200'' (+- -1583m)
1101 
1102  int32_t longitudeDeltaN2
1103  ///< [IN] longitude delta from position set in SetMsdPositionN1
1104  ///< 1 Unit = 100 miliarcseconds, which is approximately 3m
1105  ///< maximum value: 511 = 0 0'51.100'' (+-1580m)
1106  ///< minimum value: -512 = -0 0'51.200'' (+- -1583m) )
1107 );
1108 
1109 //--------------------------------------------------------------------------------------------------
1110 /**
1111  * Set the number of passengers transmitted by the MSD.
1112  *
1113  * @return
1114  * - LE_OK on success
1115  * - LE_DUPLICATE an MSD has been already imported
1116  * - LE_BAD_PARAMETER bad eCall reference
1117  *
1118  * @note The process exits, if an invalid eCall reference is given
1119  */
1120 //--------------------------------------------------------------------------------------------------
1122 (
1123  le_ecall_CallRef_t ecallRef,
1124  ///< [IN] eCall reference
1125 
1126  uint32_t paxCount
1127  ///< [IN] number of passengers
1128 );
1129 
1130 //--------------------------------------------------------------------------------------------------
1131 /**
1132  * Import an already prepared MSD.
1133  *
1134  * MSD is transmitted only after an emergency call has been established.
1135  *
1136  * @return
1137  * - LE_OK on success
1138  * - LE_OVERFLOW The imported MSD length exceeds the MSD_MAX_LEN maximum length.
1139  * - LE_BAD_PARAMETER bad eCall reference
1140  * - LE_FAULT for other failures
1141  *
1142  * @note On failure, the process exits; you don't have to worry about checking the returned
1143  * reference for validity.
1144  */
1145 //--------------------------------------------------------------------------------------------------
1147 (
1148  le_ecall_CallRef_t ecallRef,
1149  ///< [IN] eCall reference
1150 
1151  const uint8_t* msdPtr,
1152  ///< [IN] the prepared MSD
1153 
1154  size_t msdNumElements
1155  ///< [IN]
1156 );
1157 
1158 //--------------------------------------------------------------------------------------------------
1159 /**
1160  * Export the encoded MSD.
1161  *
1162  * @return
1163  * - LE_OK on success
1164  * - LE_OVERFLOW The encoded MSD length exceeds the user's buffer length.
1165  * - LE_NOT_FOUND No encoded MSD is available.
1166  * - LE_BAD_PARAMETER bad eCall reference.
1167  * - LE_FAULT for other failures.
1168  *
1169  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1170  * function will not return.
1171  */
1172 //--------------------------------------------------------------------------------------------------
1174 (
1175  le_ecall_CallRef_t ecallRef,
1176  ///< [IN] eCall reference
1177 
1178  uint8_t* msdPtr,
1179  ///< [OUT] the encoded MSD
1180 
1181  size_t* msdNumElementsPtr
1182  ///< [INOUT]
1183 );
1184 
1185 //--------------------------------------------------------------------------------------------------
1186 /**
1187  * Send the MSD.
1188  *
1189  * @return
1190  * - LE_OK on success
1191  * - LE_BAD_PARAMETER bad eCall reference
1192  * - LE_FAULT for other failures
1193  *
1194  * @note On failure, the process exits, so you don't have to worry about checking the returned
1195  * reference for validity.
1196  */
1197 //--------------------------------------------------------------------------------------------------
1199 (
1200  le_ecall_CallRef_t ecallRef
1201  ///< [IN] eCall reference
1202 );
1203 
1204 //--------------------------------------------------------------------------------------------------
1205 /**
1206  * Start an automatic eCall session
1207  *
1208  * @return
1209  * - LE_OK on success
1210  * - LE_BUSY an eCall session is already in progress
1211  * - LE_BAD_PARAMETER bad eCall reference
1212  * - LE_FAULT for other failures
1213  *
1214  * @note The process exits, if an invalid eCall reference is given
1215  */
1216 //--------------------------------------------------------------------------------------------------
1218 (
1219  le_ecall_CallRef_t ecallRef
1220  ///< [IN] eCall reference
1221 );
1222 
1223 //--------------------------------------------------------------------------------------------------
1224 /**
1225  * Start a manual eCall session
1226  *
1227  * @return
1228  * - LE_OK on success
1229  * - LE_BUSY an eCall session is already in progress
1230  * - LE_BAD_PARAMETER bad eCall reference
1231  * - LE_FAULT for other failures
1232  *
1233  * @note The process exits, if an invalid eCall reference is given
1234  */
1235 //--------------------------------------------------------------------------------------------------
1237 (
1238  le_ecall_CallRef_t ecallRef
1239  ///< [IN] eCall reference
1240 );
1241 
1242 //--------------------------------------------------------------------------------------------------
1243 /**
1244  * Start a test eCall session
1245  *
1246  * @return
1247  * - LE_OK on success
1248  * - LE_BUSY an eCall session is already in progress
1249  * - LE_BAD_PARAMETER bad eCall reference
1250  * - LE_FAULT for other failures
1251  *
1252  * @note The process exits, if an invalid eCall reference is given
1253  */
1254 //--------------------------------------------------------------------------------------------------
1256 (
1257  le_ecall_CallRef_t ecallRef
1258  ///< [IN] eCall reference
1259 );
1260 
1261 //--------------------------------------------------------------------------------------------------
1262 /**
1263  * End the current eCall session
1264  *
1265  * @return
1266  * - LE_OK on success
1267  * - LE_BAD_PARAMETER bad eCall reference
1268  * - LE_FAULT for other failures
1269  */
1270 //--------------------------------------------------------------------------------------------------
1272 (
1273  le_ecall_CallRef_t ecallRef
1274  ///< [IN] eCall reference
1275 );
1276 
1277 //--------------------------------------------------------------------------------------------------
1278 /**
1279  * Get the current state for the given eCall
1280  *
1281  * @return
1282  * - The current state for the given eCall
1283  *
1284  * @note The process exits, if an invalid eCall reference is given
1285  */
1286 //--------------------------------------------------------------------------------------------------
1288 (
1289  le_ecall_CallRef_t ecallRef
1290  ///< [IN] eCall reference
1291 );
1292 
1293 //--------------------------------------------------------------------------------------------------
1294 /**
1295  * Set the Public Safely Answering Point telephone number.
1296  *
1297  * @note That PSAP number is not applied to Manually or Automatically initiated eCall. For those
1298  * modes, an emergency call is launched.
1299  *
1300  * @warning This function doesn't modified the U/SIM content.
1301  *
1302  * @return
1303  * - LE_OK on success
1304  * - LE_FAULT for other failures
1305  *
1306  * @note If PSAP number is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it is a fatal error,
1307  * the function will not return.
1308  */
1309 //--------------------------------------------------------------------------------------------------
1311 (
1312  const char* psap
1313  ///< [IN] Public Safely Answering Point number
1314 );
1315 
1316 //--------------------------------------------------------------------------------------------------
1317 /**
1318  * Get the Public Safely Answering Point telephone number set with le_ecall_SetPsapNumber()
1319  * function.
1320  *
1321  * @note That PSAP number is not applied to Manually or Automatically initiated eCall. For those
1322  * modes, an emergency call is launched.
1323  *
1324  * @warning This function doesn't read the U/SIM content.
1325  *
1326  * @return
1327  * - LE_OK on success
1328  * - LE_FAULT on failures or if le_ecall_SetPsapNumber() has never been called before.
1329  */
1330 //--------------------------------------------------------------------------------------------------
1332 (
1333  char* psap,
1334  ///< [OUT] Public Safely Answering Point telephone number
1335 
1336  size_t psapNumElements
1337  ///< [IN]
1338 );
1339 
1340 //--------------------------------------------------------------------------------------------------
1341 /**
1342  * This function can be recalled to indicate the modem to read the number to dial from the FDN/SDN
1343  * of the U/SIM, depending upon the eCall operating mode.
1344  *
1345  * @return
1346  * - LE_OK on success
1347  * - LE_FAULT for other failures
1348  */
1349 //--------------------------------------------------------------------------------------------------
1351 (
1352  void
1353 );
1354 
1355 //--------------------------------------------------------------------------------------------------
1356 /**
1357  * Set the NAD_DEREGISTRATION_TIME value. After termination of an emergency call the in-vehicle
1358  * system remains registered on the network for the period of time, defined by the installation
1359  * parameter NAD_DEREGISTRATION_TIME.
1360  *
1361  * @return
1362  * - LE_OK on success
1363  * - LE_FAULT on failure
1364  */
1365 //--------------------------------------------------------------------------------------------------
1367 (
1368  uint16_t deregTime
1369  ///< [IN] the NAD_DEREGISTRATION_TIME value (in minutes).
1370 );
1371 
1372 //--------------------------------------------------------------------------------------------------
1373 /**
1374  * Get the NAD_DEREGISTRATION_TIME value.
1375  *
1376  * @return
1377  * - LE_OK on success
1378  * - LE_FAULT on failure
1379  */
1380 //--------------------------------------------------------------------------------------------------
1382 (
1383  uint16_t* deregTimePtr
1384  ///< [OUT] the NAD_DEREGISTRATION_TIME value (in minutes).
1385 );
1386 
1387 //--------------------------------------------------------------------------------------------------
1388 /**
1389  * Set the minimum interval value between dial attempts.
1390  *
1391  * @return
1392  * - LE_OK on success
1393  * - LE_FAULT for other failures
1394  */
1395 //--------------------------------------------------------------------------------------------------
1397 (
1398  uint16_t pause
1399  ///< [IN] the minimum interval value in seconds
1400 );
1401 
1402 //--------------------------------------------------------------------------------------------------
1403 /**
1404  * Get the minimum interval value between dial attempts.
1405  *
1406  * @return
1407  * - LE_OK on success
1408  * - LE_FAULT for other failures
1409  */
1410 //--------------------------------------------------------------------------------------------------
1412 (
1413  uint16_t* pausePtr
1414  ///< [OUT] the minimum interval value in seconds
1415 );
1416 
1417 //--------------------------------------------------------------------------------------------------
1418 /**
1419  * Set the MANUAL_DIAL_ATTEMPTS value. If a dial attempt under manual emergency call initiation
1420  * failed, it should be repeated maximally ECALL_MANUAL_DIAL_ATTEMPTS-1 times within the maximal
1421  * time limit of ECALL_DIAL_DURATION. The default value is 10.
1422  * Redial attempts stop once the call has been cleared down correctly, or if counter/timer reached
1423  * their limits.
1424  *
1425  * @return
1426  * - LE_OK on success
1427  * - LE_FAULT on failure
1428  */
1429 //--------------------------------------------------------------------------------------------------
1431 (
1432  uint16_t attempts
1433  ///< [IN] the MANUAL_DIAL_ATTEMPTS value
1434 );
1435 
1436 //--------------------------------------------------------------------------------------------------
1437 /**
1438  * Set tthe AUTO_DIAL_ATTEMPTS value. If a dial attempt under automatic emergency call initiation
1439  * failed, it should be repeated maximally ECALL_AUTO_DIAL_ATTEMPTS-1 times within the maximal time
1440  * limit of ECALL_DIAL_DURATION. The default value is 10.
1441  * Redial attempts stop once the call has been cleared down correctly, or if counter/timer reached
1442  * their limits.
1443  *
1444  * @return
1445  * - LE_OK on success
1446  * - LE_FAULT on failure
1447  */
1448 //--------------------------------------------------------------------------------------------------
1450 (
1451  uint16_t attempts
1452  ///< [IN] the AUTO_DIAL_ATTEMPTS value
1453 );
1454 
1455 //--------------------------------------------------------------------------------------------------
1456 /**
1457  * Set the ECALL_DIAL_DURATION time. It's the maximum time the IVS have to connect the emergency
1458  * call to the PSAP, including all redial attempts.
1459  * If the call is not connected within this time (or ManualDialAttempts/AutoDialAttempts dial
1460  * attempts), it will stop.
1461  *
1462  * @return
1463  * - LE_OK on success
1464  * - LE_FAULT on failure
1465  */
1466 //--------------------------------------------------------------------------------------------------
1468 (
1469  uint16_t duration
1470  ///< [IN] the ECALL_DIAL_DURATION time value (in seconds)
1471 );
1472 
1473 //--------------------------------------------------------------------------------------------------
1474 /**
1475  * Get the MANUAL_DIAL_ATTEMPTS value.
1476  *
1477  * @return
1478  * - LE_OK on success
1479  * - LE_FAULT on failure
1480  */
1481 //--------------------------------------------------------------------------------------------------
1483 (
1484  uint16_t* attemptsPtr
1485  ///< [OUT] the MANUAL_DIAL_ATTEMPTS value
1486 );
1487 
1488 //--------------------------------------------------------------------------------------------------
1489 /**
1490  * Get the AUTO_DIAL_ATTEMPTS value.
1491  *
1492  * @return
1493  * - LE_OK on success
1494  * - LE_FAULT on failure
1495  */
1496 //--------------------------------------------------------------------------------------------------
1498 (
1499  uint16_t* attemptsPtr
1500  ///< [OUT] the AUTO_DIAL_ATTEMPTS value
1501 );
1502 
1503 //--------------------------------------------------------------------------------------------------
1504 /**
1505  * Get the ECALL_DIAL_DURATION time.
1506  *
1507  * @return
1508  * - LE_OK on success
1509  * - LE_FAULT on failure
1510  */
1511 //--------------------------------------------------------------------------------------------------
1513 (
1514  uint16_t* durationPtr
1515  ///< [OUT] the ECALL_DIAL_DURATION time value (in seconds)
1516 );
1517 
1518 //--------------------------------------------------------------------------------------------------
1519 /**
1520  * Set the ERA-GLONASS crash severity parameter.
1521  *
1522  * @return
1523  * - LE_OK on success
1524  * - LE_DUPLICATE an MSD has been already imported
1525  * - LE_BAD_PARAMETER bad eCall reference
1526  */
1527 //--------------------------------------------------------------------------------------------------
1529 (
1530  le_ecall_CallRef_t ecallRef,
1531  ///< [IN] eCall reference
1532 
1533  uint32_t crashSeverity
1534  ///< [IN] the ERA-GLONASS crash severity parameter
1535 );
1536 
1537 //--------------------------------------------------------------------------------------------------
1538 /**
1539  * Reset the ERA-GLONASS crash severity parameter. Therefore that optional parameter is not included
1540  * in the MSD message.
1541  *
1542  * @return
1543  * - LE_OK on success
1544  * - LE_DUPLICATE an MSD has been already imported
1545  * - LE_BAD_PARAMETER bad eCall reference
1546  */
1547 //--------------------------------------------------------------------------------------------------
1549 (
1550  le_ecall_CallRef_t ecallRef
1551  ///< [IN] eCall reference
1552 );
1553 
1554 //--------------------------------------------------------------------------------------------------
1555 /**
1556  * Set the ERA-GLONASS diagnostic result using a bit mask.
1557  *
1558  * @return
1559  * - LE_OK on success
1560  * - LE_DUPLICATE an MSD has been already imported
1561  * - LE_BAD_PARAMETER bad eCall reference
1562  */
1563 //--------------------------------------------------------------------------------------------------
1565 (
1566  le_ecall_CallRef_t ecallRef,
1567  ///< [IN] eCall reference
1568 
1569  le_ecall_DiagnosticResultBitMask_t diagnosticResultMask
1570  ///< [IN] ERA-GLONASS diagnostic result bit mask.
1571 );
1572 
1573 //--------------------------------------------------------------------------------------------------
1574 /**
1575  * Reset the ERA-GLONASS diagnostic result bit mask. Optional parameter is not
1576  * included in the MSD message.
1577  *
1578  * @return
1579  * - LE_OK on success
1580  * - LE_DUPLICATE an MSD has been already imported
1581  * - LE_BAD_PARAMETER bad eCall reference
1582  */
1583 //--------------------------------------------------------------------------------------------------
1585 (
1586  le_ecall_CallRef_t ecallRef
1587  ///< [IN] eCall reference
1588 );
1589 
1590 //--------------------------------------------------------------------------------------------------
1591 /**
1592  * Set the ERA-GLONASS crash type bit mask
1593  *
1594  * @return
1595  * - LE_OK on success
1596  * - LE_DUPLICATE an MSD has been already imported
1597  * - LE_BAD_PARAMETER bad eCall reference
1598  */
1599 //--------------------------------------------------------------------------------------------------
1601 (
1602  le_ecall_CallRef_t ecallRef,
1603  ///< [IN] eCall reference
1604 
1605  le_ecall_CrashInfoBitMask_t crashInfoMask
1606  ///< [IN] ERA-GLONASS crash type bit mask.
1607 );
1608 
1609 //--------------------------------------------------------------------------------------------------
1610 /**
1611  * Reset the ERA-GLONASS crash type bit mask. Optional parameter is not included
1612  * in the MSD message.
1613  *
1614  * @return
1615  * - LE_OK on success
1616  * - LE_DUPLICATE an MSD has been already imported
1617  * - LE_BAD_PARAMETER bad eCall reference
1618  */
1619 //--------------------------------------------------------------------------------------------------
1621 (
1622  le_ecall_CallRef_t ecallRef
1623  ///< [IN] eCall reference
1624 );
1625 
1626 //--------------------------------------------------------------------------------------------------
1627 /**
1628  * Called to get the termination reason.
1629  *
1630  * @return The termination reason.
1631  *
1632  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1633  * function will not return.
1634  */
1635 //--------------------------------------------------------------------------------------------------
1637 (
1638  le_ecall_CallRef_t ecallRef
1639  ///< [IN] eCall reference.
1640 );
1641 
1642 //--------------------------------------------------------------------------------------------------
1643 /**
1644  * Called to get the platform specific termination code.
1645  *
1646  * @return The platform specific termination code.
1647  *
1648  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1649  * function will not return.
1650  */
1651 //--------------------------------------------------------------------------------------------------
1653 (
1654  le_ecall_CallRef_t ecallRef
1655  ///< [IN] eCall reference.
1656 );
1657 
1658 
1659 #endif // LE_ECALL_INTERFACE_H_INCLUDE_GUARD
1660 
End of the redial period.
Definition: le_ecall_interface.h:590
le_ecall_OpMode_t
Definition: le_ecall_interface.h:514
AL-ACK clear-down received.
Definition: le_ecall_interface.h:572
Present Left collision indicator.
Definition: le_ecall_interface.h:784
void le_ecall_RemoveStateChangeHandler(le_ecall_StateChangeHandlerRef_t addHandlerRef)
int32_t le_ecall_GetPlatformSpecificTerminationCode(le_ecall_CallRef_t ecallRef)
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:523
Timeout for Timer T5 (see CEN-EN 16062, annex A)
Definition: le_ecall_interface.h:599
Present Battery failure.
Definition: le_ecall_interface.h:689
Definition: le_ecall_interface.h:582
le_result_t le_ecall_ForceOnlyMode(void)
Present Right speaker failure.
Definition: le_ecall_interface.h:653
Front collision indicator.
Definition: le_ecall_interface.h:781
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)
Present Comm module interface failure.
Definition: le_ecall_interface.h:713
Present Other critical failures.
Definition: le_ecall_interface.h:755
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:566
Definition: le_ecall_interface.h:519
Unknown state.
Definition: le_ecall_interface.h:536
Present Battery voltage low failure.
Definition: le_ecall_interface.h:695
le_result_t
Definition: le_basics.h:35
le_result_t le_ecall_SetMsdEraGlonassCrashSeverity(le_ecall_CallRef_t ecallRef, uint32_t crashSeverity)
le_result_t le_ecall_ForcePersistentOnlyMode(void)
le_result_t le_ecall_ImportMsd(le_ecall_CallRef_t ecallRef, const uint8_t *msdPtr, size_t msdNumElements)
Front or side collision indicator.
Definition: le_ecall_interface.h:817
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:611
Firmware image corruption failure status.
Definition: le_ecall_interface.h:710
le_mcc_TerminationReason_t
Definition: le_mcc_interface.h:235
Present Side collision indicator.
Definition: le_ecall_interface.h:808
Present Mic connection failure.
Definition: le_ecall_interface.h:641
Right speaker failure status.
Definition: le_ecall_interface.h:656
Present Right collision indicator.
Definition: le_ecall_interface.h:790
Other critical failures status.
Definition: le_ecall_interface.h:758
Crash profile memory overflow status.
Definition: le_ecall_interface.h:752
le_result_t le_ecall_GetMsdTxMode(le_ecall_MsdTxMode_t *modePtr)
LL-NACK received.
Definition: le_ecall_interface.h:557
Present Crash profile memory overflow.
Definition: le_ecall_interface.h:749
Present Front or side collision indicator.
Definition: le_ecall_interface.h:814
le_result_t le_ecall_ResetMsdEraGlonassCrashInfo(le_ecall_CallRef_t ecallRef)
Left speaker failure status.
Definition: le_ecall_interface.h:662
Rollover indicator.
Definition: le_ecall_interface.h:805
Present Other not critical failures.
Definition: le_ecall_interface.h:761
Ignition line failure status.
Definition: le_ecall_interface.h:674
void(* le_ecall_StateChangeHandlerFunc_t)(le_ecall_CallRef_t ecallRef, le_ecall_State_t state, void *contextPtr)
Definition: le_ecall_interface.h:850
Pull mode (modem/host waits for MSD request from PSAP to send MSD).
Definition: le_ecall_interface.h:624
Side collision indicator.
Definition: le_ecall_interface.h:811
struct le_ecall_StateChangeHandler * le_ecall_StateChangeHandlerRef_t
Definition: le_ecall_interface.h:834
le_ecall_CrashInfoBitMask_t
Definition: le_ecall_interface.h:776
le_result_t le_ecall_GetConfiguredOperationMode(le_ecall_OpMode_t *opModePtr)
le_result_t le_ecall_ExportMsd(le_ecall_CallRef_t ecallRef, uint8_t *msdPtr, size_t *msdNumElementsPtr)
GNSS antenna failure status.
Definition: le_ecall_interface.h:734
le_result_t le_ecall_SetNadDeregistrationTime(uint16_t deregTime)
Present GNSS receiver failure.
Definition: le_ecall_interface.h:719
Normal mode.
Definition: le_ecall_interface.h:516
RAIM problem status.
Definition: le_ecall_interface.h:728
le_result_t le_ecall_GetPsapNumber(char *psap, size_t psapNumElements)
void le_ecall_DisconnectService(void)
Push mode (modem/host sends MSD to PSAP right after eCall is connected).
Definition: le_ecall_interface.h:627
le_result_t le_ecall_SetEraGlonassAutoDialAttempts(uint16_t attempts)
Other types of damage indicator.
Definition: le_ecall_interface.h:823
UIM failure status.
Definition: le_ecall_interface.h:680
Battery failure status.
Definition: le_ecall_interface.h:692
le_result_t le_ecall_SetEraGlonassManualDialAttempts(uint16_t attempts)
Timeout for Timer T6 (see CEN-EN 16062, annex A)
Definition: le_ecall_interface.h:602
Speaker failure status.
Definition: le_ecall_interface.h:668
PSAP start indication received.
Definition: le_ecall_interface.h:551
le_mcc_TerminationReason_t le_ecall_GetTerminationReason(le_ecall_CallRef_t ecallRef)
le_ecall_DiagnosticResultBitMask_t
Definition: le_ecall_interface.h:639
Present RAIM problem.
Definition: le_ecall_interface.h:725
Present Front collision indicator.
Definition: le_ecall_interface.h:778
Other not critical failures status.
Definition: le_ecall_interface.h:764
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:596
Present Other types of damage indicator.
Definition: le_ecall_interface.h:820
le_ecall_State_t le_ecall_GetState(le_ecall_CallRef_t ecallRef)
LL-ACK received.
Definition: le_ecall_interface.h:560
Waiting for PSAP start indication.
Definition: le_ecall_interface.h:548
le_result_t le_ecall_End(le_ecall_CallRef_t ecallRef)
struct le_ecall_Call * le_ecall_CallRef_t
Definition: le_ecall_interface.h:498
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:563
Timeout for Timer T7 (see CEN-EN 16062, annex A)
Definition: le_ecall_interface.h:605
Comm module failure status.
Definition: le_ecall_interface.h:740
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:746
Timeout for Timer T2 (see CEN-EN 16062, annex A)
Definition: le_ecall_interface.h:593
Present GNSS antenna failure.
Definition: le_ecall_interface.h:731
le_result_t le_ecall_SetMsdPosition(le_ecall_CallRef_t ecallRef, bool isTrusted, int32_t latitude, int32_t longitude, int32_t direction)
Present Rollover indicator.
Definition: le_ecall_interface.h:802
le_ecall_CallRef_t le_ecall_Create(void)
Status indicator failure status.
Definition: le_ecall_interface.h:686
Present UIM failure.
Definition: le_ecall_interface.h:677
Present indicator.
Definition: le_ecall_interface.h:796
MSD transmission is started.
Definition: le_ecall_interface.h:554
eCall session started.
Definition: le_ecall_interface.h:539
Present Left speaker failure.
Definition: le_ecall_interface.h:659
Rear impact indicator.
Definition: le_ecall_interface.h:799
Present Mic failure.
Definition: le_ecall_interface.h:647
le_result_t le_ecall_UseUSimNumbers(void)
le_result_t le_ecall_SetPsapNumber(const char *psap)
le_result_t le_ecall_GetEraGlonassManualDialAttempts(uint16_t *attemptsPtr)
Present Status indicator failure.
Definition: le_ecall_interface.h:683
Mic failure status.
Definition: le_ecall_interface.h:650
le_result_t le_ecall_GetNadDeregistrationTime(uint16_t *deregTimePtr)
Right collision indicator.
Definition: le_ecall_interface.h:793
le_result_t le_ecall_GetEraGlonassAutoDialAttempts(uint16_t *attemptsPtr)
Emergency call is established.
Definition: le_ecall_interface.h:542
Unsuccessful eCall session.
Definition: le_ecall_interface.h:587
le_result_t le_ecall_ExitOnlyMode(void)
le_result_t le_ecall_SetMsdPositionN1(le_ecall_CallRef_t ecallRef, int32_t latitudeDeltaN1, int32_t longitudeDeltaN1)
Present Crash sensor failure.
Definition: le_ecall_interface.h:701
le_result_t le_ecall_GetEraGlonassDialDuration(uint16_t *durationPtr)
Present Speaker failure.
Definition: le_ecall_interface.h:665
AL-ACK received.
Definition: le_ecall_interface.h:569
Battery voltage low failure status.
Definition: le_ecall_interface.h:698
le_ecall_State_t
Definition: le_ecall_interface.h:534
le_ecall_MsdTxMode_t
Definition: le_ecall_interface.h:622
le_result_t le_ecall_SetIntervalBetweenDialAttempts(uint16_t pause)
Emergency call is disconnected.
Definition: le_ecall_interface.h:545
Definition: le_ecall_interface.h:575
Present Events memory overflow.
Definition: le_ecall_interface.h:743
le_result_t le_ecall_StartAutomatic(le_ecall_CallRef_t ecallRef)
Comm module interface failure status.
Definition: le_ecall_interface.h:716
GNSS receiver failure status.
Definition: le_ecall_interface.h:722
eCall session has lost synchronization and starts over.
Definition: le_ecall_interface.h:579
Present Comm module failure.
Definition: le_ecall_interface.h:737
Timeout for Timer T9 (see CEN-EN 16062, annex A)
Definition: le_ecall_interface.h:608
Mic connection failure status.
Definition: le_ecall_interface.h:644
le_result_t le_ecall_TryConnectService(void)
le_ecall_StateChangeHandlerRef_t le_ecall_AddStateChangeHandler(le_ecall_StateChangeHandlerFunc_t handlerPtr, void *contextPtr)
Left collision indicator.
Definition: le_ecall_interface.h:787
Present Firmware image corruption failure.
Definition: le_ecall_interface.h:707
void le_ecall_Delete(le_ecall_CallRef_t ecallRef)
Present Ignition line failure.
Definition: le_ecall_interface.h:671
le_result_t le_ecall_GetIntervalBetweenDialAttempts(uint16_t *pausePtr)
Crash sensor failure status.
Definition: le_ecall_interface.h:704