le_ecall_interface.h File Reference
#include "legato.h"
#include "le_mdmDefs_interface.h"
#include "le_mcc_interface.h"

Go to the source code of this file.

Macros

#define LE_ECALL_MSD_MAX_LEN   140
 

Typedefs

typedef struct le_ecall_Call * le_ecall_CallRef_t
 
typedef struct le_ecall_StateChangeHandler * le_ecall_StateChangeHandlerRef_t
 
typedef void(* le_ecall_StateChangeHandlerFunc_t) (le_ecall_CallRef_t ecallRef, le_ecall_State_t state, void *contextPtr)
 

Enumerations

enum  le_ecall_OpMode_t { LE_ECALL_NORMAL_MODE, LE_ECALL_ONLY_MODE, LE_ECALL_FORCED_PERSISTENT_ONLY_MODE }
 
enum  le_ecall_State_t {
  LE_ECALL_STATE_UNKNOWN, LE_ECALL_STATE_STARTED, LE_ECALL_STATE_CONNECTED, LE_ECALL_STATE_DISCONNECTED,
  LE_ECALL_STATE_WAITING_PSAP_START_IND, LE_ECALL_STATE_PSAP_START_IND_RECEIVED, LE_ECALL_STATE_MSD_TX_STARTED, LE_ECALL_STATE_LLNACK_RECEIVED,
  LE_ECALL_STATE_LLACK_RECEIVED, LE_ECALL_STATE_MSD_TX_COMPLETED, LE_ECALL_STATE_MSD_TX_FAILED, LE_ECALL_STATE_ALACK_RECEIVED_POSITIVE,
  LE_ECALL_STATE_ALACK_RECEIVED_CLEAR_DOWN, LE_ECALL_STATE_STOPPED, LE_ECALL_STATE_RESET, LE_ECALL_STATE_COMPLETED,
  LE_ECALL_STATE_FAILED, LE_ECALL_STATE_END_OF_REDIAL_PERIOD, LE_ECALL_STATE_TIMEOUT_T2, LE_ECALL_STATE_TIMEOUT_T3,
  LE_ECALL_STATE_TIMEOUT_T5, LE_ECALL_STATE_TIMEOUT_T6, LE_ECALL_STATE_TIMEOUT_T7, LE_ECALL_STATE_TIMEOUT_T9,
  LE_ECALL_STATE_TIMEOUT_T10
}
 
enum  le_ecall_MsdTxMode_t { LE_ECALL_TX_MODE_PULL, LE_ECALL_TX_MODE_PUSH }
 
enum  le_ecall_DiagnosticResultBitMask_t {
  LE_ECALL_DIAG_RESULT_PRESENT_MIC_CONNECTION_FAILURE = 0x1, LE_ECALL_DIAG_RESULT_MIC_CONNECTION_FAILURE = 0x2, LE_ECALL_DIAG_RESULT_PRESENT_MIC_FAILURE = 0x4, LE_ECALL_DIAG_RESULT_MIC_FAILURE = 0x8,
  LE_ECALL_DIAG_RESULT_PRESENT_RIGHT_SPEAKER_FAILURE = 0x10, LE_ECALL_DIAG_RESULT_RIGHT_SPEAKER_FAILURE = 0x20, LE_ECALL_DIAG_RESULT_PRESENT_LEFT_SPEAKER_FAILURE = 0x40, LE_ECALL_DIAG_RESULT_LEFT_SPEAKER_FAILURE = 0x80,
  LE_ECALL_DIAG_RESULT_PRESENT_SPEAKERS_FAILURE = 0x100, LE_ECALL_DIAG_RESULT_SPEAKERS_FAILURE = 0x200, LE_ECALL_DIAG_RESULT_PRESENT_IGNITION_LINE_FAILURE = 0x400, LE_ECALL_DIAG_RESULT_IGNITION_LINE_FAILURE = 0x800,
  LE_ECALL_DIAG_RESULT_PRESENT_UIM_FAILURE = 0x1000, LE_ECALL_DIAG_RESULT_UIM_FAILURE = 0x2000, LE_ECALL_DIAG_RESULT_PRESENT_STATUS_INDICATOR_FAILURE = 0x4000, LE_ECALL_DIAG_RESULT_STATUS_INDICATOR_FAILURE = 0x8000,
  LE_ECALL_DIAG_RESULT_PRESENT_BATTERY_FAILURE = 0x10000, LE_ECALL_DIAG_RESULT_BATTERY_FAILURE = 0x20000, LE_ECALL_DIAG_RESULT_PRESENT_BATTERY_VOLTAGE_LOW = 0x40000, LE_ECALL_DIAG_RESULT_BATTERY_VOLTAGE_LOW = 0x80000,
  LE_ECALL_DIAG_RESULT_PRESENT_CRASH_SENSOR_FAILURE = 0x100000, LE_ECALL_DIAG_RESULT_CRASH_SENSOR_FAILURE = 0x200000, LE_ECALL_DIAG_RESULT_PRESENT_FIRMWARE_IMAGE_CORRUPTION = 0x400000, LE_ECALL_DIAG_RESULT_FIRMWARE_IMAGE_CORRUPTION = 0x800000,
  LE_ECALL_DIAG_RESULT_PRESENT_COMM_MODULE_INTERFACE_FAILURE = 0x1000000, LE_ECALL_DIAG_RESULT_COMM_MODULE_INTERFACE_FAILURE = 0x2000000, LE_ECALL_DIAG_RESULT_PRESENT_GNSS_RECEIVER_FAILURE = 0x4000000, LE_ECALL_DIAG_RESULT_GNSS_RECEIVER_FAILURE = 0x8000000,
  LE_ECALL_DIAG_RESULT_PRESENT_RAIM_PROBLEM = 0x10000000, LE_ECALL_DIAG_RESULT_RAIM_PROBLEM = 0x20000000, LE_ECALL_DIAG_RESULT_PRESENT_GNSS_ANTENNA_FAILURE = 0x40000000, LE_ECALL_DIAG_RESULT_GNSS_ANTENNA_FAILURE = 0x80000000,
  LE_ECALL_DIAG_RESULT_PRESENT_COMM_MODULE_FAILURE = 0x100000000, LE_ECALL_DIAG_RESULT_COMM_MODULE_FAILURE = 0x200000000, LE_ECALL_DIAG_RESULT_PRESENT_EVENTS_MEMORY_OVERFLOW = 0x400000000, LE_ECALL_DIAG_RESULT_EVENTS_MEMORY_OVERFLOW = 0x800000000,
  LE_ECALL_DIAG_RESULT_PRESENT_CRASH_PROFILE_MEMORY_OVERFLOW = 0x1000000000, LE_ECALL_DIAG_RESULT_CRASH_PROFILE_MEMORY_OVERFLOW = 0x2000000000, LE_ECALL_DIAG_RESULT_PRESENT_OTHER_CRITICAL_FAILURES = 0x4000000000, LE_ECALL_DIAG_RESULT_OTHER_CRITICAL_FAILURES = 0x8000000000,
  LE_ECALL_DIAG_RESULT_PRESENT_OTHER_NOT_CRITICAL_FAILURES = 0x10000000000, LE_ECALL_DIAG_RESULT_OTHER_NOT_CRITICAL_FAILURES = 0x20000000000
}
 
