vdr  1.7.27
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends
cCiAdapter Class Reference

#include <ci.h>

List of all members.

Public Member Functions

 cCiAdapter (void)
virtual ~cCiAdapter ()
virtual bool Ready (void)
 cCiAdapter (void)
virtual ~cCiAdapter ()
virtual bool Ready (void)

Protected Member Functions

virtual void Action (void)
virtual int Read (uint8_t *Buffer, int MaxLength)=0
virtual void Write (const uint8_t *Buffer, int Length)=0
virtual bool Reset (int Slot)=0
virtual eModuleStatus ModuleStatus (int Slot)=0
virtual bool Assign (cDevice *Device, bool Query=false)=0
virtual void Action (void)
virtual int Read (uint8_t *Buffer, int MaxLength)=0
virtual void Write (const uint8_t *Buffer, int Length)=0
virtual bool Reset (int Slot)=0
virtual eModuleStatus ModuleStatus (int Slot)=0
virtual bool Assign (cDevice *Device, bool Query=false)=0

Private Member Functions

void AddCamSlot (cCamSlot *CamSlot)
void AddCamSlot (cCamSlot *CamSlot)

Private Attributes

cDeviceassignedDevice
cCamSlotcamSlots [MAX_CAM_SLOTS_PER_ADAPTER]

Friends

class cCamSlot

Detailed Description

Definition at line 79 of file ci.h.


Constructor & Destructor Documentation

Definition at line 1491 of file ci.c.

References assignedDevice, camSlots, and MAX_CAM_SLOTS_PER_ADAPTER.

cCiAdapter::~cCiAdapter ( ) [virtual]

The derived class must call Cancel(3) in its destructor.

Definition at line 1499 of file ci.c.

References camSlots, cThread::Cancel(), and MAX_CAM_SLOTS_PER_ADAPTER.

virtual cCiAdapter::~cCiAdapter ( ) [virtual]

The derived class must call Cancel(3) in its destructor.


Member Function Documentation

void cCiAdapter::Action ( void  ) [protected, virtual]

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 1529 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().

virtual void cCiAdapter::Action ( void  ) [protected, virtual]

Handles the attached CAM slots in a separate thread.

The derived class must call the Start() function to actually start CAM handling.

Implements cThread.

void cCiAdapter::AddCamSlot ( cCamSlot CamSlot) [private]

Adds the given CamSlot to this CI adapter.

void cCiAdapter::AddCamSlot ( cCamSlot CamSlot) [private]

Adds the given CamSlot to this CI adapter.

Definition at line 1506 of file ci.c.

References camSlots, esyslog, MAX_CAM_SLOTS_PER_ADAPTER, and cCamSlot::slotIndex.

Referenced by cCamSlot::cCamSlot().

virtual bool cCiAdapter::Assign ( cDevice Device,
bool  Query = false 
) [protected, pure virtual]

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'.

Implemented in cDvbCiAdapter, and cDvbCiAdapter.

Referenced by cCamSlot::Assign().

virtual bool cCiAdapter::Assign ( cDevice Device,
bool  Query = false 
) [protected, pure virtual]

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'.

Implemented in cDvbCiAdapter, and cDvbCiAdapter.

virtual eModuleStatus cCiAdapter::ModuleStatus ( int  Slot) [protected, pure virtual]

Returns the status of the CAM in the given Slot.

Implemented in cDvbCiAdapter, and cDvbCiAdapter.

virtual eModuleStatus cCiAdapter::ModuleStatus ( int  Slot) [protected, pure virtual]

Returns the status of the CAM in the given Slot.

Implemented in cDvbCiAdapter, and cDvbCiAdapter.

Referenced by cCamSlot::ModuleStatus().

virtual int cCiAdapter::Read ( uint8_t *  Buffer,
int  MaxLength 
) [protected, pure virtual]

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).

Implemented in cDvbCiAdapter, and cDvbCiAdapter.

virtual int cCiAdapter::Read ( uint8_t *  Buffer,
int  MaxLength 
) [protected, pure virtual]

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).

Implemented in cDvbCiAdapter, and cDvbCiAdapter.

Referenced by Action().

bool cCiAdapter::Ready ( void  ) [virtual]

Returns 'true' if all present CAMs in this adapter are ready.

Definition at line 1520 of file ci.c.

References camSlots, and MAX_CAM_SLOTS_PER_ADAPTER.

Referenced by cDvbDevice::Ready().

virtual bool cCiAdapter::Ready ( void  ) [virtual]

Returns 'true' if all present CAMs in this adapter are ready.

virtual bool cCiAdapter::Reset ( int  Slot) [protected, pure virtual]

Resets the CAM in the given Slot.

Returns true if the operation was successful.

Implemented in cDvbCiAdapter, and cDvbCiAdapter.

Referenced by cCamSlot::Reset().

virtual bool cCiAdapter::Reset ( int  Slot) [protected, pure virtual]

Resets the CAM in the given Slot.

Returns true if the operation was successful.

Implemented in cDvbCiAdapter, and cDvbCiAdapter.

virtual void cCiAdapter::Write ( const uint8_t *  Buffer,
int  Length 
) [protected, pure virtual]

Writes Length bytes of the given Buffer.

Implemented in cDvbCiAdapter, and cDvbCiAdapter.

Referenced by cCamSlot::Write().

virtual void cCiAdapter::Write ( const uint8_t *  Buffer,
int  Length 
) [protected, pure virtual]

Writes Length bytes of the given Buffer.

Implemented in cDvbCiAdapter, and cDvbCiAdapter.


Friends And Related Function Documentation

cCamSlot [friend]

Definition at line 80 of file ci.h.

Referenced by cDvbCiAdapter::cDvbCiAdapter().


Member Data Documentation

Definition at line 82 of file ci.h.

Referenced by cCamSlot::Assign(), cCiAdapter(), and cCamSlot::Device().

Definition at line 83 of file ci.h.

Referenced by Action(), AddCamSlot(), cCiAdapter(), Ready(), and ~cCiAdapter().


The documentation for this class was generated from the following files: