vdr 2.6.1
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
cSource Class Reference

#include <sources.h>

Public Types

enum  eSourceType {
  stNone = 0x00000000 , stAtsc = ('A' << 24) , stCable = ('C' << 24) , stSat = ('S' << 24) ,
  stTerr = ('T' << 24) , st_Mask = 0xFF000000 , st_Pos = 0x0000FFFF , st_Any = 0x00000E10 ,
  stNone = 0x00000000 , stAtsc = ('A' << 24) , stCable = ('C' << 24) , stSat = ('S' << 24) ,
  stTerr = ('T' << 24) , st_Mask = 0xFF000000 , st_Pos = 0x0000FFFF , st_Any = 0x00000E10
}
 
enum  eSourceType {
  stNone = 0x00000000 , stAtsc = ('A' << 24) , stCable = ('C' << 24) , stSat = ('S' << 24) ,
  stTerr = ('T' << 24) , st_Mask = 0xFF000000 , st_Pos = 0x0000FFFF , st_Any = 0x00000E10 ,
  stNone = 0x00000000 , stAtsc = ('A' << 24) , stCable = ('C' << 24) , stSat = ('S' << 24) ,
  stTerr = ('T' << 24) , st_Mask = 0xFF000000 , st_Pos = 0x0000FFFF , st_Any = 0x00000E10
}
 

Public Member Functions

 cSource (void)
 
 cSource (char Source, const char *Description)
 
 ~cSource ()
 
int Code (void) const
 
int Position (void)
 
const char * Description (void) const
 
bool Parse (const char *s)
 
 cSource (void)
 
 cSource (char Source, const char *Description)
 
 ~cSource ()
 
int Code (void) const
 
int Position (void)
 
const char * Description (void) const
 
bool Parse (const char *s)
 
- Public Member Functions inherited from cListObject
 cListObject (void)
 
virtual ~cListObject ()
 
virtual int Compare (const cListObject &ListObject) const
 
void Append (cListObject *Object)
 
void Insert (cListObject *Object)
 
void Unlink (void)
 
int Index (void) const
 
cListObjectPrev (void) const
 
cListObjectNext (void) const
 
 cListObject (void)
 
virtual ~cListObject ()
 
virtual int Compare (const cListObject &ListObject) const
 
void Append (cListObject *Object)
 
void Insert (cListObject *Object)
 
void Unlink (void)
 
int Index (void) const
 
cListObjectPrev (void) const
 
cListObjectNext (void) const
 

Static Public Member Functions

static bool Matches (int Code1, int Code2)
 
static int Position (int Code)
 
static char ToChar (int Code)
 
static cString ToString (int Code)
 
static int FromString (const char *s)
 
static int FromData (eSourceType SourceType, int Position=0, bool East=false)
 
static bool IsAtsc (int Code)
 
static bool IsCable (int Code)
 
static bool IsSat (int Code)
 
static bool IsTerr (int Code)
 
static bool IsType (int Code, char Source)
 
static bool Matches (int Code1, int Code2)
 
static int Position (int Code)
 
static char ToChar (int Code)
 
static cString ToString (int Code)
 
static int FromString (const char *s)
 
static int FromData (eSourceType SourceType, int Position=0, bool East=false)
 
static bool IsAtsc (int Code)
 
static bool IsCable (int Code)
 
static bool IsSat (int Code)
 
static bool IsTerr (int Code)
 
static bool IsType (int Code, char Source)
 

Private Attributes

int code
 
char * description
 

Detailed Description

Definition at line 15 of file include/vdr/sources.h.

Member Enumeration Documentation

◆ eSourceType [1/2]

Enumerator
stNone 
stAtsc 
stCable 
stSat 
stTerr 
st_Mask 
st_Pos 
st_Any 
stNone 
stAtsc 
stCable 
stSat 
stTerr 
st_Mask 
st_Pos 
st_Any 

Definition at line 17 of file include/vdr/sources.h.