enum  le_ecall_CrashInfoBitMask_t {
  LE_ECALL_CRASH_INFO_PRESENT_CRASH_FRONT = 0x1, LE_ECALL_CRASH_INFO_CRASH_FRONT = 0x2, LE_ECALL_CRASH_INFO_PRESENT_CRASH_LEFT = 0x4, LE_ECALL_CRASH_INFO_CRASH_LEFT = 0x8,
  LE_ECALL_CRASH_INFO_PRESENT_CRASH_RIGHT = 0x10, LE_ECALL_CRASH_INFO_CRASH_RIGHT = 0x20, LE_ECALL_CRASH_INFO_PRESENT_CRASH_REAR = 0x40, LE_ECALL_CRASH_INFO_CRASH_REAR = 0x80,
  LE_ECALL_CRASH_INFO_PRESENT_CRASH_ROLLOVER = 0x100, LE_ECALL_CRASH_INFO_CRASH_ROLLOVER = 0x200, LE_ECALL_CRASH_INFO_PRESENT_CRASH_SIDE = 0x400, LE_ECALL_CRASH_INFO_CRASH_SIDE = 0x800,
  LE_ECALL_CRASH_INFO_PRESENT_CRASH_FRONT_OR_SIDE = 0x1000, LE_ECALL_CRASH_INFO_CRASH_FRONT_OR_SIDE = 0x2000, LE_ECALL_CRASH_INFO_PRESENT_CRASH_ANOTHER_TYPE = 0x4000, LE_ECALL_CRASH_INFO_CRASH_ANOTHER_TYPE = 0x8000
}
 

Functions

void le_ecall_ConnectService (void)
 
void le_ecall_DisconnectService (void)
 
le_result_t le_ecall_ForceOnlyMode (void)
 
le_result_t le_ecall_ForcePersistentOnlyMode (void)
 
le_result_t le_ecall_ExitOnlyMode (void)
 
le_result_t le_ecall_GetConfiguredOperationMode (le_ecall_OpMode_t *opModePtr)
 
le_ecall_StateChangeHandlerRef_t le_ecall_AddStateChangeHandler (le_ecall_StateChangeHandlerFunc_t handlerPtr, void *contextPtr)
 
void le_ecall_RemoveStateChangeHandler (le_ecall_StateChangeHandlerRef_t addHandlerRef)
 
le_ecall_CallRef_t le_ecall_Create (void)
 
void le_ecall_Delete (le_ecall_CallRef_t ecallRef)
 
le_result_t le_ecall_SetMsdTxMode (le_ecall_MsdTxMode_t mode)
 
le_result_t le_ecall_GetMsdTxMode (le_ecall_MsdTxMode_t *modePtr)
 
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_SetMsdPassengersCount (le_ecall_CallRef_t ecallRef, uint32_t paxCount)
 
le_result_t le_ecall_ImportMsd (le_ecall_CallRef_t ecallRef, const uint8_t *msdPtr, size_t msdNumElements)
 
le_result_t le_ecall_ExportMsd (le_ecall_CallRef_t ecallRef, uint8_t *msdPtr, size_t *msdNumElementsPtr)
 
