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

departure.h

Committer:
Leigh_LbR
Date:
2016-04-21
Revision:
3:a287e75a2121
Parent:
0:bf04f62339a4
Child:
7:d713a0e47ffe

File content as of revision 3:a287e75a2121:

#ifndef DEPARTURE_H
#define DEPARTURE_H

#include <string>

/** Departure
*   Stores a single departure
*/
class Departure {
public:
    std::string crs;
    std::string locationName;
    std::string std;
    std::string etd;
    std::string platform;
    std::string operatorName;
    std::string operatorCode;
    
    /** Empty Departure constructor
    */
    Departure() {};
    /** Departure constructor
    * @param _crs Station code (in NR style)
    * @param _locationName Location of departure (i.e. where the train is going)
    * @param _std Scheduled time of departure (in 24-hour format, i.e. "14:03")
    * @param _etd Estimated time of departure (in 24-hour format, "On time", "Delayed" or "Cancelled")
    * @param _platform Intended platform
    * @param _operatorName The train operating company operating the service
    * @param _operatorCode The train operating companies' NR code
    */
    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);
};
#endif