forked from manio/vdr-plugin-dvbapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSCCAMSlot.h
More file actions
66 lines (58 loc) · 1.94 KB
/
SCCAMSlot.h
File metadata and controls
66 lines (58 loc) · 1.94 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
59
60
61
62
63
64
65
66
/*
* vdr-plugin-dvbapi - softcam dvbapi plugin for VDR
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef ___SCCAMSLOT_H
#define ___SCCAMSLOT_H
#include <vdr/dvbdevice.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
#define MAX_SOCKETS 16 // max sockets (simultaneus channels) per demux
#define MAX_CI_SLOT_CAIDS 64
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