TTLServiceEventDelegate Protocol Reference

Conforms to NSObject
Declared in TTLServiceEventDelegate.h

Overview

Callback Delegate Protocol for communication from tomtom ubi service to the custom application.

This delegate protocol provides callbacks for any communication from the tomtom UBI service to the custom app. The tomtom UBI service is the piece of software that handles all communication between LINK device and a UBI backend server. It keeps an internal state, takes care of the initial activation of the LINK device and serves as a transport proxy for all data that need to be transmitted between LINK device and backend and vice versa.

All callbacks are scheduled on the main queue.

– onClockSyncReasonWhileDownloadRequired:

Clock sync needed while download driving data was requested.

- (void)onClockSyncReasonWhileDownloadRequired:(NSString *_Nonnull)deviceIdentifier

Discussion

Clock sync needed while download driving data was requested.

Called when the Service was initiated to download the driving the data from the LINK device but the device requested the synchronisation of the internal clock. The user has to enter a reason for the synchronisation of the clock. This is to track possible disconnects of the LINK device from the vehicle and why they happened.

The client has to call [TTLServiceClient sendClockSyncReasonForDownload:deviceIdentifier:] to continue the synchronisation process.

Declared In

TTLServiceEventDelegate.h

– onActivationStart:

Device activation was started.

- (void)onActivationStart:(NSString *_Nonnull)deviceIdentifier

Discussion

Device activation was started.

Called at every start of an activation process. For example this happens if the LINK device was not yet activated or after a firmware update has successfully been performed.

This can be used in the client to initialize the UI accordingly.

Declared In

TTLServiceEventDelegate.h

– onActivationSuccessful:

Device activation was finished and was successful.

- (void)onActivationSuccessful:(NSString *_Nonnull)deviceIdentifier

Discussion

Device activation was finished and was successful.

The resulting state of the LINK device activation is also prompted via [TTLServiceEventDelegate onServiceState:]

This can be used in the client to initialize the UI accordingly.

Declared In

TTLServiceEventDelegate.h

– onActivationFailed:reason:

Device activation was finished but was not was successful.

- (void)onActivationFailed:(NSString *_Nonnull)deviceIdentifier reason:(TTLServiceActivationFailedReason *_Nonnull)reason

Discussion

Device activation was finished but was not was successful.

The resulting state of the LINK device activation is also prompted via [TTLServiceEventDelegate onServiceState:]

This can be used in the client to initialize the UI accordingly.

Declared In

TTLServiceEventDelegate.h

– onClockSyncSuccessful:reason:

Event method called when clock Sync was successful.

- (void)onClockSyncSuccessful:(NSString *_Nonnull)deviceIdentifier reason:(TTLServiceClockSyncForActionResponse *_Nonnull)response

Discussion

Event method called when clock Sync was successful.

Declared In

TTLServiceEventDelegate.h

– onClockSyncFailed:reason:

Event method called when clock Sync was unsuccessful.

- (void)onClockSyncFailed:(NSString *_Nonnull)deviceIdentifier reason:(TTLServiceClockSyncFailedReason *_Nonnull)reason

Discussion

Event method called when clock Sync was unsuccessful.

Declared In

TTLServiceEventDelegate.h

– onCrashDetected:response:

- (void)onCrashDetected:(NSString *_Nonnull)deviceIdentifier response:(TTLServiceCrashDatagramResponse *_Nonnull)response

– onDeviceDidAppear:

Event method called when a LINK device becomes available (in terms of bluetooth accessories) to service.

- (void)onDeviceDidAppear:(NSString *_Nonnull)deviceIdentifier

Discussion

Event method called when a LINK device becomes available (in terms of bluetooth accessories) to service.

The contextual information is also provided with [onServiceState:].

Declared In

TTLServiceEventDelegate.h

– onDeviceDidDisappear:

Event method called when a LINK device becomes unavailable (in terms of bluetooth accessories) to service.

- (void)onDeviceDidDisappear:(NSString *_Nonnull)deviceIdentifier

Discussion

Event method called when a LINK device becomes unavailable (in terms of bluetooth accessories) to service.

The contextual information is also provided with [onServiceState:].

Declared In

TTLServiceEventDelegate.h

– onDeviceState:response:

Event method called when a LINK device was requested to deliver it’s device state.

- (void)onDeviceState:(NSString *_Nonnull)deviceIdentifier response:(TTLServiceDeviceStateResponse *_Nonnull)response

Discussion

Event method called when a LINK device was requested to deliver it’s device state.

Declared In

TTLServiceEventDelegate.h

– onDownloadStatusUpdate:response:

Event method called when a download (LINK => smart phone => UBI Server) is in progress.

- (void)onDownloadStatusUpdate:(NSString *_Nonnull)deviceIdentifier response:(TTLServiceDownloadStatusResponse *_Nonnull)downloadStateResponse

Discussion

Event method called when a download (LINK => smart phone => UBI Server) is in progress.

