1b9982ca33fcbb78ebce766000230f3f0342fd25
[pierogi] / protocols / spaceprotocol.h
1 #ifndef SPACEPROTOCOL_H
2 #define SPACEPROTOCOL_H
3
4 #include "pirprotocol.h"
5 #include "pirrx51hardware.h"
6
7 // This class supports the generic (LIRC-based) space encoded IR protocol.
8 // It is intended to support all other space-based protocols through
9 // inheritance, and as such contains a variety of commonly useful methods and
10 // attributes.
11
12 class SpaceProtocol: public PIRProtocol
13 {
14 public:
15   SpaceProtocol(
16     QObject *guiObject,
17     unsigned int index,
18     unsigned int zerop,
19     unsigned int zeros,
20     unsigned int onep,
21     unsigned int ones,
22     unsigned int headerp,
23     unsigned int headers,
24     unsigned int trailerp,
25     unsigned int gaps,
26     bool iclflag);
27
28 protected:
29   int pushBits(
30     const CommandSequence &bits,
31     PIRRX51Hardware &device);
32
33   int pushReverseBits(
34     const CommandSequence &bits,
35     PIRRX51Hardware &device);
36
37   int pushInvertedReverseBits(
38     const CommandSequence &bits,
39     PIRRX51Hardware &device);
40
41   unsigned int zeroPulse;
42   unsigned int zeroSpace;
43   unsigned int onePulse;
44   unsigned int oneSpace;
45
46   unsigned int headerPulse;
47   unsigned int headerSpace;
48
49   unsigned int trailerPulse;
50 };
51
52 #endif // SPACEPROTOCOL_H