Leigh Brooks / HuxleyIntegrationAPI

Dependencies:   EthernetInterface

Files at this revision

API Documentation at this revision

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

arrival.h Show annotated file Show diff for this revision Revisions of this file
arrival_board.cpp Show annotated file Show diff for this revision Revisions of this file
arrival_board.h Show annotated file Show diff for this revision Revisions of this file
departure.h Show annotated file Show diff for this revision Revisions of this file
--- 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