MythTV  master
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
DiSEqCDevLNB Class Reference

LNB Class. More...

#include <diseqc.h>

Inheritance diagram for DiSEqCDevLNB:
Inheritance graph
[legend]
Collaboration diagram for DiSEqCDevLNB:
Collaboration graph
[legend]

Public Types

enum  dvbdev_lnb_t { kTypeFixed = 0, kTypeVoltageControl = 1, kTypeVoltageAndToneControl = 2, kTypeBandstacked = 3 }
 
- Public Types inherited from DiSEqCDevDevice
enum  dvbdev_t { kTypeSwitch = 0, kTypeRotor = 1, kTypeSCR = 2, kTypeLNB = 3 }
 

Public Member Functions

 DiSEqCDevLNB (DiSEqCDevTree &tree, uint devid)
 
bool Execute (const DiSEqCDevSettings &, const DTVMultiplex &) override
 Applies DiSEqC settings to this node and any children. More...
 
bool Load (void) override
 Loads this device from the database. More...
 
bool Store (void) const override
 Stores this device to the database. More...
 
void SetType (dvbdev_lnb_t type)
 
void SetLOFSwitch (uint lof_switch)
 
void SetLOFHigh (uint lof_hi)
 
void SetLOFLow (uint lof_lo)
 
void SetPolarityInverted (bool inv)
 
dvbdev_lnb_t GetType (void) const
 
uint GetLOFSwitch (void) const
 
uint GetLOFHigh (void) const
 
uint GetLOFLow (void) const
 
bool IsPolarityInverted (void) const
 
bool IsHighBand (const DTVMultiplex &) const
 Determine if the high frequency band is active (for switchable LNBs). More...
 
bool IsHorizontal (const DTVMultiplex &) const
 Determine if horizontal polarity is active (for switchable LNBs). More...
 
uint32_t GetIntermediateFrequency (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) const
 Calculate proper intermediate frequency for the given settings and tuning parameters. More...
 
uint GetVoltage (const DiSEqCDevSettings &, const DTVMultiplex &) const override
 Retrives the desired voltage for this config. More...
 
- Public Member Functions inherited from DiSEqCDevDevice
 DiSEqCDevDevice (DiSEqCDevTree &tree, uint devid)
 
virtual ~DiSEqCDevDevice ()
 
virtual void Reset (void)
 Resets to the last known settings for this device. More...
 
void SetDeviceType (dvbdev_t type)
 
void SetParent (DiSEqCDevDevice *parent)
 
void SetOrdinal (uint ordinal)
 
void SetDescription (const QString &desc)
 
void SetRepeatCount (uint repeat)
 
virtual bool SetChild (uint, DiSEqCDevDevice *)
 Changes the nth child of this node. More...
 
dvbdev_t GetDeviceType (void) const
 
uint GetDeviceID (void) const
 
bool IsRealDeviceID (void) const
 
DiSEqCDevDeviceGetParent (void) const
 
uint GetOrdinal (void) const
 
QString GetDescription (void) const
 
uint GetRepeatCount (void) const
 
virtual uint GetChildCount (void) const
 Retrieves the proper number of children for this node. More...
 
virtual bool IsCommandNeeded (const DiSEqCDevSettings &, const DTVMultiplex &) const
 Determines if this device or any child will be sending a command for the given configuration chain. More...
 
DiSEqCDevDeviceFindDevice (uint dev_id)
 Returns a device by ID. More...
 
virtual DiSEqCDevDeviceGetSelectedChild (const DiSEqCDevSettings &) const
 Retrieves the selected child for this configuration, if any. More...
 
virtual DiSEqCDevDeviceGetChild (uint)
 Retrieves the nth child of this node. More...
 

Static Public Member Functions

static QString LNBTypeToString (dvbdev_lnb_t type)
 
static dvbdev_lnb_t LNBTypeFromString (const QString &type)
 
- Static Public Member Functions inherited from DiSEqCDevDevice
static QString DevTypeToString (dvbdev_t type)
 
static dvbdev_t DevTypeFromString (const QString &type)
 
static DiSEqCDevDeviceCreateById (DiSEqCDevTree &tree, uint devid)
 
static DiSEqCDevDeviceCreateByType (DiSEqCDevTree &tree, dvbdev_t type, uint dev_id=0)
 

Private Attributes

dvbdev_lnb_t m_type {kTypeVoltageAndToneControl}
 
uint m_lofSwitch {11700000}
 
uint m_lofHi {10600000}
 
