vdr 2.6.9
cDvbTuner Class Reference

Public Member Functions

 cDvbTuner (const cDvbDevice *Device, int Adapter, int Frontend)
 
virtual ~cDvbTuner ()
 
bool ProvidesDeliverySystem (int DeliverySystem) const
 
bool ProvidesModulation (int System, int StreamId, int Modulation) const
 
bool ProvidesFrontend (const cChannel *Channel, bool Activate=false) const
 
int Frontend (void) const
 
int FrontendType (void) const
 
const char * FrontendName (void)
 
int NumProvidedSystems (void) const
 
bool Bond (cDvbTuner *Tuner)
 
void UnBond (void)
 
bool BondingOk (const cChannel *Channel, bool ConsiderOccupied=false) const
 
const cChannel * GetTransponder (void) const
 
uint32_t SubsystemId (void) const
 
bool IsTunedTo (const cChannel *Channel) const
 
void SetChannel (const cChannel *Channel)
 
bool Locked (int TimeoutMs=0)
 
const cPositioner * Positioner (void) const
 
bool GetSignalStats (int &Valid, double *Strength=NULL, double *Cnr=NULL, double *BerPre=NULL, double *BerPost=NULL, double *Per=NULL, int *Status=NULL) const
 
int GetSignalStrength (void) const
 
int GetSignalQuality (void) const
 
void SetPowerSaveMode (bool On)
 
- 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)
 

Private Types

enum  eTunerStatus {
  tsIdle , tsSet , tsPositioning , tsTuned ,
  tsLocked
}
 

Private Member Functions

cString GetBondingParams (const cChannel *Channel=NULL) const
 
cDvbTuner * GetBondedMaster (void)
 
bool IsBondedMaster (void) const
 
void ClearEventQueue (void) const
 
bool GetFrontendStatus (fe_status_t &Status) const
 
cPositioner * GetPositioner (void)
 
void ExecuteDiseqc (const cDiseqc *Diseqc, int *Frequency)
 
void ResetToneAndVoltage (void)
 
bool SetFrontend (void)
 
virtual void Action (void)
 

Private Attributes

int frontendType
 
const cDvbDevice * device
 
int fd_frontend
 
int adapter
 
int frontend
 
cVector< cDvbFrontend * > dvbFrontends
 
cDvbFrontend * dvbFrontend
 
int numDeliverySystems
 
int numModulations
 
int tuneTimeout
 
int lockTimeout
 
time_t lastTimeoutReport
 
uint32_t lastUncValue
 
uint32_t lastUncDelta
 
time_t lastUncChange
 
cChannel channel
 
const cDiseqc * lastDiseqc
 
int diseqcOffset
 
int lastSource
 
cPositioner * positioner
 
const cScr * scr
 
bool lnbPowerTurnedOn
 
eTunerStatus tunerStatus
 
cMutex mutex
 
cCondVar locked
 
cCondVar newSet
 
cDvbTuner * bondedTuner
 
bool bondedMaster
 

Static Private Attributes

static cMutex bondMutex
 

Additional Inherited Members

- Static Public Member Functions inherited from cThread
static tThreadId ThreadId (void)
 
static tThreadId IsMainThread (void)
 
static void SetMainThreadId (void)
 
- Protected Member Functions inherited from cThread
void SetPriority (int Priority)
 
void SetIOPriority (int Priority)
 
void Lock (void)
 
void Unlock (void)
 
bool Running (void)
 
void Cancel (int WaitSeconds=0)
 

Detailed Description

Definition at line 532 of file dvbdevice.c.

Member Enumeration Documentation

◆ eTunerStatus

Enumerator
tsIdle 
tsSet 
tsPositioning 
tsTuned 
tsLocked 

Definition at line 535 of file dvbdevice.c.

Constructor & Destructor Documentation

◆ cDvbTuner()

◆ ~cDvbTuner()

cDvbTuner::~cDvbTuner ( )
virtual

Member Function Documentation

◆ Action()

◆ Bond()

bool cDvbTuner::Bond ( cDvbTuner * Tuner)

Definition at line 713 of file dvbdevice.c.

References adapter, bondedMaster, bondedTuner, bondMutex, dsyslog, esyslog, frontend, and ResetToneAndVoltage().

Referenced by cDvbDevice::Bond().

◆ BondingOk()

bool cDvbTuner::BondingOk ( const cChannel * Channel,
bool ConsiderOccupied = false ) const

Definition at line 762 of file dvbdevice.c.

References bondedTuner, bondMutex, GetBondingParams(), and IDLEPRIORITY.

Referenced by cDvbDevice::BondingOk().

◆ ClearEventQueue()

void cDvbTuner::ClearEventQueue ( void ) const
private

Definition at line 854 of file dvbdevice.c.

References fd_frontend, cPoller::Poll(), and TUNER_POLL_TIMEOUT.

Referenced by GetFrontendStatus(), GetSignalStats(), and GetSignalStrength().

◆ ExecuteDiseqc()

◆ Frontend()

int cDvbTuner::Frontend ( void ) const
inline

