-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSCCAMSlot.h
More file actions
58 lines (49 loc) · 1.27 KB
/
SCCAMSlot.h
File metadata and controls
58 lines (49 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef ___SCCAMSLOT_H
#define ___SCCAMSLOT_H
#include "SCCIAdapter.h"
#include "Frame.h"
#define SLOT_CAID_CHECK 10000
#define SLOT_RESET_TIME 600
#define MAX_CW_IDX 16
#define CAID_TIME 300000 // time between caid scans
#define TRIGGER_TIME 10000 // min. time between caid scan trigger
#ifdef VDR_MAXCAID
#define MAX_CI_SLOT_CAIDS VDR_MAXCAID
#else
#define MAX_CI_SLOT_CAIDS 16
#endif
/*
#define TDPU_SIZE_INDICATOR 0x80
struct TPDU {
unsigned char slot;
unsigned char tcid;
unsigned char tag;
unsigned char len;
unsigned char data[1];
};
*/
class SCCIAdapter;
class SCCAMSlot : public cCamSlot {
private:
SCCIAdapter *sCCIAdapter;
unsigned short caids[MAX_CI_SLOT_CAIDS+1];
int slot, cardIndex, version;
cTimeMs checkTimer;
bool reset, doReply;
cTimeMs resetTimer;
eModuleStatus lastStatus;
cRingBufferLinear rb;
Frame frame;
public:
SCCAMSlot(SCCIAdapter *ca, int cardIndex, int slot);
int GetLength(const unsigned char * &data);
int LengthSize(int n);
void SetSize(int n, unsigned char * &p);
void CaInfo(int tcid, int cid);
bool Check(void);
void Process(const unsigned char *data, int len);
eModuleStatus Status(void);
bool Reset(bool log=true);
Frame* getFrame(void) { return &frame; }
};
#endif // ___SCCAMSLOT_H