uint m_lofLo { 9750000}
 
bool m_pol_inv {false}
 If a signal is circularly polarized the polarity will flip on each reflection, so antenna systems with an even number of reflectors will need to set this value. More...
 

Static Private Attributes

static const TypeTable kLNBTypeTable [5]
 

Additional Inherited Members

- Protected Member Functions inherited from DiSEqCDevDevice
void SetDeviceID (uint devid) const
 
- Static Protected Member Functions inherited from DiSEqCDevDevice
static QString TableToString (uint type, const TypeTable *table)
 
static uint TableFromString (const QString &type, const TypeTable *table)
 
- Protected Attributes inherited from DiSEqCDevDevice
uint m_devid
 
dvbdev_t m_devType {kTypeLNB}
 
QString m_desc
 
DiSEqCDevTreem_tree
 
DiSEqCDevDevicem_parent {nullptr}
 
uint m_ordinal {0}
 
uint m_repeat {1}
 

Detailed Description

LNB Class.

Definition at line 438 of file diseqc.h.

Member Enumeration Documentation

◆ dvbdev_lnb_t

Enumerator
kTypeFixed 
kTypeVoltageControl 
kTypeVoltageAndToneControl 
kTypeBandstacked 

Definition at line 450 of file diseqc.h.

Constructor & Destructor Documentation

◆ DiSEqCDevLNB()

DiSEqCDevLNB::DiSEqCDevLNB ( DiSEqCDevTree tree,
uint  devid 
)
inline

Definition at line 441 of file diseqc.h.

Member Function Documentation

◆ Execute()

bool DiSEqCDevLNB::Execute ( const DiSEqCDevSettings settings,
const DTVMultiplex tuning 
)
overridevirtual

Applies DiSEqC settings to this node and any children.

Parameters
settingsConfiguration chain to apply.
tuningTuning parameters.
Returns
True if execution completed successfully.

Implements DiSEqCDevDevice.

Definition at line 2411 of file diseqc.cpp.

◆ Load()

bool DiSEqCDevLNB::Load ( void  )
overridevirtual

Loads this device from the database.

Returns
True if successful.

Implements DiSEqCDevDevice.

Definition at line 2434 of file diseqc.cpp.

◆ Store()

bool DiSEqCDevLNB::Store ( void  ) const
overridevirtual

Stores this device to the database.

Returns
True if successful.

Implements DiSEqCDevDevice.

Definition at line 2464 of file diseqc.cpp.

◆ SetType()

void DiSEqCDevLNB::SetType ( dvbdev_lnb_t  type)
inline

Definition at line 457 of file diseqc.h.

Referenced by LNBTypeSetting::Save().

◆ SetLOFSwitch()

void DiSEqCDevLNB::SetLOFSwitch ( uint  lof_switch)
inline

Definition at line 458 of file diseqc.h.

Referenced by LNBLOFSwitchSetting::Save().

◆ SetLOFHigh()

void DiSEqCDevLNB::SetLOFHigh ( uint  lof_hi)
inline

Definition at line 459 of file diseqc.h.

Referenced by LNBLOFHighSetting::Save().

◆ SetLOFLow()

void DiSEqCDevLNB::SetLOFLow ( uint  lof_lo)
inline

Definition at line 460 of file diseqc.h.

Referenced by LNBLOFLowSetting::Save().

◆ SetPolarityInverted()

void DiSEqCDevLNB::SetPolarityInverted ( bool  inv)
inline

Definition at line 461 of file diseqc.h.

Referenced by LNBPolarityInvertedSetting::Save().

◆ GetType()

dvbdev_lnb_t DiSEqCDevLNB::GetType ( void  ) const
inline

Definition at line 464 of file diseqc.h.

Referenced by FindPreset(), and LNBTypeSetting::Load().

◆ GetLOFSwitch()

uint DiSEqCDevLNB::GetLOFSwitch ( void  ) const
inline

Definition at line 465 of file diseqc.h.

Referenced by FindPreset(), and LNBLOFSwitchSetting::Load().

◆ GetLOFHigh()

uint DiSEqCDevLNB::GetLOFHigh ( void  ) const
inline

Definition at line 466 of file diseqc.h.

Referenced by FindPreset(), and LNBLOFHighSetting::Load().

◆ GetLOFLow()

uint DiSEqCDevLNB::GetLOFLow ( void  ) const
inline

Definition at line 467 of file diseqc.h.

Referenced by FindPreset(), and LNBLOFLowSetting::Load().

