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

Committer:
Leigh_LbR
Date:
Thu Apr 21 13:32:54 2016 +0000
Revision:
3:a287e75a2121
Parent:
0:bf04f62339a4
Child:
7:d713a0e47ffe
Added more documentation

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Leigh_LbR 0:bf04f62339a4 1 #ifndef DEPARTURE_H
Leigh_LbR 0:bf04f62339a4 2 #define DEPARTURE_H
Leigh_LbR 0:bf04f62339a4 3
Leigh_LbR 0:bf04f62339a4 4 #include <string>
Leigh_LbR 0:bf04f62339a4 5
Leigh_LbR 3:a287e75a2121 6 /** Departure
Leigh_LbR 3:a287e75a2121 7 * Stores a single departure
Leigh_LbR 3:a287e75a2121 8 */
Leigh_LbR 0:bf04f62339a4 9 class Departure {
Leigh_LbR 0:bf04f62339a4 10 public:
Leigh_LbR 0:bf04f62339a4 11 std::string crs;
Leigh_LbR 0:bf04f62339a4 12 std::string locationName;
Leigh_LbR 0:bf04f62339a4 13 std::string std;
Leigh_LbR 0:bf04f62339a4 14 std::string etd;
Leigh_LbR 0:bf04f62339a4 15 std::string platform;
Leigh_LbR 0:bf04f62339a4 16 std::string operatorName;
Leigh_LbR 0:bf04f62339a4 17 std::string operatorCode;
Leigh_LbR 0:bf04f62339a4 18
Leigh_LbR 3:a287e75a2121 19 /** Empty Departure constructor
Leigh_LbR 3:a287e75a2121 20 */
Leigh_LbR 0:bf04f62339a4 21 Departure() {};
Leigh_LbR 3:a287e75a2121 22 /** Departure constructor
Leigh_LbR 3:a287e75a2121 23 * @param _crs Station code (in NR style)
Leigh_LbR 3:a287e75a2121 24 * @param _locationName Location of departure (i.e. where the train is going)
Leigh_LbR 3:a287e75a2121 25 * @param _std Scheduled time of departure (in 24-hour format, i.e. "14:03")
Leigh_LbR 3:a287e75a2121 26 * @param _etd Estimated time of departure (in 24-hour format, "On time", "Delayed" or "Cancelled")
Leigh_LbR 3:a287e75a2121 27 * @param _platform Intended platform
Leigh_LbR 3:a287e75a2121 28 * @param _operatorName The train operating company operating the service
Leigh_LbR 3:a287e75a2121 29 * @param _operatorCode The train operating companies' NR code
Leigh_LbR 3:a287e75a2121 30 */
Leigh_LbR 0:bf04f62339a4 31 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);
Leigh_LbR 0:bf04f62339a4 32 };
Leigh_LbR 0:bf04f62339a4 33 #endif