Revision:
4:af08c7749f9d
Parent:
3:cf539cfd3d59
Child:
5:190b9e1a3cc1
--- a/XBee_Robot.h	Tue Jan 05 11:37:13 2016 +0000
+++ b/XBee_Robot.h	Tue Jan 05 14:27:40 2016 +0000
@@ -3,12 +3,31 @@
 #include <list>
 #include <algorithm>
 
+class NetworkNode{
+private:
+    std::vector<uint8_t> addr; //network address vector
+    int nodeNum; //index
+public:
+    NetworkNode(std::vector<uint8_t> & addrIn, int indexIn);
+    //constructor
+    
+    std::vector<uint8_t> getAddr();
+    //returns address
+    
+    int getIndex();
+    //returns index
+    
+    void setAddr(std::vector<uint8_t> & addrIn);
+    //sets address
+    
+    void setIndex(int indexIn);
+    //sets index
+};
+
 class XBee_Robot {
 private:
 
-    std::list< std::vector<uint8_t> > addr_list;
-
-    PinName _tx, _rx; // May need to be changed to public
+    std::vector< NetworkNode > node_list; //list of network nodes
     
     Serial dataLink; //declare global serial
     
@@ -34,4 +53,4 @@
     
     void checkSourceAddr(std::vector<uint8_t> & addr);
     //checks source address of received packet against list of known addresses and adds new addresses
-};
\ No newline at end of file
+};