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) |
Legato eCall include file.
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
#define LE_ECALL_MSD_MAX_LEN 140 |
MSD message length in bytes.
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.
ecallRef | eCall reference |
state | eCall state |
contextPtr |
typedef struct le_ecall_StateChangeHandler* le_ecall_StateChangeHandlerRef_t |
Reference type used by Add/Remove functions for EVENT 'le_ecall_StateChange'
Crash information Bit Mask (16 bits) indicating the type of road accident.
Diagnostic result Bit Mask (64 bits)
enum le_ecall_MsdTxMode_t |
enum le_ecall_OpMode_t |
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. |
enum le_ecall_State_t |
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_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.
[in] | handlerPtr | |
[in] | contextPtr |
void le_ecall_ConnectService | ( | void | ) |
Connect the client to the service
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.
void le_ecall_Delete | ( | le_ecall_CallRef_t | ecallRef | ) |
Call to free up a call reference.
[in] | ecallRef | eCall reference |
void le_ecall_DisconnectService | ( | void | ) |
Disconnect the client from the service
le_result_t le_ecall_End | ( | le_ecall_CallRef_t | ecallRef | ) |
End the current eCall session
[in] | ecallRef | eCall 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.
le_result_t le_ecall_ExportMsd | ( | le_ecall_CallRef_t | ecallRef, |
uint8_t * | msdPtr, | ||
size_t * | msdNumElementsPtr | ||
) |
Export the encoded MSD.
[in] | ecallRef | eCall reference |
[out] | msdPtr | the 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.
le_result_t le_ecall_ForcePersistentOnlyMode | ( | void | ) |
Same as le_ecall_ForceOnlyMode(), but the change persists over power cycles.
le_result_t le_ecall_GetConfiguredOperationMode | ( | le_ecall_OpMode_t * | opModePtr | ) |
Get the configured Operation mode.
[out] | opModePtr | Operation mode |
le_result_t le_ecall_GetEraGlonassAutoDialAttempts | ( | uint16_t * | attemptsPtr | ) |
Get the AUTO_DIAL_ATTEMPTS value.
[out] | attemptsPtr | the AUTO_DIAL_ATTEMPTS value |
le_result_t le_ecall_GetEraGlonassDialDuration | ( | uint16_t * | durationPtr | ) |
Get the ECALL_DIAL_DURATION time.
[out] | durationPtr | the ECALL_DIAL_DURATION time value (in seconds) |
le_result_t le_ecall_GetEraGlonassManualDialAttempts | ( | uint16_t * | attemptsPtr | ) |
Get the MANUAL_DIAL_ATTEMPTS value.
[out] | attemptsPtr | the MANUAL_DIAL_ATTEMPTS value |
le_result_t le_ecall_GetIntervalBetweenDialAttempts | ( | uint16_t * | pausePtr | ) |
Get the minimum interval value between dial attempts.
[out] | pausePtr | the minimum interval value in seconds |
le_result_t le_ecall_GetMsdTxMode | ( | le_ecall_MsdTxMode_t * | modePtr | ) |
Get the push/pull transmission mode.
[out] | modePtr | Transmission mode |
le_result_t le_ecall_GetNadDeregistrationTime | ( | uint16_t * | deregTimePtr | ) |
Get the NAD_DEREGISTRATION_TIME value.
[out] | deregTimePtr | the NAD_DEREGISTRATION_TIME value (in minutes). |
int32_t le_ecall_GetPlatformSpecificTerminationCode | ( | le_ecall_CallRef_t | ecallRef | ) |
Called to get the platform specific termination code.
[in] | ecallRef | eCall 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.
[out] | psap | Public 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
[in] | ecallRef | eCall reference |
le_mcc_TerminationReason_t le_ecall_GetTerminationReason | ( | le_ecall_CallRef_t | ecallRef | ) |
Called to get the termination reason.
[in] | ecallRef | eCall 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.
[in] | ecallRef | eCall reference |
[in] | msdPtr | the prepared MSD |
[in] | msdNumElements |
void le_ecall_RemoveStateChangeHandler | ( | le_ecall_StateChangeHandlerRef_t | addHandlerRef | ) |
Remove handler function for EVENT 'le_ecall_StateChange'
[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.
[in] | ecallRef | eCall 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.
[in] | ecallRef | eCall 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.
[in] | ecallRef | eCall reference |
le_result_t le_ecall_SendMsd | ( | le_ecall_CallRef_t | ecallRef | ) |
Send the MSD.
[in] | ecallRef | eCall 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.
[in] | attempts | the 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.
[in] | duration | the 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.
[in] | attempts | the MANUAL_DIAL_ATTEMPTS value |
le_result_t le_ecall_SetIntervalBetweenDialAttempts | ( | uint16_t | pause | ) |
Set the minimum interval value between dial attempts.
[in] | pause | the 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
[in] | ecallRef | eCall reference |
[in] | crashInfoMask | ERA-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.
[in] | ecallRef | eCall reference |
[in] | crashSeverity | the 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.
[in] | ecallRef | eCall reference |
[in] | diagnosticResultMask | ERA-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.
[in] | ecallRef | eCall reference |
[in] | paxCount | number 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.
[in] | ecallRef | eCall reference |
[in] | isTrusted | true if the position is accurate, false otherwise |
[in] | latitude | latitude in degrees with 6 decimal places, positive North |
[in] | longitude | longitude in degrees with 6 decimal places, positive East |
[in] | direction | direction in degrees (where 0 is True North) |
le_result_t le_ecall_SetMsdTxMode | ( | le_ecall_MsdTxMode_t | mode | ) |
Set the push/pull transmission mode.
[in] | mode | Transmission 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.
[in] | deregTime | the NAD_DEREGISTRATION_TIME value (in minutes). |
le_result_t le_ecall_SetPsapNumber | ( | const char * | psap | ) |
Set the Public Safely Answering Point telephone number.
[in] | psap | Public Safely Answering Point number |
le_result_t le_ecall_StartAutomatic | ( | le_ecall_CallRef_t | ecallRef | ) |
Start an automatic eCall session
[in] | ecallRef | eCall reference |
le_result_t le_ecall_StartManual | ( | le_ecall_CallRef_t | ecallRef | ) |
Start a manual eCall session
[in] | ecallRef | eCall reference |
le_result_t le_ecall_StartTest | ( | le_ecall_CallRef_t | ecallRef | ) |
Start a test eCall session
[in] | ecallRef | eCall 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.