summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-01-09 14:07:31 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-01-09 14:33:39 -0800
commit322feb3f174dfdd597f70d46513b4b2eb3f748f5 (patch)
tree49dc1bba9be818982ba3811b4e8c2d0dba1c8f3e /README.md
parent03b2cf51d9e9d5be13e689c15a25795e40034b2a (diff)
binding: geofence: add binding documentationflounder_5.99.1flounder/5.99.15.99.1
Add initial documentation for agl-service-geofence service Bug-AGL: SPEC-1245 Change-Id: If9630c2cbeec440033b01df84d39bd94246c4ffd Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md42
1 files changed, 42 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..4b3fb23
--- /dev/null
+++ b/README.md
@@ -0,0 +1,42 @@
+# GeoFence Service
+
+## Overview
+
+GeoFence service allows events to be triggered when vehicle enters, leaves, or dwells within
+a defined bounding box
+
+## Verbs
+
+| Name | Description | JSON Parameters |
+| ------------------ |:----------------------------------------|:-------------------------------------------------------------------------------------------|
+| subscribe | subscribe to geofence events | *Request:* {"value": "fence"} |
+| unsubscribe | unsubscribe to geofence events | *Request:* {"value": "fence"} |
+| add_fence | add geofence bounding box | *Request:* {"name": "fence_name", "bbox": [...]} |
+| remove_fence | remove named geofence | *Request:* {"name": "fence_name" } |
+| list_fences | list current bounding boxes and state | *Response:* array of {"name": "fence_name, "bbox": [...], "within": false, "dwell": false} |
+| dwell_transition | get/set dwell transition time interval | *Request:* {"value": 10} *Response:* {"seconds": 10} |
+
+## Bounding Box
+
+Fence boundaries are defined with a bounding box parameter (i.e. bbox) in the following format
+
+<pre>
+ ...
+ "bbox": {
+ "min_latitude": 45.600136,
+ "max_latitude": 45.600384,
+ "min_longitude": -122.499217,
+ "max_longitude": -122.498732,
+ }
+ ...
+</pre>
+
+## Events
+
+| Name | Description | JSON Response |
+| ------------------ |:-------------------------------------|:-------------------------------------------|
+| fence | event that reports geofence status | {"name": "fence_name", "state": "entered"} |
+
+### fence Event Notes
+
+*state* parameter in event response can have one of the following values *entered*, *exited*, or *dwell*