EITScanner Class Reference

Acts as glue between ChannelBase, EITSource, and EITHelper. More...

#include <eitscanner.h>

List of all members.

Public Member Functions

 EITScanner (uint cardnum)
 ~EITScanner ()
void StartPassiveScan (ChannelBase *, EITSource *)
void StopPassiveScan (void)
 Stops inserting Event Information Tables into DB.
void StartActiveScan (TVRec *, uint max_seconds_per_source)
void StopActiveScan (void)

Protected Member Functions

void run (void)
 This runs the event loop for EITScanner until 'exitThread' is true.

Private Member Functions

void TeardownAll (void)

Static Private Member Functions

static void * SpawnEventLoop (void *)
static void RescheduleRecordings (void)
 Tells scheduler about programming changes.

Private Attributes

QMutex lock
ChannelBasechannel
EITSourceeitSource
EITHelpereitHelper
MThreadeventThread
volatile bool exitThread
QWaitCondition exitThreadCond
TVRecrec
volatile bool activeScan
volatile bool activeScanStopped
QWaitCondition activeScanCond
QDateTime activeScanNextTrig
uint activeScanTrigTime
QStringList activeScanChannels
QStringList::iterator activeScanNextChan
uint cardnum

Static Private Attributes

static QMutex resched_lock
static QDateTime resched_next_time = QDateTime::currentDateTime()
static const uint kMinRescheduleInterval = 150
 Minumum number of seconds between reschedules.

Detailed Description

Acts as glue between ChannelBase, EITSource, and EITHelper.

This is the class where the "EIT Crawl" is implemented.

Definition at line 30 of file eitscanner.h.


Constructor & Destructor Documentation

EITScanner::EITScanner ( uint  cardnum  ) 

Definition at line 35 of file eitscanner.cpp.

EITScanner::~EITScanner (  )  [inline]

Definition at line 34 of file eitscanner.h.


Member Function Documentation

void EITScanner::StartPassiveScan ( ChannelBase _channel,
EITSource _eitSource 
)

Definition at line 195 of file eitscanner.cpp.

Referenced by TVRec::TuningSignalCheck().

void EITScanner::StopPassiveScan ( void   ) 

Stops inserting Event Information Tables into DB.

Definition at line 214 of file eitscanner.cpp.

Referenced by StopActiveScan(), and TVRec::TuningShutdowns().

void EITScanner::StartActiveScan ( TVRec _rec,
uint  max_seconds_per_source 
)

Definition at line 229 of file eitscanner.cpp.

Referenced by TVRec::run().

void EITScanner::StopActiveScan ( void   ) 
void EITScanner::run ( void   )  [protected]

This runs the event loop for EITScanner until 'exitThread' is true.

Definition at line 73 of file eitscanner.cpp.

void EITScanner::TeardownAll ( void   )  [private]

Definition at line 49 of file eitscanner.cpp.

Referenced by ~EITScanner().

static void* EITScanner::SpawnEventLoop ( void *   )  [static, private]
void EITScanner::RescheduleRecordings ( void   )  [static, private]

Tells scheduler about programming changes.

This implements some very basic rate limiting. If a call is made to this within kMinRescheduleInterval of the last call it is ignored.

Definition at line 172 of file eitscanner.cpp.

Referenced by run().


Member Data Documentation

QMutex EITScanner::lock [private]

Definition at line 51 of file eitscanner.h.

Referenced by run(), StartPassiveScan(), StopActiveScan(), StopPassiveScan(), and TeardownAll().

Definition at line 52 of file eitscanner.h.

Referenced by StartPassiveScan(), and StopPassiveScan().

Definition at line 53 of file eitscanner.h.

Referenced by run(), StartPassiveScan(), and StopPassiveScan().

Definition at line 55 of file eitscanner.h.

Referenced by EITScanner(), run(), StartPassiveScan(), StopPassiveScan(), and TeardownAll().

Definition at line 56 of file eitscanner.h.

Referenced by EITScanner(), and TeardownAll().

volatile bool EITScanner::exitThread [private]

Definition at line 57 of file eitscanner.h.

Referenced by run(), and TeardownAll().

QWaitCondition EITScanner::exitThreadCond [private]

Definition at line 58 of file eitscanner.h.

Referenced by run(), StopActiveScan(), and TeardownAll().

TVRec* EITScanner::rec [private]

Definition at line 60 of file eitscanner.h.

Referenced by run(), StartActiveScan(), and StopActiveScan().

volatile bool EITScanner::activeScan [private]

Definition at line 61 of file eitscanner.h.

Referenced by run(), StartActiveScan(), and StopActiveScan().

volatile bool EITScanner::activeScanStopped [private]

Definition at line 62 of file eitscanner.h.

Referenced by run(), StartActiveScan(), and StopActiveScan().

QWaitCondition EITScanner::activeScanCond [private]

Definition at line 63 of file eitscanner.h.

Referenced by run(), and StopActiveScan().

QDateTime EITScanner::activeScanNextTrig [private]

Definition at line 64 of file eitscanner.h.

Referenced by run(), and StartActiveScan().

Definition at line 65 of file eitscanner.h.

Referenced by run(), and StartActiveScan().

QStringList EITScanner::activeScanChannels [private]

Definition at line 66 of file eitscanner.h.

Referenced by run(), and StartActiveScan().

QStringList::iterator EITScanner::activeScanNextChan [private]

Definition at line 67 of file eitscanner.h.

Referenced by run(), and StartActiveScan().

Definition at line 69 of file eitscanner.h.

QMutex EITScanner::resched_lock [static, private]

Definition at line 71 of file eitscanner.h.

Referenced by RescheduleRecordings().

QDateTime EITScanner::resched_next_time = QDateTime::currentDateTime() [static, private]

Definition at line 72 of file eitscanner.h.

Referenced by RescheduleRecordings().

const uint EITScanner::kMinRescheduleInterval = 150 [static, private]

Minumum number of seconds between reschedules.

Definition at line 75 of file eitscanner.h.

Referenced by RescheduleRecordings().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Thu May 24 06:42:00 2012 for MythTV by  doxygen 1.6.3