le_result_t le_ecall_SendMsd (le_ecall_CallRef_t ecallRef)
 
le_result_t le_ecall_StartAutomatic (le_ecall_CallRef_t ecallRef)
 
le_result_t le_ecall_StartManual (le_ecall_CallRef_t ecallRef)
 
le_result_t le_ecall_StartTest (le_ecall_CallRef_t ecallRef)
 
le_result_t le_ecall_End (le_ecall_CallRef_t ecallRef)
 
le_ecall_State_t le_ecall_GetState (le_ecall_CallRef_t ecallRef)
 
le_result_t le_ecall_SetPsapNumber (const char *psap)
 
le_result_t le_ecall_GetPsapNumber (char *psap, size_t psapNumElements)
 
le_result_t le_ecall_UseUSimNumbers (void)
 
le_result_t le_ecall_SetNadDeregistrationTime (uint16_t deregTime)
 
le_result_t le_ecall_GetNadDeregistrationTime (uint16_t *deregTimePtr)
 
le_result_t le_ecall_SetIntervalBetweenDialAttempts (uint16_t pause)
 
le_result_t le_ecall_GetIntervalBetweenDialAttempts (uint16_t *pausePtr)
 
le_result_t le_ecall_SetEraGlonassManualDialAttempts (uint16_t attempts)
 
le_result_t le_ecall_SetEraGlonassAutoDialAttempts (uint16_t attempts)
 
le_result_t le_ecall_SetEraGlonassDialDuration (uint16_t duration)
 
le_result_t le_ecall_GetEraGlonassManualDialAttempts (uint16_t *attemptsPtr)
 
le_result_t le_ecall_GetEraGlonassAutoDialAttempts (uint16_t *attemptsPtr)
 
le_result_t le_ecall_GetEraGlonassDialDuration (uint16_t *durationPtr)
 
le_result_t le_ecall_SetMsdEraGlonassCrashSeverity (le_ecall_CallRef_t ecallRef, uint32_t crashSeverity)
 
le_result_t le_ecall_ResetMsdEraGlonassCrashSeverity (le_ecall_CallRef_t ecallRef)
 
le_result_t le_ecall_SetMsdEraGlonassDiagnosticResult (le_ecall_CallRef_t ecallRef, le_ecall_DiagnosticResultBitMask_t diagnosticResultMask)
 
le_result_t le_ecall_ResetMsdEraGlonassDiagnosticResult (le_ecall_CallRef_t ecallRef)
 
le_result_t le_ecall_SetMsdEraGlonassCrashInfo (le_ecall_CallRef_t ecallRef, le_ecall_CrashInfoBitMask_t crashInfoMask)
 
le_result_t le_ecall_ResetMsdEraGlonassCrashInfo (le_ecall_CallRef_t ecallRef)
 
le_mcc_TerminationReason_t le_ecall_GetTerminationReason (le_ecall_CallRef_t ecallRef)
 
int32_t le_ecall_GetPlatformSpecificTerminationCode (le_ecall_CallRef_t ecallRef)
 

Detailed Description

Legato eCall include file.

Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.

Macro Definition Documentation

#define LE_ECALL_MSD_MAX_LEN   140

MSD message length in bytes.

Typedef Documentation

typedef struct le_ecall_Call* le_ecall_CallRef_t

Reference returned by Create function and used by other functions

typedef void(* le_ecall_StateChangeHandlerFunc_t) (le_ecall_CallRef_t ecallRef, le_ecall_State_t state, void *contextPtr)

Handler for eCall state changes.

Parameters
ecallRefeCall reference
stateeCall state
contextPtr
typedef struct le_ecall_StateChangeHandler* le_ecall_StateChangeHandlerRef_t

Reference type used by Add/Remove functions for EVENT 'le_ecall_StateChange'

Enumeration Type Documentation

Crash information Bit Mask (16 bits) indicating the type of road accident.

Enumerator
LE_ECALL_CRASH_INFO_PRESENT_CRASH_FRONT 

Present Front collision indicator.

LE_ECALL_CRASH_INFO_CRASH_FRONT 

Front collision indicator.

LE_ECALL_CRASH_INFO_PRESENT_CRASH_LEFT 

Present Left collision indicator.

LE_ECALL_CRASH_INFO_CRASH_LEFT 

Left collision indicator.

LE_ECALL_CRASH_INFO_PRESENT_CRASH_RIGHT 

Present Right collision indicator.

LE_ECALL_CRASH_INFO_CRASH_RIGHT 

Right collision indicator.

LE_ECALL_CRASH_INFO_PRESENT_CRASH_REAR 

Present indicator.

LE_ECALL_CRASH_INFO_CRASH_REAR 

Rear impact indicator.

LE_ECALL_CRASH_INFO_PRESENT_CRASH_ROLLOVER 

Present Rollover indicator.

LE_ECALL_CRASH_INFO_CRASH_ROLLOVER 

Rollover indicator.

LE_ECALL_CRASH_INFO_PRESENT_CRASH_SIDE 

Present Side collision indicator.

LE_ECALL_CRASH_INFO_CRASH_SIDE 

Side collision indicator.