Definition at line 580 of file dvbdevice.c.

References frontend.

Referenced by cDvbTuner(), and cDvbDevice::Frontend().

◆ FrontendName()

const char * cDvbTuner::FrontendName ( void )
inline

Definition at line 582 of file dvbdevice.c.

References dvbFrontend, and cDvbFrontend::FrontendName().

Referenced by cDvbDevice::DeviceName().

◆ FrontendType()

int cDvbTuner::FrontendType ( void ) const
inline

Definition at line 581 of file dvbdevice.c.

References frontendType.

Referenced by cDvbDevice::DeviceType().

◆ GetBondedMaster()

cDvbTuner * cDvbTuner::GetBondedMaster ( void )
private

Definition at line 778 of file dvbdevice.c.

References adapter, bondedMaster, bondedTuner, bondMutex, dsyslog, and frontend.

Referenced by SetChannel().

◆ GetBondingParams()

◆ GetFrontendStatus()

bool cDvbTuner::GetFrontendStatus ( fe_status_t & Status) const
private

Definition at line 864 of file dvbdevice.c.

References ClearEventQueue(), and fd_frontend.

Referenced by Action(), and GetSignalQuality().

◆ GetPositioner()

cPositioner * cDvbTuner::GetPositioner ( void )
private

Definition at line 1483 of file dvbdevice.c.

References fd_frontend, cPositioner::GetPositioner(), positioner, and cPositioner::SetFrontend().

Referenced by ExecuteDiseqc().

◆ GetSignalQuality()

◆ GetSignalStats()

bool cDvbTuner::GetSignalStats ( int & Valid,
double * Strength = NULL,
double * Cnr = NULL,
double * BerPre = NULL,
double * BerPost = NULL,
double * Per = NULL,
int * Status = NULL ) const

◆ GetSignalStrength()

int cDvbTuner::GetSignalStrength ( void ) const

◆ GetTransponder()

const cChannel * cDvbTuner::GetTransponder ( void ) const
inline

Definition at line 587 of file dvbdevice.c.

References channel.

Referenced by cDvbDevice::GetCurrentlyTunedTransponder().

◆ IsBondedMaster()

bool cDvbTuner::IsBondedMaster ( void ) const
inlineprivate

Definition at line 566 of file dvbdevice.c.

References bondedMaster, and bondedTuner.

Referenced by SetFrontend().

◆ IsTunedTo()

bool cDvbTuner::IsTunedTo ( const cChannel * Channel) const

◆ Locked()

bool cDvbTuner::Locked ( int TimeoutMs = 0)

Definition at line 842 of file dvbdevice.c.

References locked, mutex, cCondVar::TimedWait(), tsLocked, and tunerStatus.

Referenced by cDvbDevice::HasLock().

◆ NumProvidedSystems()

int cDvbTuner::NumProvidedSystems ( void ) const
inline

Definition at line 583 of file dvbdevice.c.

References numDeliverySystems, and numModulations.

Referenced by cDvbDevice::NumProvidedSystems().

◆ Positioner()

const cPositioner * cDvbTuner::Positioner ( void ) const
inline

Definition at line 592 of file dvbdevice.c.

References positioner.

Referenced by ExecuteDiseqc(), and cDvbDevice::Positioner().

◆ ProvidesDeliverySystem()

bool cDvbTuner::ProvidesDeliverySystem ( int DeliverySystem) const

◆ ProvidesFrontend()

◆ ProvidesModulation()

bool cDvbTuner::ProvidesModulation ( int System,
int StreamId,
int Modulation ) const

Definition at line 678 of file dvbdevice.c.

References dvbFrontends, ProvidesModulation(), and cVector< T >::Size().

Referenced by ProvidesFrontend(), and ProvidesModulation().

◆ ResetToneAndVoltage()

void cDvbTuner::ResetToneAndVoltage ( void )
private

Definition at line 1549 of file dvbdevice.c.

References bondedTuner, CHECK, and fd_frontend.

Referenced by Bond(), ExecuteDiseqc(), SetChannel(), and SetFrontend().

◆ SetChannel()

◆ SetFrontend()

◆ SetPowerSaveMode()

◆ SubsystemId()

uint32_t cDvbTuner::SubsystemId ( void ) const
inline

Definition at line 588 of file dvbdevice.c.

References dvbFrontend, and cDvbFrontend::SubsystemId().

◆ UnBond()

void cDvbTuner::UnBond ( void )

Definition at line 729 of file dvbdevice.c.

References adapter, bondedMaster, bondedTuner, bondMutex, dsyslog, and frontend.

Referenced by cDvbDevice::UnBond(), and ~cDvbTuner().

Member Data Documentation

◆ adapter

◆ bondedMaster

bool cDvbTuner::bondedMaster
private

Definition at line 563 of file dvbdevice.c.

Referenced by Bond(), cDvbTuner(), GetBondedMaster(), IsBondedMaster(), and UnBond().

◆ bondedTuner

cDvbTuner* cDvbTuner::bondedTuner
private

◆ bondMutex

