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
arrival_board.h
00001 #ifndef ARRIVAL_BOARD_H 00002 #define ARRIVAL_BOARD_H 00003 00004 #include "MbedJSONValue.h" 00005 #include "arrival.h" 00006 #include <string> 00007 00008 /** Arrival_Board 00009 * Contains information pertaining to an arrival board; namely, a list of arrivals and a list of National Rail messages. 00010 */ 00011 class Arrival_Board 00012 { 00013 public: 00014 Arrival* arrivals; 00015 int num_arrivals; 00016 00017 std::string* messages; 00018 int num_messages; 00019 00020 /** Arrival_Board constructor 00021 * @param _arrivals pointer to a list of arrivals 00022 * @param _num_arrivals number of arrivals in that list 00023 * @param _messages pointer to a list of messages 00024 * @param _num_messages number of messages in that list 00025 */ 00026 Arrival_Board(Arrival* _arrivals, const int& _num_arrivals, std::string* _messages, const int& _num_messages); 00027 /** Arrival_Board default constructor 00028 */ 00029 Arrival_Board() {}; 00030 00031 /** Arrival_Board destructor 00032 */ 00033 ~Arrival_Board(); 00034 }; 00035 00036 /** Creates an Arrival_Board object from a JSON object string. Uses the MbedJSONValue library. 00037 * @param jsonObject the JSON object to be parsed 00038 * @return an Arrival_Board object containing the information from the JSON object string 00039 */ 00040 Arrival_Board arrBoardFromJson(const std::string& jsonObject); 00041 00042 #endif
Generated on Mon Jul 18 2022 22:01:04 by 1.7.2