API for linking to the Huxley National Rail REST proxy for the retrieval of live National Rail data. Still needs work (sadly), but works well for the time being!

Dependencies:   EthernetInterface

National Rail Huxley Integration Interface

This API provides a clear link between the National Rail Huxley Integration JSON interface (available at https://huxley.unop.uk/), and mbed devices, over an Ethernet connection. This project is still very much a work-in-progress, but hopefully I will be able to provide a comprehensive method of retrieving live National Rail departures data in a simple and effective way.

/media/uploads/Leigh_LbR/nre_powered_logo.jpg

Revision:
6:dae1cdf19e90
Parent:
4:7e8a23454d85
--- a/departure_board.cpp	Fri Apr 22 10:31:59 2016 +0000
+++ b/departure_board.cpp	Mon Apr 25 14:41:42 2016 +0000
@@ -1,5 +1,6 @@
+#include "MbedJSONValue.h"
 #include "departure_board.h"
-#include "MbedJSONValue.h"
+
 
 using std::string;
 
@@ -23,8 +24,8 @@
     
     MbedJSONValue json (jsonObject);
     
-    MbedJSONValue trainServices = json["trainServices"].get<MbedJSONValue>();
-    MbedJSONValue messages = json["nrccMessages"].get<MbedJSONValue>();
+    MbedJSONValue trainServices = json["trainServices"];
+    MbedJSONValue messages = json["nrccMessages"];
     
     board.departures = new Departure[trainServices.size()];
     board.num_departures = trainServices.size();