◆ eSourceType [2/2]

Enumerator
stNone 
stAtsc 
stCable 
stSat 
stTerr 
st_Mask 
st_Pos 
st_Any 
stNone 
stAtsc 
stCable 
stSat 
stTerr 
st_Mask 
st_Pos 
st_Any 

Definition at line 17 of file sources.h.

Constructor & Destructor Documentation

◆ cSource() [1/4]

cSource::cSource ( void  )

Definition at line 14 of file sources.c.

References code, description, and stNone.

◆ cSource() [2/4]

cSource::cSource ( char  Source,
const char *  Description 
)

Definition at line 20 of file sources.c.

References code, description, and Description().

◆ ~cSource() [1/2]

cSource::~cSource ( )

Definition at line 26 of file sources.c.

References description.

◆ cSource() [3/4]

cSource::cSource ( void  )

◆ cSource() [4/4]

cSource::cSource ( char  Source,
const char *  Description 
)

◆ ~cSource() [2/2]

cSource::~cSource ( )

Member Function Documentation

◆ Code() [1/2]

int cSource::Code ( void  ) const
inline

◆ Code() [2/2]

int cSource::Code ( void  ) const
inline

Definition at line 34 of file sources.h.

References code.

◆ Description() [1/2]

const char * cSource::Description ( void  ) const
inline

Definition at line 44 of file include/vdr/sources.h.

References description.

Referenced by cSource(), and cMenuEditSrcItem::Set().

◆ Description() [2/2]

const char * cSource::Description ( void  ) const
inline

Definition at line 44 of file sources.h.

References description.

◆ FromData() [1/2]

int cSource::FromData ( eSourceType  SourceType,
int  Position = 0,
bool  East = false 
)
static

Definition at line 104 of file sources.c.

References code, Position(), st_Pos, and stSat.

Referenced by cNitFilter::Process().

◆ FromData() [2/2]

static int cSource::FromData ( eSourceType  SourceType,
int  Position = 0,
bool  East = false 
)
static

◆ FromString() [1/2]

int cSource::FromString ( const char *  s)
static

Definition at line 68 of file sources.c.

References code, esyslog, isempty(), st_Pos, stNone, and stSat.

Referenced by tChannelID::FromString(), cSetup::Parse(), cChannel::Parse(), cDiseqc::Parse(), and Parse().

◆ FromString() [2/2]

static int cSource::FromString ( const char *  s)
static

◆ IsAtsc() [1/2]

static bool cSource::IsAtsc ( int  Code)
inlinestatic

Definition at line 55 of file include/vdr/sources.h.

References Code(), st_Mask, and stAtsc.

Referenced by cChannel::IsAtsc().

◆ IsAtsc() [2/2]

static bool cSource::IsAtsc ( int  Code)
inlinestatic

Definition at line 55 of file sources.h.

References Code(), st_Mask, and stAtsc.

◆ IsCable() [1/2]

static bool cSource::IsCable ( int  Code)
inlinestatic

Definition at line 56 of file include/vdr/sources.h.

References Code(), st_Mask, and stCable.

Referenced by cChannel::IsCable(), and cSdtFilter::Process().

◆ IsCable() [2/2]

static bool cSource::IsCable ( int  Code)
inlinestatic

Definition at line 56 of file sources.h.

References Code(), st_Mask, and stCable.

◆ IsSat() [1/2]

static bool cSource::IsSat ( int  Code)
inlinestatic

◆ IsSat() [2/2]

static bool cSource::IsSat ( int  Code)
inlinestatic

Definition at line 57 of file sources.h.

References Code(), st_Mask, and stSat.

◆ IsTerr() [1/2]

static bool cSource::IsTerr ( int  Code)
inlinestatic

Definition at line 58 of file include/vdr/sources.h.

References Code(), st_Mask, and stTerr.

Referenced by cChannel::IsTerr(), and cChannel::TransponderDataToString().

◆ IsTerr() [2/2]

