Snapdragon® Telematics Application Framework (TelAF) Interface Specification
|
#include "legato.h"
#include "taf_types_interface.h"
#include "taf_sim_interface.h"
#include "taf_ecall_common.h"
Go to the source code of this file.
Typedefs | |
typedef void(* | taf_ecall_DisconnectHandler_t) (void *) |
typedef void(* taf_ecall_DisconnectHandler_t) (void *) |
Type for handler called when a server disconnects.
void taf_ecall_ConnectService | ( | void | ) |
Connect the current client thread to the service providing this API. Block until the service is available.
For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see apiFilesC_client.
This function is created automatically.
le_result_t taf_ecall_TryConnectService | ( | void | ) |
Try to connect the current client thread to the service providing this API. Return with an error if the service is not available.
For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see apiFilesC_client.
This function is created automatically.
LE_FULL_API void taf_ecall_SetServerDisconnectHandler | ( | taf_ecall_DisconnectHandler_t | disconnectHandler, |
void * | contextPtr | ||
) |
Set handler called when server disconnection is detected.
When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants to continue without exiting, it should call longjmp() from inside the handler.
LE_FULL_API void taf_ecall_SetNonExitServerDisconnectHandler | ( | taf_ecall_DisconnectHandler_t | disconnectHandler, |
void * | contextPtr | ||
) |
Set handler called when server disconnection is detected without exiting.
When a server connection is lost, call this handler without exit.
void taf_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 apiFilesC_client.
This function is created automatically.
taf_ecall_StateChangeHandlerRef_t taf_ecall_AddStateChangeHandler | ( | taf_ecall_StateChangeHandlerFunc_t | handlerPtr, |
void * | contextPtr | ||
) |
Add handler function for EVENT 'taf_ecall_StateChange'
eCall state change event handler.
[in] | handlerPtr | State change handler for emergency calls. |
[in] | contextPtr |
void taf_ecall_RemoveStateChangeHandler | ( | taf_ecall_StateChangeHandlerRef_t | handlerRef | ) |
Remove handler function for EVENT 'taf_ecall_StateChange'
[in] | handlerRef |
taf_ecall_CallRef_t taf_ecall_Create | ( | void | ) |
Creates an eCall reference.
void taf_ecall_Delete | ( | taf_ecall_CallRef_t | ecallRef | ) |
Releases (frees) a call reference according to the given eCall reference.
[in] | ecallRef | Emergency call reference. |
le_result_t taf_ecall_ForceOnlyMode | ( | uint8_t | phoneId | ) |
Switches to eCall only mode according to the given phone ID.
[in] | phoneId | Phone ID. |
le_result_t taf_ecall_ForcePersistentOnlyMode | ( | uint8_t | phoneId | ) |
Switches to persistent eCall Only mode according to the given phone ID.
[in] | phoneId | Phone ID. |
le_result_t taf_ecall_ExitOnlyMode | ( | uint8_t | phoneId | ) |
Exits eCall Only mode and switches to Normal mode according to the given phone ID.
[in] | phoneId | Phone ID. |
le_result_t taf_ecall_GetConfiguredOperationMode | ( | uint8_t | phoneId, |
taf_ecall_OpMode_t * | opModePtr | ||
) |
Gets the ecall operating mode according to the given phone ID.
[in] | phoneId | Phone ID. |
[out] | opModePtr | Operating mode. |
le_result_t taf_ecall_SetMsdVersion | ( | uint32_t | msdVersion | ) |
Sets the MSD version.
[in] | msdVersion |
le_result_t taf_ecall_GetMsdVersion | ( | uint32_t * | msdVerPtr | ) |
Gets the MSD version.
[out] | msdVerPtr | MSD version as output. |
le_result_t taf_ecall_SetVehicleType | ( | taf_ecall_MsdVehicleType_t | vehType | ) |
Sets the vehicle type.
[in] | vehType | Vehicle type. |
le_result_t taf_ecall_GetVehicleType | ( | taf_ecall_MsdVehicleType_t * | vehTypePtr | ) |
Get vehicle type.
[out] | vehTypePtr | Vehicle type as output. |
le_result_t taf_ecall_SetVIN | ( | const char *LE_NONNULL | vin | ) |
Sets the vehicle identification number.
[in] | vin | Vehicle identification number. |
le_result_t taf_ecall_GetVIN | ( | char * | vin, |
size_t | vinSize | ||
) |
Gets the vehicle identification number.
[out] | vin | Vehicle identification number as output. |
[in] | vinSize |
le_result_t taf_ecall_SetPropulsionType | ( | taf_ecall_PropulsionStorageType_t | propulsionType | ) |
Sets the vehicle propulsion storage type.
[in] | propulsionType | Vehicle propulsion storage type. |
le_result_t taf_ecall_GetPropulsionType | ( | taf_ecall_PropulsionStorageType_t * | propulsionTypePtr | ) |
Reads the vehicle propulsion storage type.
[out] | propulsionTypePtr | Vehicle propulsion storage type as output. |
le_result_t taf_ecall_SetMsdTxMode | ( | taf_ecall_MsdTransmissionMode_t | mode | ) |
Sets the MSD transmission mode. The API is not supported on this platform.
[in] | mode | MSD transmission mode. |
le_result_t taf_ecall_GetMsdTxMode | ( | taf_ecall_MsdTransmissionMode_t * | modePtr | ) |
Reads the MSD transmission mode. The API is not supported on this platform.
[out] | modePtr | MSD transmission mode as output. |
le_result_t taf_ecall_SetMsdPosition | ( | taf_ecall_CallRef_t | ecallRef, |
bool | isTrusted, | ||
int32_t | latitude, | ||
int32_t | longitude, | ||
int32_t | direction | ||
) |
Sets the latitude and longitude for MSD transmission.
[in] | ecallRef | SIM slot ID. |
[in] | isTrusted | Is trusted or not. |
[in] | latitude | Latitude value in ms. |
[in] | longitude | Longitude value in ms. |
[in] | direction | The direction of the vehicle from magnetic north (0 |
le_result_t taf_ecall_SetMsdPositionN1 | ( | taf_ecall_CallRef_t | ecallRef, |
int32_t | latitudeDeltaN1, | ||
int32_t | longitudeDeltaN1 | ||
) |
Sets the position delta N-1 for MSD transmission.
[in] | ecallRef | SIM slot ID. |
[in] | latitudeDeltaN1 | First latitude delta. 1 Unit = 100 miliarcseconds, which is approximately 3m maximum value: 511 = 0 0'51.100'' (+- 1580m) minimum value: -512 = -0 0'51.200'' (+- -1583m) |
[in] | longitudeDeltaN1 | First longitude delta. 1 Unit = 100 miliarcseconds, which is approximately 3m maximum value: 511 = 0 0'51.100'' (+- 1580m) minimum value: -512 = -0 0'51.200'' (+- -1583m) |
le_result_t taf_ecall_SetMsdPositionN2 | ( | taf_ecall_CallRef_t | ecallRef, |
int32_t | latitudeDeltaN2, | ||
int32_t | longitudeDeltaN2 | ||
) |
Sets the position delta N-2 for MSD transmission.
[in] | ecallRef | SIM slot ID. |
[in] | latitudeDeltaN2 | Second latitude delta. 1 Unit = 100 miliarcseconds, which is approximately 3m maximum value: 511 = 0 0'51.100'' (+- 1580m) minimum value: -512 = -0 0'51.200'' (+- -1583m) |
[in] | longitudeDeltaN2 | Second longitude delta. 1 Unit = 100 miliarcseconds, which is approximately 3m maximum value: 511 = 0 0'51.100'' (+- 1580m) minimum value: -512 = -0 0'51.200'' (+- -1583m) |
le_result_t taf_ecall_SetMsdPassengersCount | ( | taf_ecall_CallRef_t | ecallRef, |
uint32_t | passengersCount | ||
) |
Sets the number of passengers according to the given eCall reference.
[in] | ecallRef | SIM slot ID. |
[in] | passengersCount | Passenger count. |
le_result_t taf_ecall_SetMsdAdditionalData | ( | taf_ecall_CallRef_t | ecallRef, |
const char *LE_NONNULL | oid, | ||
const uint8_t * | dataPtr, | ||
size_t | dataSize | ||
) |
Sets the optional additional data for MSD transmission.
[in] | ecallRef | eCall reference. |
[in] | oid | Oid |
[in] | dataPtr | Data |
[in] | dataSize |
le_result_t taf_ecall_ResetMsdAdditionalData | ( | taf_ecall_CallRef_t | ecallRef | ) |
Resets the optional additional data for MSD transmission.
[in] | ecallRef | eCall reference. |
le_result_t taf_ecall_SetMsdEuroNCAPLocationOfImpact | ( | taf_ecall_CallRef_t | ecallRef, |
taf_ecall_IILocations_t | iiLocations | ||
) |
Sets the location of impact for Euro NCAP additional data.
[in] | ecallRef | eCall reference. |
[in] | iiLocations | Location of impact |
le_result_t taf_ecall_SetMsdEuroNCAPRolloverDetected | ( | taf_ecall_CallRef_t | ecallRef, |
bool | rolloverDetected | ||
) |
Sets the rollover detected for Euro NCAP additional data.
[in] | ecallRef | eCall reference. |
[in] | rolloverDetected | Rollover detected |
le_result_t taf_ecall_ResetMsdEuroNCAPRolloverDetected | ( | taf_ecall_CallRef_t | ecallRef | ) |
Resets the rollover detected for Euro NCAP additional data.
[in] | ecallRef | eCall reference. |
le_result_t taf_ecall_SetMsdEuroNCAPIIDeltaV | ( | taf_ecall_CallRef_t | ecallRef, |
uint8_t | rangeLimit, | ||
int16_t | deltaVX, | ||
int16_t | deltaVY | ||
) |
Sets the IIDeltaV for Euro NCAP additional data.
[in] | ecallRef | eCall reference. |
[in] | rangeLimit | Range limit |
[in] | deltaVX | DeltaVX |
[in] | deltaVY | DeltaVY |
le_result_t taf_ecall_ImportMsd | ( | taf_ecall_CallRef_t | ecallRef, |
const uint8_t * | msdPtr, | ||
size_t | msdSize | ||
) |
Imports the PDU MSD according to the given eCall reference. The maximum MSD length is 255 bytes for private eCall and 140 bytes for other eCall.
[in] | ecallRef | SIM slot ID. |
[in] | msdPtr | MSD. |
[in] | msdSize |
le_result_t taf_ecall_ExportMsd | ( | taf_ecall_CallRef_t | ecallRef, |
uint8_t * | msdPtr, | ||
size_t * | msdSizePtr | ||
) |
Exports the PDU MSD according to the given eCall reference.
[in] | ecallRef | SIM slot ID. |
[out] | msdPtr | MSD output. |
[in,out] | msdSizePtr |
le_result_t taf_ecall_SendMsd | ( | taf_ecall_CallRef_t | ecallRef | ) |
Updates the eCall MSD in modem to be sent to a Public Safety Answering Point (PSAP) when requested.
[in] | ecallRef | eCall reference. |
le_result_t taf_ecall_StartAutomatic | ( | taf_ecall_CallRef_t | ecallRef | ) |
Starts an automatic emergency call with a standard PAN European/KSA/UAE PSAP number(112/911/999) or a voice call with the long PSAP number by taf_ecall_SetPsapNumber() according to the given eCall reference.
[in] | ecallRef | eCall reference. |
le_result_t taf_ecall_StartManual | ( | taf_ecall_CallRef_t | ecallRef | ) |
Starts a manual emergency call with a standard PAN European/KSA/UAE PSAP number(112/911/999) or a voice call with the long PSAP number by taf_ecall_SetPsapNumber() according to the given eCall reference.
[in] | ecallRef | eCall reference. |
le_result_t taf_ecall_StartTest | ( | taf_ecall_CallRef_t | ecallRef | ) |
Starts a test eCall with a configured telephone number stored in the USIM or a long PSAP number set by taf_ecall_SetPsapNumber().
[in] | ecallRef | eCall reference. |
le_result_t taf_ecall_StartPrivate | ( | taf_ecall_CallRef_t | ecallRef, |
const char *LE_NONNULL | psap, | ||
const char *LE_NONNULL | contentType, | ||
const char *LE_NONNULL | acceptInfo | ||
) |
Initiates a private eCall.
[in] | ecallRef | eCall reference. |
[in] | psap | Public Safely Answering Point number. |
[in] | contentType | Type of data being transmitted and |
[in] | acceptInfo | SIP Accept header. The maximum length |
le_result_t taf_ecall_End | ( | taf_ecall_CallRef_t | ecallRef | ) |
Ends the ongoing eCall according to the given eCall reference.
[in] | ecallRef | eCall reference. |
le_result_t taf_ecall_Answer | ( | taf_ecall_CallRef_t | ecallRef | ) |
Answers the incoming eCall according to the given eCall reference.
[in] | ecallRef | eCall reference. |
taf_ecall_State_t taf_ecall_GetState | ( | taf_ecall_CallRef_t | ecallRef | ) |
Gets the currrent eCall state according to the given eCall reference.
[in] | ecallRef | eCall reference. |
taf_ecall_Type_t taf_ecall_GetType | ( | taf_ecall_CallRef_t | ecallRef | ) |
Gets the current eCall type according to the given eCall reference.
[in] | ecallRef | eCall reference. |
int32_t taf_ecall_GetPlatformSpecificTerminationCode | ( | taf_ecall_CallRef_t | ecallRef | ) |
Gets the platform-specific reason for a recently terminated call according to the given eCall reference.
[in] | ecallRef | eCall reference. |
taf_ecall_TerminationReason_t taf_ecall_GetTerminationReason | ( | taf_ecall_CallRef_t | ecallRef | ) |
Gets the end reason for a recently terminated eCall.
[in] | ecallRef | eCall reference. |
le_result_t taf_ecall_SetPsapNumber | ( | const char *LE_NONNULL | psap | ) |
Sets the public safely answering point (PSAP) phone number for eCall.
[in] | psap | Public Safely Answering Point number |
le_result_t taf_ecall_GetPsapNumber | ( | char * | psap, |
size_t | psapSize | ||
) |
Gets the PSAP number set with taf_ecall_SetPsapNumber().
[out] | psap | PSAP number. |
[in] | psapSize |
le_result_t taf_ecall_UseUSimNumbers | ( | void | ) |
Reads the FDN/SDN numbers from U/SIM to dial a test eCall when the modem is in TAF_ECALL_MODE_FORCED_PERSISTENT_ONLY or TAF_ECALL_MODE_ECALL.
le_result_t taf_ecall_SetNadDeregistrationTime | ( | uint16_t | deregTime | ) |
Sets the eCall deregistration time in NAD. After an emergency call ends the in-vehicle system stays registered with the network for a specific amount of time, defined by the NAD eCall deregistration time.
[in] | deregTime | The eCall deregistration time (in minutes). |
le_result_t taf_ecall_GetNadDeregistrationTime | ( | uint16_t * | deregTimePtr | ) |
Gets the eCall deregistration time of the NAD.
[out] | deregTimePtr | The eCall deregistration time (in minutes). |
le_result_t taf_ecall_TerminateRegistration | ( | void | ) |
Disconnects the NAD from the eCall network. After an emergency call ends the in-vehicle system stays registered with the network for a period of time to facilate callback from the PSAP, but when NAD requires to deregister from the network this API can be used.
le_result_t taf_ecall_SetNadClearDownFallbackTime | ( | uint16_t | ccftTime | ) |
Sets the eCall clear down fallback time of the NAD. If the NAD does not receive a clear down indication from network or a clear down message (AL-ACK) from the PSAP during an ecall, then it will trigger an automatic call end when clear down fallback time out.
[in] | ccftTime | The eCall clear down fallback time (in minutes). |
le_result_t taf_ecall_GetNadClearDownFallbackTime | ( | uint16_t * | ccftTimePtr | ) |
Gets the eCall clear down fallback time of the NAD.
[out] | ccftTimePtr | The eCall clear down fallback time (in minutes). |
le_result_t taf_ecall_SetNadMinNetworkRegistrationTime | ( | uint16_t | minNwRegTime | ) |
Sets the eCall minimum network registration time of the NAD. After an eCall ends, the NAD shall remain registered on the serving network. During this time, the NAD can automatically receive calls from the PSAP.
[in] | minNwRegTime | The eCall minimum network registration time (in minutes). |
le_result_t taf_ecall_GetNadMinNetworkRegistrationTime | ( | uint16_t * | minNwRegTimePtr | ) |
Gets the eCall minimum network registration time of the NAD.
[out] | minNwRegTimePtr | The eCall minimum network registration time (in minutes). |
le_result_t taf_ecall_GetHlapTimerState | ( | taf_ecall_HlapTimerType_t | timer, |
taf_ecall_HlapTimerStatus_t * | timerStatusPtr, | ||
uint16_t * | elapsedTimePtr | ||
) |
Gets the eCall HLAP timer state of the NAD.
[in] | timer | HLAP timer Type. |
[out] | timerStatusPtr | The status of the HLAP timer. |
[out] | elapsedTimePtr | The elapsed time of the HLAP timer in unit of seconds. |