LE_ECALL_CRASH_INFO_PRESENT_CRASH_FRONT_OR_SIDE 

Present Front or side collision indicator.

LE_ECALL_CRASH_INFO_CRASH_FRONT_OR_SIDE 

Front or side collision indicator.

LE_ECALL_CRASH_INFO_PRESENT_CRASH_ANOTHER_TYPE 

Present Other types of damage indicator.

LE_ECALL_CRASH_INFO_CRASH_ANOTHER_TYPE 

Other types of damage indicator.

Diagnostic result Bit Mask (64 bits)

Enumerator
LE_ECALL_DIAG_RESULT_PRESENT_MIC_CONNECTION_FAILURE 

Present Mic connection failure.

LE_ECALL_DIAG_RESULT_MIC_CONNECTION_FAILURE 

Mic connection failure status.

LE_ECALL_DIAG_RESULT_PRESENT_MIC_FAILURE 

Present Mic failure.

LE_ECALL_DIAG_RESULT_MIC_FAILURE 

Mic failure status.

LE_ECALL_DIAG_RESULT_PRESENT_RIGHT_SPEAKER_FAILURE 

Present Right speaker failure.

LE_ECALL_DIAG_RESULT_RIGHT_SPEAKER_FAILURE 

Right speaker failure status.

LE_ECALL_DIAG_RESULT_PRESENT_LEFT_SPEAKER_FAILURE 

Present Left speaker failure.

LE_ECALL_DIAG_RESULT_LEFT_SPEAKER_FAILURE 

Left speaker failure status.

LE_ECALL_DIAG_RESULT_PRESENT_SPEAKERS_FAILURE 

Present Speaker failure.

LE_ECALL_DIAG_RESULT_SPEAKERS_FAILURE 

Speaker failure status.

LE_ECALL_DIAG_RESULT_PRESENT_IGNITION_LINE_FAILURE 

Present Ignition line failure.

LE_ECALL_DIAG_RESULT_IGNITION_LINE_FAILURE 

Ignition line failure status.

LE_ECALL_DIAG_RESULT_PRESENT_UIM_FAILURE 

Present UIM failure.

LE_ECALL_DIAG_RESULT_UIM_FAILURE 

UIM failure status.

LE_ECALL_DIAG_RESULT_PRESENT_STATUS_INDICATOR_FAILURE 

Present Status indicator failure.

LE_ECALL_DIAG_RESULT_STATUS_INDICATOR_FAILURE 

Status indicator failure status.

LE_ECALL_DIAG_RESULT_PRESENT_BATTERY_FAILURE 

Present Battery failure.

LE_ECALL_DIAG_RESULT_BATTERY_FAILURE 

Battery failure status.

LE_ECALL_DIAG_RESULT_PRESENT_BATTERY_VOLTAGE_LOW 

Present Battery voltage low failure.

LE_ECALL_DIAG_RESULT_BATTERY_VOLTAGE_LOW 

Battery voltage low failure status.

LE_ECALL_DIAG_RESULT_PRESENT_CRASH_SENSOR_FAILURE 

Present Crash sensor failure.

LE_ECALL_DIAG_RESULT_CRASH_SENSOR_FAILURE 

Crash sensor failure status.

LE_ECALL_DIAG_RESULT_PRESENT_FIRMWARE_IMAGE_CORRUPTION 

Present Firmware image corruption failure.

LE_ECALL_DIAG_RESULT_FIRMWARE_IMAGE_CORRUPTION 

Firmware image corruption failure status.

LE_ECALL_DIAG_RESULT_PRESENT_COMM_MODULE_INTERFACE_FAILURE 

Present Comm module interface failure.

LE_ECALL_DIAG_RESULT_COMM_MODULE_INTERFACE_FAILURE 

Comm module interface failure status.

LE_ECALL_DIAG_RESULT_PRESENT_GNSS_RECEIVER_FAILURE 

Present GNSS receiver failure.

LE_ECALL_DIAG_RESULT_GNSS_RECEIVER_FAILURE 

GNSS receiver failure status.

LE_ECALL_DIAG_RESULT_PRESENT_RAIM_PROBLEM 

Present RAIM problem.

LE_ECALL_DIAG_RESULT_RAIM_PROBLEM 

RAIM problem status.

LE_ECALL_DIAG_RESULT_PRESENT_GNSS_ANTENNA_FAILURE 

Present GNSS antenna failure.

LE_ECALL_DIAG_RESULT_GNSS_ANTENNA_FAILURE 

GNSS antenna failure status.

LE_ECALL_DIAG_RESULT_PRESENT_COMM_MODULE_FAILURE 

Present Comm module failure.

LE_ECALL_DIAG_RESULT_COMM_MODULE_FAILURE 

Comm module failure status.

LE_ECALL_DIAG_RESULT_PRESENT_EVENTS_MEMORY_OVERFLOW 

Present Events memory overflow.

LE_ECALL_DIAG_RESULT_EVENTS_MEMORY_OVERFLOW 

Events memory overflow status.

LE_ECALL_DIAG_RESULT_PRESENT_CRASH_PROFILE_MEMORY_OVERFLOW 

Present Crash profile memory overflow.

LE_ECALL_DIAG_RESULT_CRASH_PROFILE_MEMORY_OVERFLOW 

