vdr
2.2.0
|
#include <ci.h>
Public Member Functions | |
cCiAdapter (void) | |
virtual | ~cCiAdapter () |
![]() | |
cThread (const char *Description=NULL, bool LowPriority=false) | |
virtual | ~cThread () |
void | SetDescription (const char *Description,...) __attribute__((format(printf |
void bool | Start (void) |
bool | Active (void) |
Protected Member Functions | |
cCamSlot * | ItCamSlot (int &Iter) |
virtual void | Action (void) |
virtual int | Read (uint8_t *Buffer, int MaxLength) |
virtual void | Write (const uint8_t *Buffer, int Length) |
virtual bool | Reset (int Slot) |
virtual eModuleStatus | ModuleStatus (int Slot) |
virtual bool | Assign (cDevice *Device, bool Query=false) |
![]() | |
void | SetPriority (int Priority) |
void | SetIOPriority (int Priority) |
void | Lock (void) |
void | Unlock (void) |
bool | Running (void) |
void | Cancel (int WaitSeconds=0) |
Private Member Functions | |
void | AddCamSlot (cCamSlot *CamSlot) |
Private Attributes | |
cCamSlot * | camSlots [MAX_CAM_SLOTS_PER_ADAPTER] |
Friends | |
class | cCamSlot |
Additional Inherited Members | |
![]() | |
static tThreadId | ThreadId (void) |
static tThreadId | IsMainThread (void) |
static void | SetMainThreadId (void) |
cCiAdapter::cCiAdapter | ( | void | ) |
Definition at line 1679 of file ci.c.
References camSlots, and MAX_CAM_SLOTS_PER_ADAPTER.
|
virtual |
The derived class must call Cancel(3) in its destructor.
Definition at line 1686 of file ci.c.
References camSlots, cThread::Cancel(), and MAX_CAM_SLOTS_PER_ADAPTER.
|
protectedvirtual |
Handles the attached CAM slots in a separate thread.
The derived class must call the Start() function to actually start CAM handling.
Implements cThread.
Definition at line 1718 of file ci.c.
References cTPDU::Buffer(), camSlots, cTPDU::Dump(), MAX_CAM_SLOTS_PER_ADAPTER, cTPDU::MaxSize(), cCamSlot::Process(), Read(), cThread::Running(), cTPDU::SetSize(), cTPDU::Slot(), and cCamSlot::SlotNumber().
|
private |
Adds the given CamSlot to this CI adapter.
Definition at line 1693 of file ci.c.
References camSlots, esyslog, MAX_CAM_SLOTS_PER_ADAPTER, and cCamSlot::slotIndex.
|
inlineprotectedvirtual |
Assigns this adapter to the given Device, if this is possible.
If Query is 'true', the adapter only checks whether it can be assigned to the Device, but doesn't actually assign itself to it. Returns true if the adapter can be assigned to the Device. If Device is NULL, the adapter will be unassigned from any device it was previously assigned to. The value of Query is ignored in that case, and this function always returns 'true'.
Reimplemented in cDvbCiAdapter.
Definition at line 106 of file ci.h.
References cCamSlot::cCiAdapter.
|
protected |
Iterates over all added CAM slots of this adapter.
Iter has to be initialized to 0 and is required to store the iteration state. Returns NULL if no further CAM slot is found.
Definition at line 1707 of file ci.c.
References camSlots, and MAX_CAM_SLOTS_PER_ADAPTER.
|
inlineprotectedvirtual |
Returns the status of the CAM in the given Slot.
Reimplemented in cDvbCiAdapter.
Definition at line 104 of file ci.h.
References msNone.
Referenced by cCamSlot::CanActivate(), cCamSlot::Process(), and cCamSlot::Ready().
|
inlineprotectedvirtual |
Reads one chunk of data into the given Buffer, up to MaxLength bytes.
If no data is available immediately, wait for up to CAM_READ_TIMEOUT. Returns the number of bytes read (in case of an error it will also return 0).
Reimplemented in cDvbCiAdapter.
Definition at line 94 of file ci.h.
Referenced by Action().
|
inlineprotectedvirtual |
Resets the CAM in the given Slot.
Returns true if the operation was successful.
Reimplemented in cDvbCiAdapter.
Definition at line 101 of file ci.h.
Referenced by cCamSlot::cCamSlot(), and cCamSlot::Process().
|
inlineprotectedvirtual |
Writes Length bytes of the given Buffer.
Reimplemented in cDvbCiAdapter.
|
friend |
Definition at line 80 of file ci.h.
Referenced by cDvbCiAdapter::cDvbCiAdapter().
|
private |
Definition at line 82 of file ci.h.
Referenced by Action(), AddCamSlot(), cCiAdapter(), ItCamSlot(), and ~cCiAdapter().