Skip to content

Sensor Events

Info

This document is a work in progress.

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

  • Sensor Events
    • AcceleratorPedal Event - Should be sent when updates on accelerator pedal from the sensor.
    • BrakingDecel Event - Should be sent when updates on braking deceleration from the sensor.
    • EngineLoad Event - Should be sent when updates on current engine load in percentage for the sensor.
    • EngineSpeed Event - Should be sent when updates on current engine rotations per minute in the range from the sensor.
    • FuelLevel Event - Should be sent when updates on current fuel level, in percentage from the sensor.
    • GpsProbe Event - HMI/Application should send gps data at specified frequency with the "GPS_PROBE" event all the time after engine start.
    • RelativeAcceleratorPedal Event - Should be sent when updates on current relative accelerator pedal from the sensor.
    • RuntimeSinceEngineStart Event - Should be sent when updates on UTC timestamp in seconds since engine started, in seconds.
    • VehicleSpeed Event - Should be sent when updates on vehicle speed in meters per second from the sensor.

Sensor Events

AcceleratorPedal Event

Should be sent when updates on accelerator pedal from the sensor.

Key methods

Method Details
setAcceleratorPedalList(AcceleratorPedalItem[] accelerator_pedal_list) List of List of AcceleratorPedalItem from sensor at periodic intervals, mandatory data field.

AcceleratorPedalItem

Key methods

Method Details
setPosition(Integer position) Set position in percentage, mandatory data field.
setTimestamp(Long timestamp) The time at which location was determined, mandatory data field.

Sample code

1
2
3
SendEventRequest.Builder builder = dataCollectorClient.sendEventRequest();
SendEventResponse response = builder.setEvent(AcceleratorPedalEvent.builder().setAcceleratorPedalList(new AcceleratorPedalItem[] { AcceleratorPedalItem.builder().setPosition(7).setTimestamp(1597029160173L).build()})
  .build()).build().execute();
1
2
3
var builder = dataCollectorClient.sendEventRequest();
var response = builder.setEvent(AcceleratorPedalEvent.builder().setAcceleratorPedalList(new AcceleratorPedalItem[] { AcceleratorPedalItem.builder().setPosition(7).setTimestamp(1597029160173L).build()})
  .build()).build().execute()

Response example

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

ASR Event

Should be sent when updates on current Anti-Slip Control status from the vehicle sensor.

Key methods

Method Details
setASRList(ASRItem[] asr_list) List of ASRItem items at periodic intervals, mandatory data field.

ASRItem

Key methods

Method Details
setActive(Boolean active) Set Anti-Slip Control / Traction Control System status, mandatory data field.
setTimestamp(Long timestamp) The time at which location was determined, mandatory data field.

Sample code

1
2
3
SendEventRequest.Builder builder = dataCollectorClient.sendEventRequest();
SendEventResponse response = builder.setEvent(ASREvent.builder().setASRList(new ASRItem[] { ASRItem.builder().setActive(true).setTimestamp(1597029160173L).build()})
  .build()).build().execute();
1
2
3
var builder = dataCollectorClient.sendEventRequest();
var response = builder.setEvent(ASREvent.builder().setASRList(new ASRItem[] { ASRItem.builder().setActive(true).setTimestamp(1597029160173L).build()})
  .build()).build().execute()

Response example

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

BrakingDecel Event

Should be sent when updates on braking deceleration from the sensor.

Key methods

Method Details
setBrakingDecelList(BrakingDecelItem[] braking_decel_list) List of BrakingDecelItem items at periodic intervals, mandatory data field.

BrakingDecelItem

Key methods

Method Details
setDeceleration(Double deceleration) Set vehicle braking deceleration value, mandatory data field.
setTimestamp(Long timestamp) The time at which location was determined, mandatory data field.

Sample code

1
2
3
SendEventRequest.Builder builder = dataCollectorClient.sendEventRequest();
SendEventResponse response = builder.setEvent(BrakingDecelEvent.builder().setBrakingDecelList(new BrakingDecelItem[] {BrakingDecelItem.builder().setDeceleration(1.0).setTimestamp(1597029160173L).build()})
    .build()).build().execute();
1
2
3
var builder = dataCollectorClient.sendEventRequest();
var response = builder.setEvent(BrakingDecelEvent.builder().setBrakingDecelList(new BrakingDecelItem[] {BrakingDecelItem.builder().setDeceleration(1.0).setTimestamp(1597029160173L).build()})
  .build()).build().execute()

Response example

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

EngineLoad Event

Should be sent when updates on current engine load in percentage for the sensor.

Key methods

Method Details
setEngineLoadList(EngineLoadItem[] engine_load_list) List of EngineLoadItem items at periodic intervals, mandatory data field.

EngineLoadItem

Key methods

Method Details
setValue(Double value) Set engine load in percentage, mandatory data field.
setTimestamp(Long timestamp) The time at which location was determined, mandatory data field.

Sample code

