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:
7:d713a0e47ffe
Parent:
3:a287e75a2121
--- a/departure.h	Mon Apr 25 14:41:42 2016 +0000
+++ b/departure.h	Tue Apr 26 13:03:09 2016 +0000
@@ -29,5 +29,22 @@
     * @param _operatorCode The train operating companies' NR code
     */
     Departure(const std::string& _crs, const std::string& _locationName, const std::string& _std, const std::string& _etd, const std::string& _platform, const std::string& _operatorName, const std::string& _operatorCode);
+    
+    /** Determine if the departure is delayed
+    *   @return a boolean stating if the departure is delayed
+    */
+    bool IsDelayed();
+    /** Determine if a departure is cancelled
+    *   @return a boolean stating if the departure is cancelled
+    */
+    bool IsCancelled();
+    /** Determine if a departure is on time
+    *   @return a boolean stating if the departure is on time
+    */
+    bool IsOnTime();
+    /** Get the estimated time of departure
+    *   @return a time string with the estimated time of departure (in format "HH:MM"), the phrase "Unknown" if it is not known, or the phrase "Cancelled" if it is cancelled
+    */
+    std::string GetETDFormatted();
 };
 #endif
\ No newline at end of file