Skip to content

General Events

Info

This document is a work in progress.

Currently, User events contain below events, still working in progress:

  • General Events
    • FatalError Event - Should be sent by HMI/application when a fatal error occurs.
    • SystemError Event - Should be sent by HMI/application when a system error occurs.
    • CustomEvent Event - Should be sent by HMI when user wants to send a customized event with user-defined key-value attributes.

General Events

FatalError Event

Should be sent by HMI/application when a fatal error occurs

Key methods

Method Details
setDbContent(String db_content) Set the database content, mandatory data field.
setTransactionTag(String transaction_tag) Set the change set returned by data service, mandatory data field.
setSpaceTransactionList(SpaceTransactionListItem[] space_transaction_list) Set List of space_id and transaction_tag pair. For each space id corresponding transaction_tag, mandatory data field.
setBaseTransactionTag(String base_transaction_tag) Set Base data transaction_tag (contains data version (e.g. 17Q2) + region + compile format ++), mandatory data field.


Sample code

1
2
3
4
5
6
7
8
SendEventRequest.Builder builder = dataCollectorClient.sendEventRequest();
SendEventResponse response = builder
        .setEvent(FatalErrorEvent.builder()
            .setDbContent("DbContent")
            .setTransactionTag("TransactionTag")
            .setSpaceTransactionList(new SpaceTransactionListItem[] {SpaceTransactionListItem.builder().setSpaceId("id").setTransactionTag("tag").build()})
            .setBaseTransactionTag("BaseTransactionTag")
        .build()).build().execute();
1
2
3
4
5
6
7
var builder = dataCollectorClient.sendEventRequest();
var response = builder
        .setEvent(FatalErrorEvent.builder()
        .setTransactionTag("TransactionTag")
        .setSpaceTransactionList(arrayOf(SpaceTransactionListItem.builder().setSpaceId("id").setTransactionTag("tag").build()))
        .setBaseTransactionTag("BaseTransactionTag")
        .build()).build().execute()

Response example

1
2
3
4
5
{
  "code": "SUCCESS",
  "message": "SendEventResponse Success",
  "response_time": 1
}

SystemError Event

Should be sent by HMI/application when a system error occurs.

Key methods

Method Details
setTrigger(SystemErrorTrigger trigger) Set Trigger for the event, mandatory data field.
setType(String type) Set Additional information related to trigger. Send when trigger is one of these: SEARCH_REQUEST_TIMEOUT,ROUTE_REQUEST_TIMEOUT,NAV_REQUEST_TIMEOUT. TBD define as enum, mandatory data field.
setStatusCode(Integer status_code) Set to raw longitude, optional data field.
enum index SystemErrorTrigger
0 SEARCH_REQUEST_TIMEOUT
1 ROUTE_REQUEST_TIMEOUT
2 NAV_REQUEST_TIMEOUT
3 SYSTEM_CRASH
4 GPS_WEAK
5 GPS_LOST
6 CONNECTIVITY_QUALITY_LOW
7 CONNECTIVITY_LOST
8 BLUETOOTH_ERROR
9 HEADUNIT_BT_CONN_ERROR
10 HEADUNIT_USB_CONN_ERROR
11 SEARCH_REQUEST_INVALID
12 SEARCH_REQUEST_FAILED
13 ROUTE_REQUEST_NO_ROUTE_FOUND
14 ADM_DOWNLOAD_FAILED


Sample code

1
2
3
4
5
SendEventRequest.Builder builder = dataCollectorClient.sendEventRequest();
SendEventResponse response = builder
        .setEvent(SystemErrorEvent.builder().setTrigger(SystemErrorTrigger.SYSTEM_CRASH)
        .setType("type")
        .build()).build().execute();
1
2
3
4
5
var builder = dataCollectorClient.sendEventRequest()
var response = builder
        .setEvent(SystemErrorEvent.builder().setTrigger(SystemErrorTrigger.SYSTEM_CRASH)
        .setType("type")
        .build()).build().execute()

Response example

1
2
3
4
5
{
  "code": "SUCCESS",
  "message": "SendEventResponse Success",
  "response_time": 1
}

CustomEvent Event

Should be sent by HMI when user wants to send a customized event with user-defined key-value attributes.

Key methods

Method Details
setCustomEventName(String custom_event_name) Set the name of the event being logged by an internal application, mandatory data field.
setCustomEventProperties(T custom_event_properties) Set the properties of the custom event being logged, mandatory data field.


Sample code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
static class CustomEventProperty {
    public final String property1;
    public final String property2;
    public final Integer integer1;
    public CustomEventProperty(String property1, String property2, Integer integer1) {
        this.property1 = property1;
        this.property2 = property2;
        this.integer1 = integer1;
    }
}
SendEventRequest.Builder builder = dataCollectorClient.sendEventRequest();
SendEventResponse response = builder
    .setEvent(new CustomEvent.Builder<CustomEventProperty>()
    .setCustomEventName("CustomEventProperty")
    .setCustomEventProperties(new CustomEventProperty("value1", "value2", 7))
    .build()).build().execute();
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
class CustomEventProperty {
    var name: String = "property1"
    var url: String = "property2"
}
var builder = dataCollectorClient.sendEventRequest();
var response = builder
    .setEvent(CustomEvent.Builder<CustomEventProperty>()
    .setCustomEventName("CustomEventProperty")
    .setCustomEventProperties(new CustomEventProperty("value1", "value2", 7))
    .build()).build().execute()

Response example

1
2
3
4
5
{
  "code": "SUCCESS",
  "message": "SendEventResponse Success",
  "response_time": 1
}