The the progress of the transfer between device and smart phone can be monitored with this event. The upload of the data will happen automatically when a connection to the backend service was established. This upload progress cannot be monitored but the end of it will be signaled.

See TTLServiceDownloadStatusResponse and its properties on how the different states of the download process are handled.

Declared In

TTLServiceEventDelegate.h

– onDTCList:response:

Called after the client requested a list of current DTC’s recorded by the LINK device. The request is made via [TTLServiceClient requestDTCList:].

- (void)onDTCList:(NSString *_Nonnull)deviceIdentifier response:(TTLServiceDTCListResponse *_Nonnull)response

Discussion

Called after the client requested a list of current DTC’s recorded by the LINK device. The request is made via [TTLServiceClient requestDTCList:].

Declared In

TTLServiceEventDelegate.h

– onEngineUpdateStatusUpdate:response:

Called when the state of the engine changes and updates on the engine states are activated.

- (void)onEngineUpdateStatusUpdate:(NSString *_Nonnull)deviceIdentifier response:(TTLServiceEngineStatusResponse *_Nonnull)response

Discussion

Called when the state of the engine changes and updates on the engine states are activated.

Declared In

TTLServiceEventDelegate.h

– onFirmwareUpdateStatusUpdate:response:

Called on every status update of an ongoing firmware update.

- (void)onFirmwareUpdateStatusUpdate:(NSString *_Nonnull)deviceIdentifier response:(TTLServiceFirmwareUpdateStatusResponse *_Nonnull)response

Discussion

Called on every status update of an ongoing firmware update.

Declared In

TTLServiceEventDelegate.h

– onFirmwareUpdateAvailable:response:

Called when a firmware update is available on the server.

- (void)onFirmwareUpdateAvailable:(NSString *_Nonnull)deviceIdentifier response:(TTLServiceFirmwareUpdateAvailableResponse *_Nonnull)response

Discussion

Called when a firmware update is available on the server.

TTLServiceFirmwareUpdateAvailableResponse contains the required data for creating a TTLServiceFirmwareUpdateParameter. It also provides some convenience methods to do that. With TTLServiceFirmwareUpdateParameter you can call [TTLServiceClient updateFirmware:deviceIdentifier:] to start the firmware update.

The status and progress of the firmware update is reported via [TTLServiceEventDelegate onFirmwareUpdateStatusUpdate:response:].

Declared In

TTLServiceEventDelegate.h

– onOdometerChange:response:

Called after the client tried to changed the odometer in the dongle via [TTLServiceClient changeOdometer:deviceIdentifier:].

- (void)onOdometerChange:(NSString *_Nonnull)deviceIdentifier response:(TTLServiceOdometerChangeResponse *_Nonnull)response

Discussion

Called after the client tried to changed the odometer in the dongle via [TTLServiceClient changeOdometer:deviceIdentifier:].

Declared In

TTLServiceEventDelegate.h

– onServerConnectionFailed:reason:

Convenience callback to recognize if a connection to the backend service failed.

- (void)onServerConnectionFailed:(NSString *_Nonnull)deviceIdentifier reason:(TTLServiceServerConnectionFailedReason *_Nonnull)reason

Discussion

Convenience callback to recognize if a connection to the backend service failed.

This event indicates that a connection to the backend service failed. The reason for the failure is transported via TTLServiceServerConnectionFailedReason. This is not called if a successful established connections goes down for whatever reason. So when [TTLServiceEventDelegate onServerConnectionSuccessful:] was called, this won’t be called for the current attempt to connect.

Declared In

TTLServiceEventDelegate.h

– onServerConnectionSuccessful:

Convenience callback to recognize if a connection to the backend service was established successfully.

- (void)onServerConnectionSuccessful:(NSString *_Nonnull)deviceIdentifier

Discussion

Convenience callback to recognize if a connection to the backend service was established successfully.

This event indicates that a connection was established successfully and that an initial handshake was successful as well. However, be aware that a disconnect can happen at any time. Currently a disconnect is populated vi [TTLServiceEventDelegate onServiceState:]

This is also called, when a connection is in place and [TTLServiceClient connectToServer:] is called.

Declared In

TTLServiceEventDelegate.h

– onServiceState:

Called when the service state changes or the state of the service was requested via [TTLServiceClient requestServiceState].

- (void)onServiceState:(NSArray<TTLServiceStateResponse*> *_Nonnull)serviceStates

Parameters

serviceStates

An array of TTLServiceStateResponse.

Discussion

Called when the service state changes or the state of the service was requested via [TTLServiceClient requestServiceState].

The System preserves a state of basically all assets connected to the smart phone. This means the LINK devices and the UBI backend server. See TTLServiceStateResponse for more concrete description what the state is.

Since the system works LINK device centric, a separate state is provided for every LINK known to the Application.

The system always delivers states for all know LINK devices, even if there is no change. It is up to the application to figure out what has changed.

Declared In

TTLServiceEventDelegate.h

– onTransmission:response:

- (void)onTransmission:(NSString *_Nonnull)deviceIdentifier response:(TTLServiceTransmissionResponse *_Nonnull)response