Crash profile memory overflow status.

LE_ECALL_DIAG_RESULT_PRESENT_OTHER_CRITICAL_FAILURES 

Present Other critical failures.

LE_ECALL_DIAG_RESULT_OTHER_CRITICAL_FAILURES 

Other critical failures status.

LE_ECALL_DIAG_RESULT_PRESENT_OTHER_NOT_CRITICAL_FAILURES 

Present Other not critical failures.

LE_ECALL_DIAG_RESULT_OTHER_NOT_CRITICAL_FAILURES 

Other not critical failures status.

eCall MSD transmission mode.

Enumerator
LE_ECALL_TX_MODE_PULL 

Pull mode (modem/host waits for MSD request from PSAP to send MSD).

LE_ECALL_TX_MODE_PUSH 

Push mode (modem/host sends MSD to PSAP right after eCall is connected).

Configured operation modes.

Enumerator
LE_ECALL_NORMAL_MODE 

Normal mode.

LE_ECALL_ONLY_MODE 

eCall only mode according to U/SIM operation mode or forced by application through the le_ecall_ForceOnlyMode() function.

LE_ECALL_FORCED_PERSISTENT_ONLY_MODE 

Persistent eCall only mode.

eCall session states.

Enumerator
LE_ECALL_STATE_UNKNOWN 

Unknown state.

LE_ECALL_STATE_STARTED 

eCall session started.

LE_ECALL_STATE_CONNECTED 

Emergency call is established.

LE_ECALL_STATE_DISCONNECTED 

Emergency call is disconnected.

LE_ECALL_STATE_WAITING_PSAP_START_IND 

Waiting for PSAP start indication.

LE_ECALL_STATE_PSAP_START_IND_RECEIVED 

PSAP start indication received.

LE_ECALL_STATE_MSD_TX_STARTED 

MSD transmission is started.

LE_ECALL_STATE_LLNACK_RECEIVED 

LL-NACK received.

LE_ECALL_STATE_LLACK_RECEIVED 

LL-ACK received.

LE_ECALL_STATE_MSD_TX_COMPLETED 

MSD transmission is complete.

LE_ECALL_STATE_MSD_TX_FAILED 

MSD transmission has failed.

LE_ECALL_STATE_ALACK_RECEIVED_POSITIVE 

AL-ACK received.

LE_ECALL_STATE_ALACK_RECEIVED_CLEAR_DOWN 

AL-ACK clear-down received.

LE_ECALL_STATE_STOPPED 

eCall session has been stopped by PSAP or IVS le_ecall_End().

LE_ECALL_STATE_RESET 

eCall session has lost synchronization and starts over.

LE_ECALL_STATE_COMPLETED 

eCall session completed. The modem successfully completed the MSD transmission and received two AL-ACKs (positive). Can now switch to voice path.

LE_ECALL_STATE_FAILED 

Unsuccessful eCall session.

LE_ECALL_STATE_END_OF_REDIAL_PERIOD 

End of the redial period.

LE_ECALL_STATE_TIMEOUT_T2 

Timeout for Timer T2 (see CEN-EN 16062, annex A)

LE_ECALL_STATE_TIMEOUT_T3 

Timeout for Timer T3 (see CEN-EN 16062, annex A)

LE_ECALL_STATE_TIMEOUT_T5 

Timeout for Timer T5 (see CEN-EN 16062, annex A)

LE_ECALL_STATE_TIMEOUT_T6 

Timeout for Timer T6 (see CEN-EN 16062, annex A)

LE_ECALL_STATE_TIMEOUT_T7 

Timeout for Timer T7 (see CEN-EN 16062, annex A)

LE_ECALL_STATE_TIMEOUT_T9 

Timeout for Timer T9 (see CEN-EN 16062, annex A)

LE_ECALL_STATE_TIMEOUT_T10 

Timeout for Timer T10 (see CEN-EN 16062, annex A)

Function Documentation

le_ecall_StateChangeHandlerRef_t le_ecall_AddStateChangeHandler ( le_ecall_StateChangeHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'le_ecall_StateChange'

This event provides information on eCall state changes.

Parameters
[in]handlerPtr
[in]contextPtr
void le_ecall_ConnectService ( void  )

Connect the current client thread to the service providing this API.

This function must be called before any other functions in this API. Normally, it's automatically called for the main thread, but must be explicitly called for other threads. For details, see Client-specific Functions.

This function is created automatically.

le_ecall_CallRef_t le_ecall_Create ( void  )

Create a new eCall object

The eCall is not actually established at this point. It's still up to the caller to call le_ecall_Start() when ready.

Returns
  • A reference to the new Call object.
Note
On failure, the process exits; you don't have to worry about checking the returned reference for validity.
void le_ecall_Delete ( le_ecall_CallRef_t  ecallRef)

Call to free up a call reference.

Note
This will free the reference, but not necessarily stop an active eCall. If there are other holders of this reference the eCall will remain active.
Parameters
[in]ecallRefeCall reference
void le_ecall_DisconnectService ( void  )

Disconnect the current client thread from the service providing this API.

Normally, this function doesn't need to be called. After this function is called, there's no longer a connection to the service, and the functions in this API can't be used. For details, see Client-specific Functions.

This function is created automatically.

le_result_t le_ecall_End ( le_ecall_CallRef_t  ecallRef)

End the current eCall session

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER bad eCall reference
  • LE_FAULT for other failures
Parameters
[in]ecallRefeCall reference
le_result_t le_ecall_ExitOnlyMode ( void  )

This function exits from eCall Only mode. It configures the eCall operation mode to Normal mode, the modem uses the default operation mode at power up (or after U/SIM hotswap). The modem behaves following the U/SIM eCall operation mode; for example the U/SIM can be configured only for eCall, or a combination of eCall and commercial service provision.

Returns
  • LE_OK on success
  • LE_FAULT for other failures
le_result_t le_ecall_ExportMsd ( le_ecall_CallRef_t  ecallRef,
uint8_t *  msdPtr,
size_t *  msdNumElementsPtr 
)

Export the encoded MSD.

Returns
  • LE_OK on success
  • LE_OVERFLOW The encoded MSD length exceeds the user's buffer length.
  • LE_NOT_FOUND No encoded MSD is available.
  • LE_BAD_PARAMETER bad eCall reference.
  • LE_FAULT for other failures.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]ecallRefeCall reference