1
2
3
SendEventRequest.Builder builder = dataCollectorClient.sendEventRequest();
SendEventResponse response = builder.setEvent(EngineLoadEvent.builder().setEngineLoadList(new EngineLoadItem[] {EngineLoadItem.builder().setValue(1).setTimestamp(1597029160173L).build()})
  .build()).build().execute();
1
2
3
var builder = dataCollectorClient.sendEventRequest();
var response = builder.setEvent(EngineLoadEvent.builder().setEngineLoadList(new EngineLoadItem[] {EngineLoadItem.builder().setValue(1).setTimestamp(1597029160173L).build()})
  .build()).build().execute()

Response example

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

EngineSpeed Event

Should be sent when updates on current engine rotations per minute in the range from the sensor.

Key methods

Method Details
setEngineSpeedList(EngineSpeedItem[] engine_speed_list) List of EngineSpeedItem items at periodic intervals, mandatory data field.

EngineSpeedItem

Key methods

Method Details
setValue(Double value) Set engine engine rotations per minute, mandatory data field.
setTimestamp(Long timestamp) The time at which location was determined, mandatory data field.

Sample code

1
2
3
SendEventRequest.Builder builder = dataCollectorClient.sendEventRequest();
SendEventResponse response = builder.setEvent(EngineSpeedEvent.builder().setEngineSpeedList(new EngineSpeedItem[] {EngineSpeedItem.builder().setValue(100.0).setTimestamp(1597029160173L).build()})
    .build()).build().execute();
1
2
3
var builder = dataCollectorClient.sendEventRequest();
var response = builder.setEvent(EngineSpeedEvent.builder().setEngineSpeedList(new EngineSpeedItem[] {EngineSpeedItem.builder().setValue(100.0).setTimestamp(1597029160173L).build()})
    .build()).build().execute()

Response example

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

FuelLevel Event

Should be sent when updates on current fuel level, in percentage from the sensor.

Key methods

Method Details
setFuelLevelList(FuelLevelItem[] fuel_level_list) List of FuelLevelItem items at periodic intervals, mandatory data field.

FuelLevelItem

Key methods

Method Details
setValue(Double value) Set fuel level percentage value in percentage, mandatory data field.
setTimestamp(Long timestamp) The time at which location was determined, mandatory data field.

Sample code

1
2
3
SendEventRequest.Builder builder = dataCollectorClient.sendEventRequest();
SendEventResponse response = builder.setEvent(FuelLevelEvent.builder().setFuelLevelList(new FuelLevelItem[] {FuelLevelItem.builder().setValue(1.0).setTimestamp(1597029160173L).build()})
  .build()).build().execute();
1
2
3
var builder = dataCollectorClient.sendEventRequest();
var response = builder.setEvent(FuelLevelEvent.builder().setFuelLevelList(new FuelLevelItem[] {FuelLevelItem.builder().setValue(1.0).setTimestamp(1597029160173L).build()})
  .build()).build().execute()

Response example

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

GpsProbe Event

HMI/Application should send gps data at specified frequency with the "GPS_PROBE" event all the time after engine start.

Key methods

Method Details
setProbeList(ProbeListItem[] probe_list) List of ProbeListItem items at periodic intervals.

ProbeListItem

Key methods

Method Details
setLat(Double lat) Set to raw latitude, mandatory data field.
setLon(Double lon) Set to raw longitude, mandatory data field.
setAltitude(Double altitude) Set altitude, measured in meters, optional data field.
setSpeed(_Double speed) Set the instantaneous speed of the device in meters per second, optional data field.
setHorizontalAccuracy(Double horizontal_accuracy) Set the radius of uncertainty for the location, measured in meters, optional data field.
setVerticalAccuracy(Double vertical_accuracy) Set the accuracy of the altitude value in meters, optional data field.
setDirection(Heading heading) The direction in which the device is traveling must be enum Heading, optional data field.
setTimestamp(Long timestamp) The time at which location was determined, mandatory data field.
setHeadingAngle(Double heading_angle) The direction in which the device is traveling with respect no north, degree value(0-360), optional data field.
enum index Heading
0 N
1 NE
2 E
3 SE
4 S
5 SW
6 NW
7 W

Sample code

1
2
3
4
SendEventRequest.Builder builder = dataCollectorClient.sendEventRequest();
SendEventResponse response = builder.setEvent(GpsProbeEvent.builder().setProbeList(new ProbeListItem[]
{ProbeListItem.builder().setLat(37.123456).setLon(122.123456).setTimestamp(1597029160173L).build()})
    .build()) .build().execute();
1
2
3
var builder = dataCollectorClient.sendEventRequest();
var response = builder.setEvent(GpsProbeEvent.builder().setProbeList(arrayOf(ProbeListItem.builder().setLat(37.123456).setLon(122.123456).setTimestamp(1597029160173L).build())})
  .build()) .build().execute()

Response example

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

Ignition Event

Should be sent when updates on current ignition value from vehicle sensor.

Key methods

