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 <libmythtv/diseqc.h>

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

Public Types

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

Public Member Functions

 DiSEqCDevLNB (DiSEqCDevTree &tree, uint devid)
 
bool Execute (const DiSEqCDevSettings &settings, const DTVMultiplex &tuning) 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
 
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 &tuning) const
 Determine if the high frequency band is active (for switchable LNBs). More...
 
bool IsHorizontal (const DTVMultiplex &tuning) 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 &settings, const DTVMultiplex &tuning) 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)
 
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_polInv {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 TypeTableVec kLNBTypeTable
 

Additional Inherited Members

- Protected Types inherited from DiSEqCDevDevice
using TypeTableVec = std::vector< TypeTable >
 
- Protected Member Functions inherited from DiSEqCDevDevice
void SetDeviceID (uint devid) const
 
- Static Protected Member Functions inherited from DiSEqCDevDevice
static QString TableToString (uint type, const TypeTableVec &table)
 
static uint TableFromString (const QString &type, const TypeTableVec &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 446 of file diseqc.h.

Member Enumeration Documentation

◆ dvbdev_lnb_t

enum DiSEqCDevLNB::dvbdev_lnb_t : std::uint8_t
Enumerator
kTypeFixed 
kTypeVoltageControl 
kTypeVoltageAndToneControl 
kTypeBandstacked 

Definition at line 458 of file diseqc.h.

Constructor & Destructor Documentation

◆ DiSEqCDevLNB()

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

Definition at line 449 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 2368 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 2391 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 2421 of file diseqc.cpp.

◆ SetType()

void DiSEqCDevLNB::SetType ( dvbdev_lnb_t  type)
inline

Definition at line 465 of file diseqc.h.

Referenced by LNBTypeSetting::Save().

◆ SetLOFSwitch()

void DiSEqCDevLNB::SetLOFSwitch ( uint  lof_switch)
inline

Definition at line 466 of file diseqc.h.

Referenced by LNBLOFSwitchSetting::Save().

◆ SetLOFHigh()

void DiSEqCDevLNB::SetLOFHigh ( uint  lof_hi)
inline

Definition at line 467 of file diseqc.h.

Referenced by LNBLOFHighSetting::Save().

◆ SetLOFLow()

void DiSEqCDevLNB::SetLOFLow ( uint  lof_lo)
inline

Definition at line 468 of file diseqc.h.

Referenced by LNBLOFLowSetting::Save().

◆ SetPolarityInverted()

void DiSEqCDevLNB::SetPolarityInverted ( bool  inv)
inline

Definition at line 469 of file diseqc.h.

Referenced by LNBPolarityInvertedSetting::Save().

◆ GetType()

dvbdev_lnb_t DiSEqCDevLNB::GetType ( void  ) const
inline

Definition at line 472 of file diseqc.h.

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

◆ GetLOFSwitch()

uint DiSEqCDevLNB::GetLOFSwitch ( void  ) const
inline

Definition at line 473 of file diseqc.h.

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

◆ GetLOFHigh()

uint DiSEqCDevLNB::GetLOFHigh ( void  ) const
inline

Definition at line 474 of file diseqc.h.

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

◆ GetLOFLow()

uint DiSEqCDevLNB::GetLOFLow ( void  ) const
inline

Definition at line 475 of file diseqc.h.

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

◆ IsPolarityInverted()

bool DiSEqCDevLNB::IsPolarityInverted ( void  ) const
inline

Definition at line 476 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 2491 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 2511 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 2523 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 2377 of file diseqc.cpp.

◆ LNBTypeToString()

static QString DiSEqCDevLNB::LNBTypeToString ( dvbdev_lnb_t  type)
inlinestatic

Definition at line 485 of file diseqc.h.

Referenced by Store().

◆ LNBTypeFromString()

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

Definition at line 488 of file diseqc.h.

Referenced by Load().

Member Data Documentation

◆ m_type

dvbdev_lnb_t DiSEqCDevLNB::m_type {kTypeVoltageAndToneControl}
private

Definition at line 492 of file diseqc.h.

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

◆ m_lofSwitch

uint DiSEqCDevLNB::m_lofSwitch {11700000}
private

Definition at line 493 of file diseqc.h.

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

◆ m_lofHi

uint DiSEqCDevLNB::m_lofHi {10600000}
private

Definition at line 494 of file diseqc.h.

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

◆ m_lofLo

uint DiSEqCDevLNB::m_lofLo { 9750000}
private

Definition at line 495 of file diseqc.h.

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

◆ m_polInv

bool DiSEqCDevLNB::m_polInv {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 499 of file diseqc.h.

Referenced by IsPolarityInverted(), Load(), SetPolarityInverted(), and Store().

◆ kLNBTypeTable

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

Definition at line 501 of file diseqc.h.

Referenced by LNBTypeFromString(), and LNBTypeToString().


The documentation for this class was generated from the following files:
DiSEqCDevLNB::kTypeVoltageControl
@ kTypeVoltageControl
Definition: diseqc.h:461
DiSEqCDevLNB::kTypeVoltageAndToneControl
@ kTypeVoltageAndToneControl
Definition: diseqc.h:462
DiSEqCDevLNB::kTypeBandstacked
@ kTypeBandstacked
Definition: diseqc.h:463
DiSEqCDevLNB::kTypeFixed
@ kTypeFixed
Definition: diseqc.h:460