[out]msdPtrthe encoded MSD
[in,out]msdNumElementsPtr
le_result_t le_ecall_ForceOnlyMode ( void  )

This function configures the eCall operation mode to eCall only, only emergency number can be used to start an eCall session. The modem doesn't try to register on the Cellular network. This function forces the modem to behave as eCall only mode whatever U/SIM operation mode. The change doesn't persist over power cycles. This function can be called before making an eCall.

Returns
  • LE_OK on success
  • LE_FAULT for other failures
le_result_t le_ecall_ForcePersistentOnlyMode ( void  )

Same as le_ecall_ForceOnlyMode(), but the change persists over power cycles.

Returns
  • LE_OK on success
  • LE_FAULT for other failures
le_result_t le_ecall_GetConfiguredOperationMode ( le_ecall_OpMode_t opModePtr)

Get the configured Operation mode.

Returns
  • LE_OK on success
  • LE_FAULT for other failures
Parameters
[out]opModePtrOperation mode
le_result_t le_ecall_GetEraGlonassAutoDialAttempts ( uint16_t *  attemptsPtr)

Get the AUTO_DIAL_ATTEMPTS value.

Returns
  • LE_OK on success
  • LE_FAULT on failure
Parameters
[out]attemptsPtrthe AUTO_DIAL_ATTEMPTS value
le_result_t le_ecall_GetEraGlonassDialDuration ( uint16_t *  durationPtr)

Get the ECALL_DIAL_DURATION time.

Returns
  • LE_OK on success
  • LE_FAULT on failure
Parameters
[out]durationPtrthe ECALL_DIAL_DURATION time value (in seconds)
le_result_t le_ecall_GetEraGlonassManualDialAttempts ( uint16_t *  attemptsPtr)

Get the MANUAL_DIAL_ATTEMPTS value.

Returns
  • LE_OK on success
  • LE_FAULT on failure
Parameters
[out]attemptsPtrthe MANUAL_DIAL_ATTEMPTS value
le_result_t le_ecall_GetIntervalBetweenDialAttempts ( uint16_t *  pausePtr)

Get the minimum interval value between dial attempts.

Returns
  • LE_OK on success
  • LE_FAULT for other failures
Parameters
[out]pausePtrthe minimum interval value in seconds
le_result_t le_ecall_GetMsdTxMode ( le_ecall_MsdTxMode_t modePtr)

Get the push/pull transmission mode.

Returns
  • LE_OK on success
  • LE_FAULT for other failures
Parameters
[out]modePtrTransmission mode
le_result_t le_ecall_GetNadDeregistrationTime ( uint16_t *  deregTimePtr)

Get the NAD_DEREGISTRATION_TIME value.

Returns
  • LE_OK on success
  • LE_FAULT on failure
Parameters
[out]deregTimePtrthe NAD_DEREGISTRATION_TIME value (in minutes).
int32_t le_ecall_GetPlatformSpecificTerminationCode ( le_ecall_CallRef_t  ecallRef)

Called to get the platform specific termination code.

Returns
The platform specific termination code.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]ecallRefeCall reference.
le_result_t le_ecall_GetPsapNumber ( char *  psap,
size_t  psapNumElements 
)

Get the Public Safely Answering Point telephone number set with le_ecall_SetPsapNumber() function.

Note
That PSAP number is not applied to Manually or Automatically initiated eCall. For those modes, an emergency call is launched.
Warning
This function doesn't read the U/SIM content.
Returns
Parameters
[out]psapPublic Safely Answering Point telephone number
[in]psapNumElements
le_ecall_State_t le_ecall_GetState ( le_ecall_CallRef_t  ecallRef)

Get the current state for the given eCall

Returns
  • The current state for the given eCall
Note
The process exits, if an invalid eCall reference is given
Parameters
[in]ecallRefeCall reference
le_mcc_TerminationReason_t le_ecall_GetTerminationReason ( le_ecall_CallRef_t  ecallRef)

Called to get the termination reason.

