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