QC Control software

Dependencies:   mbed

Fork of dgps by Colin Stearns

Revision:
27:db73f8ac6c75
Parent:
15:e3e03a9df89e
Child:
28:4e608589d787
--- a/handle/dataLocation.h	Tue Apr 22 14:21:01 2014 +0000
+++ b/handle/dataLocation.h	Tue Apr 22 14:56:03 2014 +0000
@@ -1,6 +1,13 @@
 /**
   *  \brief Data location data holder
   **/
+// Example Usage
+// Looping: for(int i=0;i<DH::locs().getI(LHType_locs);i++){DataLocation thisData=DH::locs().getC(LHType_locs,i);}
+// Appending: DH::locs().add(LHType_locs,DataLocation(4.0f,5.0f,6.0f));
+// ResetStart: DH::locs().inc(LHType_locs,0,true);
+// ResetEnd: DH::locs().inc(LHType_locs,-1,true);
+// Increment: DH::locs().inc(LHType_locs);
+// GetCurrent: DH::locs().getC(LHType_locs,DH::locs().getI());
 #ifndef _DATA_LOCATION_H_
 #define _DATA_LOCATION_H_
 #define MAXNUMLOCS 64
@@ -72,15 +79,19 @@
     DataLocation* get(LHType type=LHType_locs);
     
     /// \brief Get Current value
+    // Set the offset to a positive number to start from beg
+    // Set the offset to a negative number to start from end 
     DataLocation& getC(LHType type=LHType_locs,int offset=0);
     
     /// \brief Get Index
+    // Set type to head to find get the index of the current incremeter.
+    // Set type to size to find the size
     unsigned int& getI(LHType type=LHType_locs,LHIType indexType=LHIType_head);
     
     /// \brief Fix an index that might be out of bounds;
     unsigned int getRealIndex(LHType type,int index,int offset=0,bool useSize=true);
     
-    /// \brief Increment index
+    /// \brief Increment index (loop on overflow)
     void inc(LHType type=LHType_locs,int amount=1,bool abs=false);
     
     /// \brief Append a location to the end.