Advanced Settings Panel
[pierogi] / protocols / pioneerprotocol.h
1 #ifndef PIONEERPROTOCOL_H
2 #define PIONEERPROTOCOL_H
3
4 #include "spaceprotocol.h"
5
6 class PIRRX51Hardware;
7
8 //
9 // The Pioneer protocol is basically the same as the standard NEC protocol,
10 // with the exception that some keys are defined by a pair of NEC codes
11 // rather than a single one; to my understanding, where a single code is
12 // sent in full over and over again, a pair of codes is simply alternated
13 // one after the other.
14 //
15
16 class PioneerProtocol: public SpaceProtocol
17 {
18 public:
19   PioneerProtocol(
20     QObject *guiObject,
21     unsigned int index);
22
23 public slots:
24   void startSendingCommand(
25     unsigned int threadableID,
26     PIRKeyName command);
27
28 private:
29   // First, define what is used to represent 0 and 1:
30 /*
31   unsigned int zeroPulse;
32   unsigned int zeroSpace;
33   unsigned int onePulse;
34   unsigned int oneSpace;
35 */
36
37   // Header pulse info:
38   unsigned int headerPulse;
39   unsigned int headerSpace;
40
41   // Trailer info:
42   unsigned int trailerPulse;
43
44   int generateStandardCommand(
45     const PIRKeyBits &bits,
46     PIRRX51Hardware &device);
47
48   int generateSecondaryCommand(
49     const PIRKeyBits &bits,
50     PIRRX51Hardware &device);
51 };
52
53 #endif // PIONEERPROTOCOL_H