Returns
The termination reason.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]ecallRefeCall reference.
le_result_t le_ecall_ImportMsd ( le_ecall_CallRef_t  ecallRef,
const uint8_t *  msdPtr,
size_t  msdNumElements 
)

Import an already prepared MSD.

MSD is transmitted only after an emergency call has been established.

Returns
  • LE_OK on success
  • LE_OVERFLOW The imported MSD length exceeds the MSD_MAX_LEN maximum length.
  • LE_BAD_PARAMETER bad eCall reference
  • LE_FAULT for other failures
Note
On failure, the process exits; you don't have to worry about checking the returned reference for validity.
Parameters
[in]ecallRefeCall reference
[in]msdPtrthe prepared MSD
[in]msdNumElements
void le_ecall_RemoveStateChangeHandler ( le_ecall_StateChangeHandlerRef_t  addHandlerRef)

Remove handler function for EVENT 'le_ecall_StateChange'

Parameters
[in]addHandlerRef
le_result_t le_ecall_ResetMsdEraGlonassCrashInfo ( le_ecall_CallRef_t  ecallRef)

Reset the ERA-GLONASS crash type bit mask. Optional parameter is not included in the MSD message.

Returns
  • LE_OK on success
  • LE_DUPLICATE an MSD has been already imported
  • LE_BAD_PARAMETER bad eCall reference
Parameters
[in]ecallRefeCall reference
le_result_t le_ecall_ResetMsdEraGlonassCrashSeverity ( le_ecall_CallRef_t  ecallRef)

Reset the ERA-GLONASS crash severity parameter. Therefore that optional parameter is not included in the MSD message.

Returns
  • LE_OK on success
  • LE_DUPLICATE an MSD has been already imported
  • LE_BAD_PARAMETER bad eCall reference
Parameters
[in]ecallRefeCall reference
le_result_t le_ecall_ResetMsdEraGlonassDiagnosticResult ( le_ecall_CallRef_t  ecallRef)

Reset the ERA-GLONASS diagnostic result bit mask. Optional parameter is not included in the MSD message.

Returns
  • LE_OK on success
  • LE_DUPLICATE an MSD has been already imported
  • LE_BAD_PARAMETER bad eCall reference
Parameters
[in]ecallRefeCall reference
le_result_t le_ecall_SendMsd ( le_ecall_CallRef_t  ecallRef)

Send the MSD.

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER bad eCall reference
  • LE_FAULT for other failures
Note
On failure, the process exits, so you don't have to worry about checking the returned reference for validity.
Parameters
[in]ecallRefeCall reference
le_result_t le_ecall_SetEraGlonassAutoDialAttempts ( uint16_t  attempts)

Set tthe AUTO_DIAL_ATTEMPTS value. If a dial attempt under automatic emergency call initiation failed, it should be repeated maximally ECALL_AUTO_DIAL_ATTEMPTS-1 times within the maximal time limit of ECALL_DIAL_DURATION. The default value is 10. Redial attempts stop once the call has been cleared down correctly, or if counter/timer reached their limits.

Returns
  • LE_OK on success
  • LE_FAULT on failure
Parameters
[in]attemptsthe AUTO_DIAL_ATTEMPTS value
le_result_t le_ecall_SetEraGlonassDialDuration ( uint16_t  duration)

Set the ECALL_DIAL_DURATION time. It's the maximum time the IVS have to connect the emergency call to the PSAP, including all redial attempts. If the call is not connected within this time (or ManualDialAttempts/AutoDialAttempts dial attempts), it will stop.

Returns
  • LE_OK on success
  • LE_FAULT on failure
Parameters
[in]durationthe ECALL_DIAL_DURATION time value (in seconds)
le_result_t le_ecall_SetEraGlonassManualDialAttempts ( uint16_t  attempts)

Set the MANUAL_DIAL_ATTEMPTS value. If a dial attempt under manual emergency call initiation failed, it should be repeated maximally ECALL_MANUAL_DIAL_ATTEMPTS-1 times within the maximal time limit of ECALL_DIAL_DURATION. The default value is 10. Redial attempts stop once the call has been cleared down correctly, or if counter/timer reached their limits.

Returns
  • LE_OK on success
  • LE_FAULT on failure
Parameters
[in]attemptsthe MANUAL_DIAL_ATTEMPTS value
le_result_t le_ecall_SetIntervalBetweenDialAttempts ( uint16_t  pause)

Set the minimum interval value between dial attempts.

Returns
  • LE_OK on success
  • LE_FAULT for other failures
Parameters
[in]pausethe minimum interval value in seconds
le_result_t le_ecall_SetMsdEraGlonassCrashInfo ( le_ecall_CallRef_t  ecallRef,
le_ecall_CrashInfoBitMask_t  crashInfoMask 
)

Set the ERA-GLONASS crash type bit mask

Returns
  • LE_OK on success
  • LE_DUPLICATE an MSD has been already imported
  • LE_BAD_PARAMETER bad eCall reference
Parameters
[in]ecallRefeCall reference
[in]crashInfoMaskERA-GLONASS crash type bit mask.
le_result_t le_ecall_SetMsdEraGlonassCrashSeverity ( le_ecall_CallRef_t  ecallRef,
uint32_t  crashSeverity 
)

