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!
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.
--- a/nr_network.h Thu Apr 21 12:32:32 2016 +0000 +++ b/nr_network.h Thu Apr 21 12:59:47 2016 +0000 @@ -32,8 +32,14 @@ /** Get the socket (an object of type TCPSocketConnection) */ TCPSocketConnection GetSocket(); + /** Get the IP address of the current connection + */ char* GetIP(); + /** Establish a connection to the API + */ int Connect(); + /** Disconnect from the API + */ void Disconnect(); Arrival_Board GetArrivals(const std::string& code_stn, const std::string& number); Departure_Board GetDepartures(const std::string& code_stn, const std::string& number);