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_board.h@3:a287e75a2121, 2016-04-21 (annotated)
- Committer:
- Leigh_LbR
- Date:
- Thu Apr 21 13:32:54 2016 +0000
- Revision:
- 3:a287e75a2121
- Parent:
- 1:1de042ff6324
- Child:
- 4:7e8a23454d85
Added more documentation
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Leigh_LbR | 1:1de042ff6324 | 1 | #ifndef ARRIVAL_BOARD_H |
Leigh_LbR | 1:1de042ff6324 | 2 | #define ARRIVAL_BOARD_H |
Leigh_LbR | 0:bf04f62339a4 | 3 | |
Leigh_LbR | 0:bf04f62339a4 | 4 | #include "arrival.h" |
Leigh_LbR | 0:bf04f62339a4 | 5 | #include <string> |
Leigh_LbR | 0:bf04f62339a4 | 6 | |
Leigh_LbR | 3:a287e75a2121 | 7 | /** Arrival_Board |
Leigh_LbR | 3:a287e75a2121 | 8 | * Contains information pertaining to an arrival board; namely, a list of arrivals and a list of National Rail messages. |
Leigh_LbR | 3:a287e75a2121 | 9 | */ |
Leigh_LbR | 0:bf04f62339a4 | 10 | class Arrival_Board |
Leigh_LbR | 0:bf04f62339a4 | 11 | { |
Leigh_LbR | 0:bf04f62339a4 | 12 | public: |
Leigh_LbR | 0:bf04f62339a4 | 13 | Arrival* arrivals; |
Leigh_LbR | 0:bf04f62339a4 | 14 | int num_arrivals; |
Leigh_LbR | 0:bf04f62339a4 | 15 | |
Leigh_LbR | 0:bf04f62339a4 | 16 | std::string* messages; |
Leigh_LbR | 0:bf04f62339a4 | 17 | int num_messages; |
Leigh_LbR | 0:bf04f62339a4 | 18 | |
Leigh_LbR | 3:a287e75a2121 | 19 | Arrival_Board(Arrival* _arrivals, const int& _num_arrivals, std::string* _messages, const int& _num_messages); |
Leigh_LbR | 0:bf04f62339a4 | 20 | Arrival_Board(); |
Leigh_LbR | 0:bf04f62339a4 | 21 | |
Leigh_LbR | 0:bf04f62339a4 | 22 | ~Arrival_Board(); |
Leigh_LbR | 0:bf04f62339a4 | 23 | }; |
Leigh_LbR | 0:bf04f62339a4 | 24 | |
Leigh_LbR | 0:bf04f62339a4 | 25 | Arrival_Board arrBoardFromJson(const std::string& jsonObject); |
Leigh_LbR | 0:bf04f62339a4 | 26 | |
Leigh_LbR | 0:bf04f62339a4 | 27 | #endif |