cDvbTuner Class Reference

Inheritance diagram for cDvbTuner:

Inheritance graph
[legend]
Collaboration diagram for cDvbTuner:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cDvbTuner (int Fd_Frontend, int CardIndex, fe_type_t FrontendType, cCiHandler *CiHandler)
virtual ~cDvbTuner ()
bool IsTunedTo (const cChannel *Channel) const
void Set (const cChannel *Channel, bool Tune)
bool Locked (int TimeoutMs=0)

Private Types

enum  eTunerStatus { tsIdle, tsSet, tsTuned, tsLocked }

Private Member Functions

bool GetFrontendStatus (fe_status_t &Status, int TimeoutMs=0)
bool SetFrontend (void)
virtual void Action (void)

Private Attributes

int fd_frontend
int cardIndex
int tuneTimeout
int lockTimeout
time_t lastTimeoutReport
fe_type_t frontendType
cCiHandlerciHandler
cChannel channel
const char * diseqcCommands
eTunerStatus tunerStatus
cMutex mutex
cCondVar locked
cCondVar newSet


Detailed Description

Definition at line 71 of file dvbdevice.c.


Member Enumeration Documentation

enum cDvbTuner::eTunerStatus [private]

Enumerator:
tsIdle 
tsSet 
tsTuned 
tsLocked 

Definition at line 73 of file dvbdevice.c.


Constructor & Destructor Documentation

cDvbTuner::cDvbTuner ( int  Fd_Frontend,
int  CardIndex,
fe_type_t  FrontendType,
cCiHandler CiHandler 
)

Definition at line 98 of file dvbdevice.c.

References cardIndex, CHECK, ciHandler, diseqcCommands, fd_frontend, frontendType, lastTimeoutReport, lockTimeout, cThread::SetDescription(), cThread::Start(), tsIdle, tunerStatus, and tuneTimeout.

Here is the call graph for this function:

cDvbTuner::~cDvbTuner (  )  [virtual]

Definition at line 115 of file dvbdevice.c.

References cCondVar::Broadcast(), cThread::Cancel(), locked, newSet, tsIdle, and tunerStatus.

Here is the call graph for this function:


Member Function Documentation

bool cDvbTuner::GetFrontendStatus ( fe_status_t &  Status,
int  TimeoutMs = 0 
) [private]

Definition at line 150 of file dvbdevice.c.

References fd_frontend, and cPoller::Poll().

Referenced by Action().

Here is the call graph for this function:

bool cDvbTuner::SetFrontend ( void   )  [private]

Definition at line 178 of file dvbdevice.c.

References cChannel::Bandwidth(), cardIndex, channel, CHECK, cChannel::CoderateH(), cChannel::CoderateL(), cDiseqc::Codes(), cDiseqc::Commands(), cDiseqc::daCodes, cDiseqc::daMiniA, cDiseqc::daMiniB, cDiseqc::daNone, cDiseqc::daToneOff, cDiseqc::daToneOn, cDiseqc::daVoltage13, cDiseqc::daVoltage18, cSetup::DiSEqC, diseqcCommands, Diseqcs, DVBC_LOCK_TIMEOUT, DVBC_TUNE_TIMEOUT, DVBS_LOCK_TIMEOUT, DVBS_TUNE_TIMEOUT, DVBT_LOCK_TIMEOUT, DVBT_TUNE_TIMEOUT, esyslog, cDiseqc::Execute(), fd_frontend, cChannel::Frequency(), FrequencyToHz(), frontendType, cDiseqcs::Get(), cChannel::Guard(), cChannel::Hierarchy(), cChannel::Inversion(), cSetup::LnbFrequHi, cSetup::LnbFrequLo, cSetup::LnbSLOF, lockTimeout, cDiseqc::Lof(), min(), cChannel::Modulation(), cChannel::Number(), cChannel::Polarization(), Setup, cChannel::Source(), cChannel::Srate(), cChannel::Transmission(), and tuneTimeout.

Referenced by Action().

Here is the call graph for this function:

void cDvbTuner::Action ( void   )  [private, virtual]

A derived cThread class must implement the code it wants to execute as a separate thread in this function. If this is a loop, it must check Running() repeatedly to see whether it's time to stop.

Implements cThread.

Definition at line 294 of file dvbdevice.c.

References cCondVar::Broadcast(), cardIndex, channel, ciHandler, diseqcCommands, GetFrontendStatus(), isyslog, lastTimeoutReport, locked, lockTimeout, mutex, newSet, cChannel::Number(), cCiHandler::Process(), cThread::Running(), cTimeMs::Set(), SetFrontend(), cTimeMs::TimedOut(), cCondVar::TimedWait(), cChannel::Transponder(), tsIdle, tsLocked, tsSet, tsTuned, tunerStatus, and tuneTimeout.

Here is the call graph for this function:

bool cDvbTuner::IsTunedTo ( const cChannel Channel  )  const

Definition at line 123 of file dvbdevice.c.

References channel, cChannel::Source(), cChannel::Transponder(), tsIdle, and tunerStatus.

Referenced by cDvbDevice::IsTunedToTransponder(), cDvbDevice::ProvidesChannel(), and cDvbDevice::SetChannelDevice().

Here is the call graph for this function:

void cDvbTuner::Set ( const cChannel Channel,
bool  Tune 
)

Definition at line 128 of file dvbdevice.c.

References cCondVar::Broadcast(), channel, lastTimeoutReport, mutex, newSet, tsSet, and tunerStatus.

Referenced by cDvbDevice::SetChannelDevice().

Here is the call graph for this function:

bool cDvbTuner::Locked ( int  TimeoutMs = 0  ) 

Definition at line 138 of file dvbdevice.c.

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

Referenced by cDvbDevice::HasLock().

Here is the call graph for this function:


Member Data Documentation

int cDvbTuner::fd_frontend [private]

Definition at line 74 of file dvbdevice.c.

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

int cDvbTuner::cardIndex [private]

Definition at line 75 of file dvbdevice.c.

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

int cDvbTuner::tuneTimeout [private]

Definition at line 76 of file dvbdevice.c.

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

int cDvbTuner::lockTimeout [private]

Definition at line 77 of file dvbdevice.c.

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

time_t cDvbTuner::lastTimeoutReport [private]

Definition at line 78 of file dvbdevice.c.

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

fe_type_t cDvbTuner::frontendType [private]

Definition at line 79 of file dvbdevice.c.

Referenced by cDvbTuner(), and SetFrontend().

cCiHandler* cDvbTuner::ciHandler [private]

Definition at line 80 of file dvbdevice.c.

Referenced by Action(), and cDvbTuner().

cChannel cDvbTuner::channel [private]

Definition at line 81 of file dvbdevice.c.

Referenced by Action(), IsTunedTo(), Set(), and SetFrontend().

const char* cDvbTuner::diseqcCommands [private]

Definition at line 82 of file dvbdevice.c.

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

eTunerStatus cDvbTuner::tunerStatus [private]

Definition at line 83 of file dvbdevice.c.

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

cMutex cDvbTuner::mutex [private]

Reimplemented from cThread.

Definition at line 84 of file dvbdevice.c.

Referenced by Action(), Locked(), and Set().

cCondVar cDvbTuner::locked [private]

Definition at line 85 of file dvbdevice.c.

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

cCondVar cDvbTuner::newSet [private]

Definition at line 86 of file dvbdevice.c.

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


The documentation for this class was generated from the following file:
Generated on Tue Nov 6 20:11:22 2007 for VDR by  doxygen 1.5.3-20071008