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 Class Reference
Departure Stores a single departure. More...
#include <departure.h>
Public Member Functions | |
Departure () | |
Empty Departure constructor. | |
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) | |
Departure constructor. | |
bool | IsDelayed () |
Determine if the departure is delayed. | |
bool | IsCancelled () |
Determine if a departure is cancelled. | |
bool | IsOnTime () |
Determine if a departure is on time. | |
std::string | GetETDFormatted () |
Get the estimated time of departure. |
Detailed Description
Departure Stores a single departure.
Definition at line 9 of file departure.h.
Constructor & Destructor Documentation
Departure | ( | ) |
Empty Departure constructor.
Definition at line 21 of file departure.h.
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 | ||
) |
Departure constructor.
- Parameters:
-
_crs Station code (in NR style) _locationName Location of departure (i.e. where the train is going) _std Scheduled time of departure (in 24-hour format, i.e. "14:03") _etd Estimated time of departure (in 24-hour format, "On time", "Delayed" or "Cancelled") _platform Intended platform _operatorName The train operating company operating the service _operatorCode The train operating companies' NR code
Definition at line 4 of file departure.cpp.
Member Function Documentation
std::string GetETDFormatted | ( | ) |
Get the estimated time of departure.
- Returns:
- a time string with the estimated time of departure (in format "HH:MM"), the phrase "Unknown" if it is not known, or the phrase "Cancelled" if it is cancelled
Definition at line 22 of file departure.cpp.
bool IsCancelled | ( | ) |
Determine if a departure is cancelled.
- Returns:
- a boolean stating if the departure is cancelled
Definition at line 29 of file departure.cpp.
bool IsDelayed | ( | ) |
Determine if the departure is delayed.
- Returns:
- a boolean stating if the departure is delayed
Definition at line 15 of file departure.cpp.
bool IsOnTime | ( | ) |
Determine if a departure is on time.
- Returns:
- a boolean stating if the departure is on time
Definition at line 35 of file departure.cpp.
Generated on Mon Jul 18 2022 22:01:04 by 1.7.2