static bool cSource::IsTerr ( int  Code)
inlinestatic

Definition at line 58 of file sources.h.

References Code(), st_Mask, and stTerr.

◆ IsType() [1/2]

static bool cSource::IsType ( int  Code,
char  Source 
)
inlinestatic

Definition at line 59 of file include/vdr/sources.h.

References Code(), and st_Mask.

Referenced by cChannel::IsSourceType().

◆ IsType() [2/2]

static bool cSource::IsType ( int  Code,
char  Source 
)
inlinestatic

Definition at line 59 of file sources.h.

References Code(), and st_Mask.

◆ Matches() [1/2]

bool cSource::Matches ( int  Code1,
int  Code2 
)
static

Returns true if Code2 matches Code1.

This is simply a check whether the two codes are equal, except for the special case that Code1 is stSat|st_Any, in which case it matches any Code2 that is stSat.

Definition at line 40 of file sources.c.

References IsSat(), st_Any, and stSat.

Referenced by cDiseqcs::Get().

◆ Matches() [2/2]

static bool cSource::Matches ( int  Code1,
int  Code2 
)
static

Returns true if Code2 matches Code1.

This is simply a check whether the two codes are equal, except for the special case that Code1 is stSat|st_Any, in which case it matches any Code2 that is stSat.

◆ Parse() [1/2]

bool cSource::Parse ( const char *  s)

Definition at line 31 of file sources.c.

References code, description, FromString(), and stNone.

◆ Parse() [2/2]

bool cSource::Parse ( const char *  s)

◆ Position() [1/4]

int cSource::Position ( int  Code)
static

Definition at line 47 of file sources.c.

References Code(), and st_Pos.

◆ Position() [2/4]

static int cSource::Position ( int  Code)
static

◆ Position() [3/4]

int cSource::Position ( void  )
inline

Returns the orbital position of the satellite in case this is a DVB-S source (zero otherwise).

The returned value is in the range -1800...+1800, except for the special value 3600, which indicates "any position". This is used with positioners that can move the dish to any requested satellite within their range. A positive sign indicates a position east of Greenwich, while western positions have a negative sign. The absolute value is in "degrees * 10", which allows for a resolution of 1/10 of a degree.

Definition at line 35 of file include/vdr/sources.h.

References code, and Position().

Referenced by cDvbTuner::ExecuteDiseqc(), FromData(), Position(), cEITScanner::Process(), and ToString().

◆ Position() [4/4]

int cSource::Position ( void  )
inline

Returns the orbital position of the satellite in case this is a DVB-S source (zero otherwise).

The returned value is in the range -1800...+1800, except for the special value 3600, which indicates "any position". This is used with positioners that can move the dish to any requested satellite within their range. A positive sign indicates a position east of Greenwich, while western positions have a negative sign. The absolute value is in "degrees * 10", which allows for a resolution of 1/10 of a degree.

Definition at line 35 of file sources.h.

References code, and Position().

Referenced by Position().

◆ ToChar() [1/2]

static char cSource::ToChar ( int  Code)
inlinestatic

Definition at line 51 of file include/vdr/sources.h.

References Code(), and st_Mask.

Referenced by cSources::ContainsSourceType(), cChannel::Name(), and cChannel::ShortName().

◆ ToChar() [2/2]

static char cSource::ToChar ( int  Code)
inlinestatic

Definition at line 51 of file sources.h.

References Code(), and st_Mask.

◆ ToString() [1/2]

cString cSource::ToString ( int  Code)
static

◆ ToString() [2/2]

static cString cSource::ToString ( int  Code)
static

Member Data Documentation

◆ code

int cSource::code
private

Definition at line 28 of file include/vdr/sources.h.

Referenced by Code(), cSource(), FromData(), FromString(), Parse(), and Position().

◆ description

char * cSource::description
private

Definition at line 29 of file include/vdr/sources.h.

Referenced by cSource(), Description(), Parse(), and ~cSource().


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