summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Feuer <mfeuer@jaguarlandrover.com>2014-12-08 17:03:14 -0800
committerMagnus Feuer <mfeuer@jaguarlandrover.com>2014-12-08 17:03:14 -0800
commit2947e5a65d55d7f2ddbd30552ec759ed5031a425 (patch)
tree6c87d5c6812bf7ff140dd35f959b15c8b6b63f16
parent004d5c2ecb1062405f13ec5b3bfe198d08c2726e (diff)
downloadrvi_core-2947e5a65d55d7f2ddbd30552ec759ed5031a425.tar.gz
Changed waypoint to location. Changed odo to odometer. Changer interval to reporting_interval
Signed-off-by: Magnus Feuer <mfeuer@jaguarlandrover.com>
-rw-r--r--big_data_demo/README.md6
-rw-r--r--big_data_demo/big_data_device.py6
-rw-r--r--big_data_demo/gps_collector.py4
-rw-r--r--rebar.config1
-rw-r--r--rvi_sample.config8
5 files changed, 17 insertions, 8 deletions
diff --git a/big_data_demo/README.md b/big_data_demo/README.md
index 784c3f0..87f2fc3 100644
--- a/big_data_demo/README.md
+++ b/big_data_demo/README.md
@@ -76,10 +76,10 @@ msec timestamp when the value was sample.
"vin": "1234",
"timestamp": 1415143459110,
"data":, [
- { "channel": "odo", "value": 10022 },
- { "channel": "odo", "value": 10023 },
+ { "channel": "odometer", "value": 10022 },
+ { "channel": "odometer", "value": 10023 },
{ "channel": "speed", "value": 113 },
- { "channel": "waypoint",
+ { "channel": "location",
"value": { "lat": 39.0319, "lon": 125.7538, "alt": 222.3 } }
]
}
diff --git a/big_data_demo/big_data_device.py b/big_data_demo/big_data_device.py
index a7eaa24..8eb8686 100644
--- a/big_data_demo/big_data_device.py
+++ b/big_data_demo/big_data_device.py
@@ -46,10 +46,10 @@ class RVICallbackServer(threading.Thread):
self.register_services()
self.amb = amb
- def subscribe(self, channels, interval):
+ def subscribe(self, channels, report_interval):
for channel in channels:
- self.amb.subscribe(channel, int(interval))
- self.logger.add_subscription(channel, int(interval))
+ self.amb.subscribe(channel, int(report_interval))
+ self.logger.add_subscription(channel, int(report_interval))
self.logger.dump_db()
return {u'status': 0}
diff --git a/big_data_demo/gps_collector.py b/big_data_demo/gps_collector.py
index 76145bf..361c946 100644
--- a/big_data_demo/gps_collector.py
+++ b/big_data_demo/gps_collector.py
@@ -70,12 +70,14 @@ class GPSCollector:
self.last_speed = session.fix.speed
- self.logger.add_sample('waypoint', {
+ self.logger.add_sample('location', {
u'lat': session.fix.latitude,
u'lon': session.fix.longitude,
u'alt': session.fix.altitude
})
+ self.logger.add_sample('speed', session.fix.speed)
+
# time = session.utc
# location.loc_latitude = session.fix.latitude
# location.loc_longitude = session.fix.longitude
diff --git a/rebar.config b/rebar.config
index 2e32599..29b7941 100644
--- a/rebar.config
+++ b/rebar.config
@@ -20,5 +20,6 @@
{exo, ".*", {git, "git://github.com/Feuerlabs/exo.git", "1.2"}},
{setup, ".*", {git, "https://github.com/uwiger/setup.git", "HEAD"}},
{resource, ".*", {git, "https://github.com/tonyrog/resource.git", "HEAD"}},
+ {gsms, ".*", {git, "https://github.com/tonyrog/gsms.git", "HEAD"}},
{wse, ".*", {git, "https://github.com/tonyrog/wse.git", "HEAD"}}
]}.
diff --git a/rvi_sample.config b/rvi_sample.config
index 62aa876..4429c6e 100644
--- a/rvi_sample.config
+++ b/rvi_sample.config
@@ -132,8 +132,14 @@
{ "jlr.com/backend/", "38.129.64.13:8807" }
]
},
-
+ {
+ traffic_routes,
+ [
+ { "jlr.com/backend/", { direct, device_3g, device_sms }},
+ { "jlr.com/vin", { direct, server_3g, server_sms }}
+ ]
+
{ components,
[
%% A note about JSON-RPC calls vs gen_server calls: