Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetInterface
Revision 3:a287e75a2121, committed 2016-04-21
- Comitter:
- Leigh_LbR
- Date:
- Thu Apr 21 13:32:54 2016 +0000
- Parent:
- 2:071bf3c7f2a2
- Child:
- 4:7e8a23454d85
- Commit message:
- Added more documentation
Changed in this revision
--- a/arrival.h Thu Apr 21 12:59:47 2016 +0000
+++ b/arrival.h Thu Apr 21 13:32:54 2016 +0000
@@ -16,7 +16,18 @@
std::string operatorName;
std::string operatorCode;
+ /** Empty Arrival constructor
+ */
Arrival() {};
+ /** Arrival constructor
+ * @param _crs Station code (in NR style)
+ * @param _locationName Location of arrival (i.e. where the arrival comes from)
+ * @param _sta Scheduled time of arrival (in 24-hour format, i.e. "14:03")
+ * @param _eta Estimated time of arrival (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
+ */
Arrival(const std::string& _crs, const std::string& _locationName, const std::string& _sta, const std::string& _eta, const std::string& _platform, const std::string& _operatorName, const std::string& _operatorCode);
};
#endif
\ No newline at end of file
--- a/arrival_board.cpp Thu Apr 21 12:59:47 2016 +0000
+++ b/arrival_board.cpp Thu Apr 21 13:32:54 2016 +0000
@@ -3,9 +3,12 @@
using std::string;
-Arrival_Board::Arrival_Board(Arrival* _arrivals)
+Arrival_Board::Arrival_Board(Arrival* _arrivals, const int& _num_arrivals, std::string* _messages, const int& _num_messages)
{
arrivals = _arrivals;
+ num_arrivals = _num_arrivals;
+ messages = _messages;
+ num_messages = _num_messages;
}
Arrival_Board::~Arrival_Board()
--- a/arrival_board.h Thu Apr 21 12:59:47 2016 +0000
+++ b/arrival_board.h Thu Apr 21 13:32:54 2016 +0000
@@ -4,6 +4,9 @@
#include "arrival.h"
#include <string>
+/** Arrival_Board
+* Contains information pertaining to an arrival board; namely, a list of arrivals and a list of National Rail messages.
+*/
class Arrival_Board
{
public:
@@ -13,7 +16,7 @@
std::string* messages;
int num_messages;
- Arrival_Board(Arrival* _arrivals);
+ Arrival_Board(Arrival* _arrivals, const int& _num_arrivals, std::string* _messages, const int& _num_messages);
Arrival_Board();
~Arrival_Board();
--- a/departure.h Thu Apr 21 12:59:47 2016 +0000
+++ b/departure.h Thu Apr 21 13:32:54 2016 +0000
@@ -3,6 +3,9 @@
#include <string>
+/** Departure
+* Stores a single departure
+*/
class Departure {
public:
std::string crs;
@@ -13,7 +16,18 @@
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
\ No newline at end of file