cMutex cDvbTuner::bondMutex
staticprivate

Definition at line 534 of file dvbdevice.c.

Referenced by Bond(), BondingOk(), GetBondedMaster(), SetChannel(), and UnBond().

◆ channel

◆ device

const cDvbDevice* cDvbTuner::device
private

Definition at line 537 of file dvbdevice.c.

Referenced by Action(), cDvbTuner(), GetBondingParams(), SetChannel(), and SetFrontend().

◆ diseqcOffset

int cDvbTuner::diseqcOffset
private

Definition at line 553 of file dvbdevice.c.

Referenced by Action(), cDvbTuner(), ExecuteDiseqc(), and SetChannel().

◆ dvbFrontend

cDvbFrontend* cDvbTuner::dvbFrontend
mutableprivate

◆ dvbFrontends

cVector<cDvbFrontend *> cDvbTuner::dvbFrontends
private

◆ fd_frontend

◆ frontend

◆ frontendType

int cDvbTuner::frontendType
private

Definition at line 536 of file dvbdevice.c.

Referenced by cDvbTuner(), FrontendType(), GetSignalQuality(), and SetFrontend().

◆ lastDiseqc

const cDiseqc* cDvbTuner::lastDiseqc
mutableprivate

Definition at line 552 of file dvbdevice.c.

Referenced by Action(), cDvbTuner(), ProvidesFrontend(), SetFrontend(), and SetPowerSaveMode().

◆ lastSource

int cDvbTuner::lastSource
mutableprivate

Definition at line 554 of file dvbdevice.c.

Referenced by Action(), cDvbTuner(), ProvidesFrontend(), SetFrontend(), and SetPowerSaveMode().

◆ lastTimeoutReport

time_t cDvbTuner::lastTimeoutReport
private

Definition at line 547 of file dvbdevice.c.

Referenced by Action(), cDvbTuner(), and SetChannel().

◆ lastUncChange

time_t cDvbTuner::lastUncChange
mutableprivate

Definition at line 550 of file dvbdevice.c.

Referenced by cDvbTuner(), GetSignalQuality(), ProvidesFrontend(), and SetPowerSaveMode().

◆ lastUncDelta

uint32_t cDvbTuner::lastUncDelta
mutableprivate

Definition at line 549 of file dvbdevice.c.

Referenced by cDvbTuner(), GetSignalQuality(), ProvidesFrontend(), and SetPowerSaveMode().

◆ lastUncValue

uint32_t cDvbTuner::lastUncValue
mutableprivate

Definition at line 548 of file dvbdevice.c.

Referenced by cDvbTuner(), GetSignalQuality(), ProvidesFrontend(), and SetPowerSaveMode().

◆ lnbPowerTurnedOn

bool cDvbTuner::lnbPowerTurnedOn
mutableprivate

Definition at line 557 of file dvbdevice.c.

Referenced by cDvbTuner(), ExecuteDiseqc(), ProvidesFrontend(), and SetPowerSaveMode().

◆ locked

cCondVar cDvbTuner::locked
private

Definition at line 560 of file dvbdevice.c.

Referenced by Action(), Locked(), and ~cDvbTuner().

◆ lockTimeout

int cDvbTuner::lockTimeout
private

Definition at line 546 of file dvbdevice.c.

Referenced by Action(), cDvbTuner(), and SetFrontend().

◆ mutex

cMutex cDvbTuner::mutex
mutableprivate

Definition at line 559 of file dvbdevice.c.

Referenced by Action(), Locked(), ProvidesFrontend(), SetChannel(), and SetPowerSaveMode().

◆ newSet

cCondVar cDvbTuner::newSet
private

Definition at line 561 of file dvbdevice.c.

Referenced by Action(), SetChannel(), and ~cDvbTuner().

◆ numDeliverySystems

int cDvbTuner::numDeliverySystems
private

Definition at line 543 of file dvbdevice.c.

Referenced by cDvbTuner(), and NumProvidedSystems().

◆ numModulations

int cDvbTuner::numModulations
private

Definition at line 544 of file dvbdevice.c.

Referenced by cDvbTuner(), and NumProvidedSystems().

◆ positioner

cPositioner* cDvbTuner::positioner
private

Definition at line 555 of file dvbdevice.c.

Referenced by Action(), cDvbTuner(), ExecuteDiseqc(), GetPositioner(), and Positioner().

◆ scr

const cScr* cDvbTuner::scr
private

Definition at line 556 of file dvbdevice.c.

Referenced by Action(), cDvbTuner(), ExecuteDiseqc(), and SetFrontend().

◆ tunerStatus

eTunerStatus cDvbTuner::tunerStatus
private

Definition at line 558 of file dvbdevice.c.

Referenced by Action(), cDvbTuner(), IsTunedTo(), Locked(), SetChannel(), SetPowerSaveMode(), and ~cDvbTuner().

◆ tuneTimeout

int cDvbTuner::tuneTimeout
private

Definition at line 545 of file dvbdevice.c.

Referenced by Action(), cDvbTuner(), and SetFrontend().


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