From 7b62eefaf33b9bb69eb324333232ae0919fc295f Mon Sep 17 00:00:00 2001 From: Yuta Doi Date: Fri, 18 May 2018 17:16:14 +0900 Subject: Add API which can get information about the car state getCarInfo() can get the car state informations as follows: - parking brake state : true/false - accelerator pedal position : 0-127.5 - car state : "stop"/"run" The details are described in doc/ApplicationGuide.md in project apps/agl-service-windowmanager-2017. Change-Id: I2a4a06ceeedbd2d3b1188a7fb442e1272e46897b Signed-off-by: Yuta Doi --- doc/ApplicationGuide.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'doc/ApplicationGuide.md') diff --git a/doc/ApplicationGuide.md b/doc/ApplicationGuide.md index 2240bb1..9c19b69 100644 --- a/doc/ApplicationGuide.md +++ b/doc/ApplicationGuide.md @@ -479,8 +479,10 @@ This is the public interface of the class `LibWindowmanager`. int endDraw(json_object *object); int getDisplayInfo(json_object *object); int getAreaInfo(json_object *in_obj, json_object *out_obj); + int getCarInfo(json_object *in_obj, json_object *out_obj); int getAreaInfo(const char *label, json_object *out_obj); + int getCarInfo(const char *label, json_object *out_obj); void set_event_handler(enum EventType et, handler_fun f); @@ -600,6 +602,33 @@ The same information can given by SyncDraw event. This function is same with `getAreaInfo(json_object *in_obj, json_object *out_obj)`, but only has difference of 1st argument. +### getCarInfo(json_object *in_obj, json_object *out_obj) + +**args1: `{ 'kKeyLabel': 'label name' }`** +**args2: `{ }`** +This function gets the information of car by the application as follows: +- parking brake state +- accelerator pedal position +- car state + +It outputs the car information for json_object in the 2nd argument as follows: + +| in_obj | out_obj | +|:------------------------------------------|:------------------------------------| +| { "label": "parking_brake_status" } | {"value": json_bool (true/false)} | +| { "label": "accelerator.pedal.position" } | {"value": double (0 - 127.5)} | +| { "label": "car_state" } | {"value": const char* (stop/run)} | + +It should be called after calling activateSurface(). +It should not be called in the event handler because it occurs hang-up. + +### getCarInfo(const char *label, json_object *out_obj) + +**args1: String of label name** +**args2: `{ }`** +This function is same with `getCarInfo(json_object *in_obj, json_object *out_obj)`, +but only has difference of 1st argument. + ### set\_event\_handler(enum EventType et, handler_fun f) This method needs to be used to register event handlers for the WM -- cgit 1.2.3-korg