Update to UI
[pierogi] / protocols / irobotprotocol.h
diff --git a/protocols/irobotprotocol.h b/protocols/irobotprotocol.h
new file mode 100644 (file)
index 0000000..b2378c5
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef IROBOTPROTOCOL_H
+#define IROBOTPROTOCOL_H
+
+#include "spaceprotocol.h"
+
+class PIRRX51Hardware;
+
+// The iRobot protocol is extremely simple, but my sources differ slightly
+// on its exact properties (particularly how repetition is handled).  So
+// this may need some reworking in the future.
+
+class IRobotProtocol: public SpaceProtocol
+{
+public:
+  IRobotProtocol(
+    QObject *guiObject,
+    unsigned int index);
+
+public slots:
+  void startSendingCommand(
+    unsigned int threadableID,
+    PIRKeyName command);
+
+private:
+  int generateCommand(
+    const PIRKeyBits &bits,
+    PIRRX51Hardware &device);
+};
+
+#endif // IROBOTPROTOCOL_H