SASC-NG
DVBSoftCAM

cFilter Class Reference

#include <filter.h>

Inheritance diagram for cFilter:

List of all members.

Protected Member Functions

 cFilter (void)
 cFilter (u_short Pid, u_char Tid, u_char Mask=0xFF)
virtual ~cFilter ()
virtual void SetStatus (bool On)
virtual void Process (u_short Pid, u_char Tid, const u_char *Data, int Length)=0
int Source (void)
 Returns the source of the data delivered to this filter.
int Transponder (void)
 Returns the transponder of the data delivered to this filter.
const cChannel * Channel (void)
 Returns the channel of the data delivered to this filter.
bool Matches (u_short Pid, u_char Tid)
 Indicates whether this filter wants to receive data from the given Pid/Tid.
void Set (u_short Pid, u_char Tid, u_char Mask=0xFF)
 Sets the given filter data by calling Add() with Sticky = true.
void Add (u_short Pid, u_char Tid, u_char Mask=0xFF, bool Sticky=false)
void Del (u_short Pid, u_char Tid, u_char Mask=0xFF)
 Deletes the given filter data from this filter.

Friends

class cSectionHandler

Detailed Description

Definition at line 41 of file filter.h.


Constructor & Destructor Documentation

cFilter::cFilter ( void  ) [protected]
cFilter::cFilter ( u_short  Pid,
u_char  Tid,
u_char  Mask = 0xFF 
) [protected]
virtual cFilter::~cFilter ( ) [protected, virtual]

Member Function Documentation

void cFilter::Add ( u_short  Pid,
u_char  Tid,
u_char  Mask = 0xFF,
bool  Sticky = false 
) [protected]

Adds the given filter data to this filter. If Sticky is true, this will survive a status change, otherwise it will be automatically deleted.

const cChannel* cFilter::Channel ( void  ) [protected]

Returns the channel of the data delivered to this filter.

void cFilter::Del ( u_short  Pid,
u_char  Tid,
u_char  Mask = 0xFF 
) [protected]

Deletes the given filter data from this filter.

bool cFilter::Matches ( u_short  Pid,
u_char  Tid 
) [protected]

Indicates whether this filter wants to receive data from the given Pid/Tid.

virtual void cFilter::Process ( u_short  Pid,
u_char  Tid,
const u_char *  Data,
int  Length 
) [protected, pure virtual]

Processes the data delivered to this filter. Pid and Tid is one of the combinations added to this filter by a previous call to Add(), Data is a pointer to Length bytes of data. This function will be called from the section handler's thread, so it has to use proper locking mechanisms in case it accesses any global data. It is guaranteed that if several cFilters are attached to the same cSectionHandler, only _one_ of them has its Process() function called at any given time. It is allowed that more than one cFilter are set up to receive the same Pid/Tid. The Process() function must return as soon as possible.

Implemented in cEitFilter, cNitFilter, cPatFilter, and cSdtFilter.

void cFilter::Set ( u_short  Pid,
u_char  Tid,
u_char  Mask = 0xFF 
) [protected]

Sets the given filter data by calling Add() with Sticky = true.

virtual void cFilter::SetStatus ( bool  On) [protected, virtual]

Turns this filter on or off, depending on the value of On. If the filter is turned off, any filter data that has been added without the Sticky parameter set to 'true' will be automatically deleted. Those parameters that have been added with Sticky set to 'true' will be automatically reused when SetStatus(true) is called.

Reimplemented in cNitFilter, cPatFilter, and cSdtFilter.

int cFilter::Source ( void  ) [protected]

Returns the source of the data delivered to this filter.

int cFilter::Transponder ( void  ) [protected]

Returns the transponder of the data delivered to this filter.


Friends And Related Function Documentation

friend class cSectionHandler [friend]

Definition at line 42 of file filter.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines