First Extras-Testing Candidate Release
[pierogi] / protocols / kaseikyoprotocol.h
1 #ifndef KASEIKYOPROTOCOL_H
2 #define KASEIKYOPROTOCOL_H
3
4 #include "spaceprotocol.h"
5
6 class PIRRX51Hardware;
7
8 //
9 // The Kaseikyo protocol is a more complex protocol than NEC or RC5 (although
10 // not nearly reaching the level of RC6).  I don't have enough information on
11 // it yet to understand all of its workings.
12 //
13
14 class KaseikyoProtocol: public SpaceProtocol
15 {
16 public:
17   KaseikyoProtocol(
18     QObject *guiObject,
19     unsigned int index);
20
21 public slots:
22   void startSendingCommand(
23     unsigned int threadableID,
24     PIRKeyName command);
25
26 private:
27   int generateStandardCommand(
28     const PIRKeyBits &bits,
29     PIRRX51Hardware &device);
30
31   void generateChecksum(
32     const CommandSequence &bits,
33     CommandSequence &checksum);
34
35   void generateLittleChecksum(
36     const CommandSequence &firstBits,
37     const CommandSequence &secondBits,
38     CommandSequence &littleChecksum);
39 };
40
41 #endif // KASEIKYOPROTOCOL_H