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.
arrival.h@3:a287e75a2121, 2016-04-21 (annotated)
- Committer:
- Leigh_LbR
- Date:
- Thu Apr 21 13:32:54 2016 +0000
- Revision:
- 3:a287e75a2121
- Parent:
- 2:071bf3c7f2a2
- Child:
- 7:d713a0e47ffe
Added more documentation
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Leigh_LbR | 1:1de042ff6324 | 1 | #ifndef ARRIVAL_H |
Leigh_LbR | 1:1de042ff6324 | 2 | #define ARRIVAL_H |
Leigh_LbR | 0:bf04f62339a4 | 3 | |
Leigh_LbR | 0:bf04f62339a4 | 4 | #include <string> |
Leigh_LbR | 0:bf04f62339a4 | 5 | |
Leigh_LbR | 2:071bf3c7f2a2 | 6 | /** Arrival |
Leigh_LbR | 2:071bf3c7f2a2 | 7 | * Stores a single arrival |
Leigh_LbR | 2:071bf3c7f2a2 | 8 | */ |
Leigh_LbR | 0:bf04f62339a4 | 9 | class Arrival { |
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 sta; |
Leigh_LbR | 0:bf04f62339a4 | 14 | std::string eta; |
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 Arrival constructor |
Leigh_LbR | 3:a287e75a2121 | 20 | */ |
Leigh_LbR | 0:bf04f62339a4 | 21 | Arrival() {}; |
Leigh_LbR | 3:a287e75a2121 | 22 | /** Arrival constructor |
Leigh_LbR | 3:a287e75a2121 | 23 | * @param _crs Station code (in NR style) |
Leigh_LbR | 3:a287e75a2121 | 24 | * @param _locationName Location of arrival (i.e. where the arrival comes from) |
Leigh_LbR | 3:a287e75a2121 | 25 | * @param _sta Scheduled time of arrival (in 24-hour format, i.e. "14:03") |
Leigh_LbR | 3:a287e75a2121 | 26 | * @param _eta Estimated time of arrival (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 | Arrival(const std::string& _crs, const std::string& _locationName, const std::string& _sta, const std::string& _eta, const std::string& _platform, const std::string& _operatorName, const std::string& _operatorCode); |
Leigh_LbR | 0:bf04f62339a4 | 32 | }; |
Leigh_LbR | 0:bf04f62339a4 | 33 | #endif |