Diff: XBee_Robot.h
- Revision:
- 8:7e936dc02dec
- Parent:
- 7:c3acafdb70c0
- Child:
- 9:d5e7e772d5a4
--- a/XBee_Robot.h Mon Jan 11 11:49:37 2016 +0000 +++ b/XBee_Robot.h Sat Jan 30 21:20:00 2016 +0000 @@ -7,6 +7,8 @@ private: std::vector<uint8_t> addr; //network address vector int nodeNum; //index + int x; + int y; public: NetworkNode(std::vector<uint8_t> & addrIn, int indexIn); //constructor @@ -17,6 +19,15 @@ int getIndex(); //returns index + int getX(); + //returns x coordinate + + int getY(); + //returns y coordinate + + void setCoordinates(int x_in, int y_in); + //sets coordinates + void setAddr(std::vector<uint8_t> & addrIn); //sets address @@ -27,6 +38,7 @@ class XBee_Robot { private: + int currentIndex; //current index of NetworkNode for received packet, allows coordinates to be updated std::vector< NetworkNode > node_list; //list of network nodes