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

Revision:
1:1de042ff6324
Parent:
0:bf04f62339a4
Child:
2:071bf3c7f2a2
diff -r bf04f62339a4 -r 1de042ff6324 nr_network.h
--- a/nr_network.h	Thu Apr 21 12:02:57 2016 +0000
+++ b/nr_network.h	Thu Apr 21 12:32:32 2016 +0000
@@ -1,13 +1,14 @@
 #ifndef NR_NETWORK_H
 #define NR_NETWORK_H
 
-#include "EthernetInterface.h"
 #include "arrival_board.h"
 #include "departure_board.h"
+#include "EthernetInterface.h"
 #include <string>
 
-class Live_Info;
-
+/** NR_Network_Conn
+*   Used for establishing a connection to the Huxley NR SOAP proxy and to generate departure/arrivals data
+*/
 class NR_Network_Conn
 {
 private:
@@ -19,8 +20,17 @@
     char _gateway[17];
 
 public:
+    /** Make a connection. The empty constructor creates a connection using DHCP.
+    */
     NR_Network_Conn();
+    /** Make a connection. This constructor creates a connection with the specified IP address, subnet and gateway
+    * @param address the IP address of this device (in the format "192.168.1.101"
+    * @param mask the subnet mask of this device (in the format "255.255.255.0"
+    * @param gateway the gatway of this device (in the format "192.168.1.1"
+    */
     NR_Network_Conn(const char* address, const char* mask, const char* gateway);
+    /** Get the socket (an object of type TCPSocketConnection)
+    */
     TCPSocketConnection GetSocket();
     char* GetIP();
     int Connect();