◆ IsPolarityInverted()

bool DiSEqCDevLNB::IsPolarityInverted ( void  ) const
inline

Definition at line 468 of file diseqc.h.

Referenced by FindPreset(), IsHorizontal(), and LNBPolarityInvertedSetting::Load().

◆ IsHighBand()

bool DiSEqCDevLNB::IsHighBand ( const DTVMultiplex tuning) const

Determine if the high frequency band is active (for switchable LNBs).

Parameters
tuningTuning parameters.
Returns
True if high band is active.

Definition at line 2534 of file diseqc.cpp.

Referenced by DiSEqCDevSCR::Execute(), Execute(), DiSEqCDevSwitch::ExecuteDiseqc(), GetIntermediateFrequency(), and DiSEqCDevSwitch::ShouldSwitch().

◆ IsHorizontal()

bool DiSEqCDevLNB::IsHorizontal ( const DTVMultiplex tuning) const

Determine if horizontal polarity is active (for switchable LNBs).

Parameters
tuningTuning parameters.
Returns
True if polarity is horizontal.

Definition at line 2554 of file diseqc.cpp.

Referenced by DiSEqCDevSCR::Execute(), DiSEqCDevSwitch::ExecuteDiseqc(), DiSEqCDevSwitch::ExecuteLegacy(), GetVoltage(), IsHighBand(), and DiSEqCDevSwitch::ShouldSwitch().

◆ GetIntermediateFrequency()

uint32_t DiSEqCDevLNB::GetIntermediateFrequency ( const DiSEqCDevSettings settings,
const DTVMultiplex tuning 
) const

Calculate proper intermediate frequency for the given settings and tuning parameters.

Parameters
settingsConfiguration chain in effect.
tuningTuning parameters.
Returns
Frequency for use with FE_SET_FRONTEND.

Definition at line 2566 of file diseqc.cpp.

Referenced by DiSEqCDevSCR::Execute(), and DVBChannel::Tune().

◆ GetVoltage()

uint DiSEqCDevLNB::GetVoltage ( const DiSEqCDevSettings settings,
const DTVMultiplex tuning 
) const
overridevirtual

Retrives the desired voltage for this config.

Parameters
settingsConfiguration chain in effect.
tuningTuning parameters.
Returns
Voltage required.

Implements DiSEqCDevDevice.

Definition at line 2420 of file diseqc.cpp.

◆ LNBTypeToString()

static QString DiSEqCDevLNB::LNBTypeToString ( dvbdev_lnb_t  type)
inlinestatic

Definition at line 477 of file diseqc.h.

Referenced by Store().

◆ LNBTypeFromString()

static dvbdev_lnb_t DiSEqCDevLNB::LNBTypeFromString ( const QString &  type)
inlinestatic

Definition at line 480 of file diseqc.h.

Referenced by Load().

Member Data Documentation

◆ m_type

dvbdev_lnb_t DiSEqCDevLNB::m_type {kTypeVoltageAndToneControl}
private

Definition at line 484 of file diseqc.h.

Referenced by Execute(), GetVoltage(), IsHighBand(), Load(), and Store().

◆ m_lofSwitch

uint DiSEqCDevLNB::m_lofSwitch {11700000}
private

Definition at line 485 of file diseqc.h.

Referenced by IsHighBand(), Load(), and Store().

◆ m_lofHi

uint DiSEqCDevLNB::m_lofHi {10600000}
private

Definition at line 486 of file diseqc.h.

Referenced by GetIntermediateFrequency(), Load(), and Store().

◆ m_lofLo

uint DiSEqCDevLNB::m_lofLo { 9750000}
private

Definition at line 487 of file diseqc.h.

Referenced by GetIntermediateFrequency(), Load(), and Store().

◆ m_pol_inv

bool DiSEqCDevLNB::m_pol_inv {false}
private

If a signal is circularly polarized the polarity will flip on each reflection, so antenna systems with an even number of reflectors will need to set this value.

Definition at line 491 of file diseqc.h.

Referenced by Load(), and Store().

◆ kLNBTypeTable

const DiSEqCDevDevice::TypeTable DiSEqCDevLNB::kLNBTypeTable
staticprivate
Initial value:
=
{
{ "fixed", kTypeFixed },
{ "voltage", kTypeVoltageControl },
{ "voltage_tone", kTypeVoltageAndToneControl },
{ "bandstacked", kTypeBandstacked },
}

Definition at line 493 of file diseqc.h.


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