Method Details
setIgnitionList(IgnitionItem[] ignition_list) List of IgnitionItem items at periodic intervals, mandatory data field.

IgnitionItem

Key methods

Method Details
setStatus((Integer status) Set status of ignition(1 - OFF 2 - ACCESSORY 3 - RUN 4 - START), mandatory data field.
setTimestamp(Long timestamp) The time at which location was determined, mandatory data field.

Sample code

1
2
3
SendEventRequest.Builder builder = dataCollectorClient.sendEventRequest();
SendEventResponse response = builder.setEvent(IgnitionEvent.builder().setIgnitionList(new IgnitionItem[] {IgnitionItem.builder().setStatus(1).setTimestamp(1597029160173L).build()})
  .build()).build().execute();
1
2
3
var builder = dataCollectorClient.sendEventRequest();
var response = builder.setEvent(IgnitionEvent.builder().setIgnitionList(new IgnitionItem[] {IgnitionItem.builder().setStatus(1).setTimestamp(1597029160173L).build()})
  .build()).build().execute();

Response example

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

RelativeAcceleratorPedal Event

Should be sent when updates on current relative accelerator pedal from the sensor .

Key methods

Method Details
setRelativeAcceleratorPedalList(RelativeAcceleratorPedalItem[] relative_accelerator_pedal_list) List of RelativeAcceleratorPedalItem items at periodic intervals, mandatory data field.

RelativeAcceleratorPedalItem

Key methods

Method Details
setPosition(Integer position) Set position value in percentage, mandatory data field.
setTimestamp(Long timestamp) The time at which location was determined, mandatory data field.

Sample code

1
2
3
SendEventRequest.Builder builder = dataCollectorClient.sendEventRequest();
SendEventResponse response = builder.setEvent(RelativeAcceleratorPedalEvent.builder().setRelativeAcceleratorPedalList(new RelativeAcceleratorPedalItem[] {RelativeAcceleratorPedalItem.builder().setPosition(77).setTimestamp(1597029160173L).build()})
  .build()).build().execute();
1
2
3
var builder = dataCollectorClient.sendEventRequest();
var response = builder.setEvent(RelativeAcceleratorPedalEvent.builder().setRelativeAcceleratorPedalList(new RelativeAcceleratorPedalItem[] {RelativeAcceleratorPedalItem.builder().setPosition(77).setTimestamp(1597029160173L).build()})
  .build()).build().execute();

Response example

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

RuntimeSinceEngineStart Event

Should be sent when updates on UTC timestamp in seconds since engine started, in seconds.

Key methods

Method Details
setRuntimeSinceEngineStartList(RuntimeSinceEngineStartItem[] runtime_since_engine_start_list) List of RuntimeSinceEngineStartItem items at periodic intervals, mandatory data field.

RuntimeSinceEngineStartItem

Key methods

Method Details
setValue(Double value) Set UTC timestamp in seconds since engine started in seconds, mandatory data field.
setTimestamp(Long timestamp) The time at which location was determined, mandatory data field.

Sample code

1
2
3
SendEventRequest.Builder builder = dataCollectorClient.sendEventRequest();
SendEventResponse response = builder.setEvent(RuntimeSinceEngineStartEvent.builder().setRuntimeSinceEngineStartList(new RuntimeSinceEngineStartItem[] {RuntimeSinceEngineStartItem.builder().setValue(77).setTimestamp(1597029160173L).build()})
  .build()).build().execute();
1
2
3
var builder = dataCollectorClient.sendEventRequest();
var response = builder.setEvent(RuntimeSinceEngineStartEvent.builder().setRuntimeSinceEngineStartList(new RuntimeSinceEngineStartItem[] {RuntimeSinceEngineStartItem.builder().setValue(77).setTimestamp(1597029160173L).build()})
    .build()).build().execute();

Response example

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

VehicleSpeed Event

Should be sent when updates on vehicle speed in meters per second.

Key methods

Method Details
setVehicleSpeedList(VehicleSpeedItem[] vehicle_speed_list) List of VehicleSpeedItem items at periodic intervals, mandatory data field.

VehicleSpeedItem

Key methods

Method Details
setValue(Double value) Set vehicle speed in meters per second, mandatory data field.
setTimestamp(Long timestamp) The time at which location was determined, mandatory data field.

Sample code

1
2
3
SendEventRequest.Builder builder = dataCollectorClient.sendEventRequest();
SendEventResponse response = builder.setEvent(VehicleSpeedEvent.builder().setVehicleSpeedList(new VehicleSpeedItem[] {VehicleSpeedItem.builder().setValue(77.7).setTimestamp(1597029160173L).build()})
    .build()).build().execute();
1
2
3
var builder = dataCollectorClient.sendEventRequest();
var response = builder.setEvent(VehicleSpeedEvent.builder().setVehicleSpeedList(new VehicleSpeedItem[] {VehicleSpeedItem.builder().setValue(77.7).setTimestamp(1597029160173L).build()})
    .build()).build().execute();

Response example

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