vdr 2.6.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
cDvbCiAdapter Class Reference

#include <dvbci.h>

Public Member Functions

virtual ~cDvbCiAdapter ()
 
virtual ~cDvbCiAdapter ()
 
- Public Member Functions inherited from cCiAdapter
 cCiAdapter (void)
 
virtual ~cCiAdapter ()
 
 cCiAdapter (void)
 
virtual ~cCiAdapter ()
 
- Public Member Functions inherited from cThread
 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)
 
 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)
 

Static Public Member Functions

static cDvbCiAdapterCreateCiAdapter (cDevice *Device, int Fd)
 
static cDvbCiAdapterCreateCiAdapter (cDevice *Device, int Fd)
 
- Static Public Member Functions inherited from cThread
static tThreadId ThreadId (void)
 
static tThreadId IsMainThread (void)
 
static void SetMainThreadId (void)
 
static tThreadId ThreadId (void)
 
static tThreadId IsMainThread (void)
 
static void SetMainThreadId (void)
 

Protected Member Functions

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)
 
 cDvbCiAdapter (cDevice *Device, int Fd)
 
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)
 
 cDvbCiAdapter (cDevice *Device, int Fd)
 
- Protected Member Functions inherited from cCiAdapter
cCamSlotItCamSlot (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)
 
cCamSlotItCamSlot (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)
 
- Protected Member Functions inherited from cThread
void SetPriority (int Priority)
 
void SetIOPriority (int Priority)
 
void Lock (void)
 
void Unlock (void)
 
virtual void Action (void)=0
 
bool Running (void)
 
void Cancel (int WaitSeconds=0)
 
void SetPriority (int Priority)
 
void SetIOPriority (int Priority)
 
void Lock (void)
 
void Unlock (void)
 
virtual void Action (void)=0
 
bool Running (void)
 
void Cancel (int WaitSeconds=0)
 

Private Attributes

cDevicedevice
 
int fd
 

Detailed Description

Definition at line 15 of file dvbci.h.

Constructor & Destructor Documentation

◆ cDvbCiAdapter() [1/2]

cDvbCiAdapter::cDvbCiAdapter ( cDevice Device,
int  Fd 
)
protected

◆ ~cDvbCiAdapter() [1/2]

cDvbCiAdapter::~cDvbCiAdapter ( )
virtual

Definition at line 41 of file dvbci.c.

References cThread::Cancel().

◆ cDvbCiAdapter() [2/2]

cDvbCiAdapter::cDvbCiAdapter ( cDevice Device,
int  Fd 
)
protected

◆ ~cDvbCiAdapter() [2/2]

virtual cDvbCiAdapter::~cDvbCiAdapter ( )
virtual

Member Function Documentation

◆ Assign() [1/2]

bool cDvbCiAdapter::Assign ( cDevice Device,
bool  Query = false 
)
protectedvirtual

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 from cCiAdapter.

Definition at line 94 of file dvbci.c.

References device.

◆ Assign() [2/2]

virtual bool cDvbCiAdapter::Assign ( cDevice Device,
bool  Query = false 
)
protectedvirtual

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 from cCiAdapter.

◆ CreateCiAdapter() [1/2]

cDvbCiAdapter * cDvbCiAdapter::CreateCiAdapter ( cDevice Device,
int  Fd 
)
static

Definition at line 102 of file dvbci.c.

References cDvbCiAdapter().

Referenced by cDvbDevice::cDvbDevice().

◆ CreateCiAdapter() [2/2]

static cDvbCiAdapter * cDvbCiAdapter::CreateCiAdapter ( cDevice Device,
int  Fd 
)
static

◆ ModuleStatus() [1/2]

eModuleStatus cDvbCiAdapter::ModuleStatus ( int  Slot)
protectedvirtual

Returns the status of the CAM in the given Slot.

Reimplemented from cCiAdapter.

Definition at line 79 of file dvbci.c.

References device, cDevice::DeviceNumber(), esyslog, fd, msNone, msPresent, and msReady.

◆ ModuleStatus() [2/2]

virtual eModuleStatus cDvbCiAdapter::ModuleStatus ( int  Slot)
protectedvirtual

Returns the status of the CAM in the given Slot.

Reimplemented from cCiAdapter.

◆ Read() [1/2]

int cDvbCiAdapter::Read ( uint8_t *  Buffer,
int  MaxLength 
)
protectedvirtual

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 from cCiAdapter.

Definition at line 46 of file dvbci.c.

References CAM_READ_TIMEOUT, device, cDevice::DeviceNumber(), esyslog, fd, and safe_read().

◆ Read() [2/2]

virtual int cDvbCiAdapter::Read ( uint8_t *  Buffer,
int  MaxLength 
)
protectedvirtual

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 from cCiAdapter.

◆ Reset() [1/2]

bool cDvbCiAdapter::Reset ( int  Slot)
protectedvirtual

Resets the CAM in the given Slot.

Returns true if the operation was successful.

Reimplemented from cCiAdapter.

Definition at line 70 of file dvbci.c.

References device, cDevice::DeviceNumber(), esyslog, and fd.

◆ Reset() [2/2]

virtual bool cDvbCiAdapter::Reset ( int  Slot)
protectedvirtual

Resets the CAM in the given Slot.

Returns true if the operation was successful.

Reimplemented from cCiAdapter.

◆ Write() [1/2]

void cDvbCiAdapter::Write ( const uint8_t *  Buffer,
int  Length 
)
protectedvirtual

Writes Length bytes of the given Buffer.

Reimplemented from cCiAdapter.

Definition at line 62 of file dvbci.c.

References device, cDevice::DeviceNumber(), esyslog, fd, and safe_write().

◆ Write() [2/2]

virtual void cDvbCiAdapter::Write ( const uint8_t *  Buffer,
int  Length 
)
protectedvirtual

Writes Length bytes of the given Buffer.

Reimplemented from cCiAdapter.

Member Data Documentation

◆ device

cDevice * cDvbCiAdapter::device
private

Definition at line 17 of file dvbci.h.

Referenced by Assign(), cDvbCiAdapter(), ModuleStatus(), Read(), Reset(), and Write().

◆ fd

int cDvbCiAdapter::fd
private

Definition at line 18 of file dvbci.h.

Referenced by cDvbCiAdapter(), ModuleStatus(), Read(), Reset(), and Write().


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