Skip to content

Others Events

Info

This document is a work in progress.

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

  • Others Events
    • Weather Event - Should be sent by HMI/application what current weather is like when available.

Others Events

WeatherEvent

Should be sent by HMI/application what current weather is like when available.

Key methods

Method Details
setWeatherCode(Integer weather_code) The corresponding weather code with type, e.g. 500 light rain, mandatory data field.
setWeatherType(WeatherType weather_main_type) Set Weather main type, e.g. rain, mandatory data field.
setWeatherDesc(String weather_desc) Set Weather detailed description, e.g. light rain, optional data field.
enum index WeatherType
0 THUNDERSTORM
1 DRIZZLE
2 RAIN
3 SNOW
4 ATOMOSPHERE
5 CLEAR
6 CLOUDS


Sample code

1
2
3
4
5
SendEventRequest.Builder builder = dataCollectorClient.sendEventRequest();
SendEventResponse response = builder
        .setEvent(WeatherEvent.builder().setWeatherCode(500).setWeatherDesc("description")
        .setWeatherType(WeatherEvent.WeatherType.RAIN)
        .build()).build().execute();
1
2
3
4
5
var builder = dataCollectorClient.sendEventRequest();
var response = builder
        .setEvent(WeatherEvent.builder().setWeatherCode(500).setWeatherDesc("description")
        .setWeatherType(WeatherEvent.WeatherType.RAIN)
        .build()).build().execute()

Response example

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