Implementation of 1-Wire with added Alarm Search Functionality

Dependents:   Max32630_One_Wire_Interface

Revision:
89:3a0e12c9b898
Parent:
88:cac71903b1cd
Child:
90:c233d1c265ff
--- a/Slaves/RomIterator.h	Wed Jun 15 15:11:48 2016 -0500
+++ b/Slaves/RomIterator.h	Thu Jun 16 10:45:24 2016 -0500
@@ -44,9 +44,11 @@
     private:
         OneWireMaster & owMaster;
         
-    public:
+    protected:
         /// @param master 1-Wire master to use to issue ROM commands.
         RomIterator(OneWireMaster & master) : owMaster(master) { }
+        
+    public:
         virtual ~RomIterator() { }
         
         /// The 1-Wire master used to issue ROM commands.
@@ -132,6 +134,20 @@
         
         virtual OneWireMaster::CmdResult selectDevice(const RomId & romId);
     };
+    
+    /// Iterator for a multidrop 1-Wire bus where slaves support the Resume ROM command.
+    class MultidropRomIteratorWithResume : public RandomAccessRomIterator
+    {
+    private:
+        RomId lastRom;
+        
+    public:
+        /// @param master 1-Wire master to use to issue ROM commands.
+        MultidropRomIteratorWithResume(OneWireMaster & master)
+            : RandomAccessRomIterator(master), lastRom() { }
+        
+        virtual OneWireMaster::CmdResult selectDevice(const RomId & romId);
+    };
 }
 
 #endif