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.
Diff: arrival_board.cpp
- Revision:
- 6:dae1cdf19e90
- Parent:
- 3:a287e75a2121
diff -r a4a33e6729c2 -r dae1cdf19e90 arrival_board.cpp --- a/arrival_board.cpp Fri Apr 22 10:31:59 2016 +0000 +++ b/arrival_board.cpp Mon Apr 25 14:41:42 2016 +0000 @@ -1,5 +1,5 @@ +#include "MbedJSONValue.h" #include "arrival_board.h" -#include "MbedJSONValue.h" using std::string; @@ -23,8 +23,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.arrivals = new Arrival[trainServices.size()]; board.num_arrivals = trainServices.size();