Search for Power Button Panel
[pierogi] / protocols / tdcprotocol.h
diff --git a/protocols/tdcprotocol.h b/protocols/tdcprotocol.h
new file mode 100644 (file)
index 0000000..28c0d7b
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef TDCPROTOCOL_H
+#define TDCPROTOCOL_H
+
+#include "pirprotocol.h"
+
+class PIRRX51Hardware;
+
+class TDCProtocol: public PIRProtocol
+{
+public:
+  TDCProtocol(
+    QObject *guiObject,
+    unsigned int index,
+    unsigned int deviceBits,
+    unsigned int subdeviceBits);
+
+public slots:
+  void startSendingCommand(
+    unsigned int threadableID,
+    PIRKeyName command);
+
+
+private:
+  int pushBits(
+    const CommandSequence &bits,
+    PIRRX51Hardware &device);
+
+  int pushBit(
+    bool bitValue,
+    PIRRX51Hardware &device);
+
+  unsigned int biphaseUnit;
+  unsigned int buffer;
+  bool bufferContainsSpace;
+  bool bufferContainsPulse;
+};
+
+#endif // TDCPROTOCOL_H