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