Set the ERA-GLONASS crash severity parameter.

Returns
  • LE_OK on success
  • LE_DUPLICATE an MSD has been already imported
  • LE_BAD_PARAMETER bad eCall reference
Parameters
[in]ecallRefeCall reference
[in]crashSeveritythe ERA-GLONASS crash severity parameter
le_result_t le_ecall_SetMsdEraGlonassDiagnosticResult ( le_ecall_CallRef_t  ecallRef,
le_ecall_DiagnosticResultBitMask_t  diagnosticResultMask 
)

Set the ERA-GLONASS diagnostic result using a bit mask.

Returns
  • LE_OK on success
  • LE_DUPLICATE an MSD has been already imported
  • LE_BAD_PARAMETER bad eCall reference
Parameters
[in]ecallRefeCall reference
[in]diagnosticResultMaskERA-GLONASS diagnostic result bit mask.
le_result_t le_ecall_SetMsdPassengersCount ( le_ecall_CallRef_t  ecallRef,
uint32_t  paxCount 
)

Set the number of passengers transmitted by the MSD.

Returns
  • LE_OK on success
  • LE_DUPLICATE an MSD has been already imported
  • LE_BAD_PARAMETER bad eCall reference
Note
The process exits, if an invalid eCall reference is given
Parameters
[in]ecallRefeCall reference
[in]paxCountnumber of passengers
le_result_t le_ecall_SetMsdPosition ( le_ecall_CallRef_t  ecallRef,
bool  isTrusted,
int32_t  latitude,
int32_t  longitude,
int32_t  direction 
)

Set the position transmitted by the MSD.

Returns
  • LE_OK on success
  • LE_DUPLICATE an MSD has been already imported
  • LE_BAD_PARAMETER bad input parameter
  • LE_FAULT on other failures
Note
The process exits, if an invalid eCall reference is given
Parameters
[in]ecallRefeCall reference
[in]isTrustedtrue if the position is accurate, false otherwise
[in]latitudelatitude in degrees with 6 decimal places, positive North. Maximum value is +90 degrees (+90000000), minimum value is -90 degrees (-90000000).
[in]longitudelongitude in degrees with 6 decimal places, positive East. Maximum value is +180 degrees (+180000000), minimum value is -180 degrees (-180000000).
[in]directiondirection of the vehicle from magnetic north (0 to 358, clockwise) in 2-degrees unit. Valid range is 0 to 179. If direction of travel is invalid or unknown, the value 0xFF shall be used.
le_result_t le_ecall_SetMsdTxMode ( le_ecall_MsdTxMode_t  mode)

Set the push/pull transmission mode.

Returns
  • LE_OK on success
  • LE_FAULT for other failures
Parameters
[in]modeTransmission mode
le_result_t le_ecall_SetNadDeregistrationTime ( uint16_t  deregTime)

Set the NAD_DEREGISTRATION_TIME value. After termination of an emergency call the in-vehicle system remains registered on the network for the period of time, defined by the installation parameter NAD_DEREGISTRATION_TIME.

Returns
  • LE_OK on success
  • LE_FAULT on failure
Parameters
[in]deregTimethe NAD_DEREGISTRATION_TIME value (in minutes).
le_result_t le_ecall_SetPsapNumber ( const char *  psap)

Set the Public Safely Answering Point telephone number.

Note
That PSAP number is not applied to Manually or Automatically initiated eCall. For those modes, an emergency call is launched.
Warning
This function doesn't modified the U/SIM content.
Returns
  • LE_OK on success
  • LE_FAULT for other failures
Note
If PSAP number is too long (max LE_MDMDEFS_PHONE_NUM_MAX_LEN digits), it is a fatal error, the function will not return.
Parameters
[in]psapPublic Safely Answering Point number
le_result_t le_ecall_StartAutomatic ( le_ecall_CallRef_t  ecallRef)

Start an automatic eCall session

Returns
  • LE_OK on success
  • LE_BUSY an eCall session is already in progress
  • LE_BAD_PARAMETER bad eCall reference
  • LE_FAULT for other failures
Note
The process exits, if an invalid eCall reference is given
Parameters
[in]ecallRefeCall reference
le_result_t le_ecall_StartManual ( le_ecall_CallRef_t  ecallRef)

Start a manual eCall session

Returns
  • LE_OK on success
  • LE_BUSY an eCall session is already in progress
  • LE_BAD_PARAMETER bad eCall reference
  • LE_FAULT for other failures
Note
The process exits, if an invalid eCall reference is given
Parameters
[in]ecallRefeCall reference
le_result_t le_ecall_StartTest ( le_ecall_CallRef_t  ecallRef)

Start a test eCall session

Returns
  • LE_OK on success
  • LE_BUSY an eCall session is already in progress
  • LE_BAD_PARAMETER bad eCall reference
  • LE_FAULT for other failures
Note
The process exits, if an invalid eCall reference is given
Parameters
[in]ecallRefeCall reference
le_result_t le_ecall_UseUSimNumbers ( void  )

This function can be recalled to indicate the modem to read the number to dial from the FDN/SDN of the U/SIM, depending upon the eCall operating mode.

Returns
  • LE_OK on success
  • LE_FAULT for other failures