TSDuck v3.40-4033
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::LNB Class Reference

Description of a Low-Noise Block (LNB) converter in a satellite dish. More...

#include <tsLNB.h>

Inheritance diagram for ts::LNB:
Collaboration diagram for ts::LNB:

Classes

class  Transposition
 Description of the required transposition for a given satellite frequency and polarization. More...
 

Public Member Functions

 LNB ()=default
 Default constructor.
 
 LNB (const UString &name, Report &report=(ts::CerrReport::Instance()))
 Constructor from an LNB name.
 
 LNB (uint64_t frequency)
 Constructor from a simple legacy LNB without high band.
 
 LNB (uint64_t low_frequency, uint64_t high_frequency, uint64_t switch_frequency)
 Constructor from a legacy LNB with low and high band.
 
size_t bandsCount () const
 Get the number of frequency bands in the LNB.
 
bool isPolarizationControlled () const
 Check if the LNB is polarization-controlled.
 
bool isValid () const
 Check if valid (typically after initializing or converting from string).
 
uint64_t legacyHighOscillatorFrequency () const
 Get the legacy "high oscillator frequency" value.
 
uint64_t legacyLowOscillatorFrequency () const
 Get the legacy "low oscillator frequency" value.
 
uint64_t legacySwitchFrequency () const
 Get the legacy "switch frequency" value.
 
UString name () const
 Get the official name of the LNB.
 
bool set (const UString &name, Report &report=(ts::CerrReport::Instance()))
 Set the LNB to the specified type of LNB.
 
void set (uint64_t frequency)
 Set values of a simple legacy LNB without high band.
 
void set (uint64_t low_frequency, uint64_t high_frequency, uint64_t switch_frequency)
 Set values of a legacy LNB with low and high band.
 
virtual UString toString () const override
 Convert the LNB object to a string.
 
bool transpose (Transposition &transposition, uint64_t satellite_frequency, Polarization polarity, Report &report=(ts::CerrReport::Instance())) const
 Compute the intermediate frequency and transposition from a satellite carrier frequency.
 

Static Public Member Functions

static UStringList GetAllNames (Report &report=(ts::CerrReport::Instance()))
 Get a list of all available LNB's from the configuration file.
 

Detailed Description

Description of a Low-Noise Block (LNB) converter in a satellite dish.

The satellite carrier frequency is used to carry the signal from the satellite to the dish. This value is public and is stored in the NIT for instance. The intermediate frequency is used to carry the signal from the dish's LNB to the receiver. The way this frequency is computed depends on the characteristics of the LNB. The intermediate frequency is the one that is used by the tuner in the satellite receiver.

Note: all frequencies are in Hz in parameters.

Constructor & Destructor Documentation

◆ LNB() [1/4]

ts::LNB::LNB ( )
default

Default constructor.

The object is initially invalid.

◆ LNB() [2/4]

ts::LNB::LNB ( const UString name,
Report report = (ts::CerrReport::Instance()) 
)

Constructor from an LNB name.

Parameters
[in]nameLNB name of alias as found in file tsduck.lnbs.xml. Can also be a full specification in legacy format (frequencies in MHz):
  • "freq" if the LNB has no high band.
  • "low,high,switch" if the LNB has a high band.
[in,out]reportWhere to log errors.

◆ LNB() [3/4]

ts::LNB::LNB ( uint64_t  frequency)

Constructor from a simple legacy LNB without high band.

Parameters
[in]frequencyLow frequency.

◆ LNB() [4/4]

ts::LNB::LNB ( uint64_t  low_frequency,
uint64_t  high_frequency,
uint64_t  switch_frequency 
)

Constructor from a legacy LNB with low and high band.

Parameters
[in]low_frequencyLow frequency.
[in]high_frequencyHigh frequency.
[in]switch_frequencySwitch frequency.

Member Function Documentation

◆ GetAllNames()

static UStringList ts::LNB::GetAllNames ( Report report = (ts::CerrReport::Instance()))
static

Get a list of all available LNB's from the configuration file.

Parameters
[in,out]reportWhere to report errors.
Returns
The list of all available LNB's and aliases.

◆ name()

UString ts::LNB::name ( ) const
inline

Get the official name of the LNB.

Returns
The official name of the LNB.

◆ toString()

virtual UString ts::LNB::toString ( ) const
overridevirtual

Convert the LNB object to a string.

Returns
A string representing the LNB. This may be different from name(). If the official name contains spaces or other not convenient characters to use on the command line, and a more convenient alias is defined in the configuration file, then this alias is used.
See also
StringifyInterface

Implements ts::StringifyInterface.

◆ isValid()

bool ts::LNB::isValid ( ) const
inline

Check if valid (typically after initializing or converting from string).

Returns
True if valid.

◆ isPolarizationControlled()

bool ts::LNB::isPolarizationControlled ( ) const

Check if the LNB is polarization-controlled.

With such LNB's, the satellite frequencies are transposed in different bands depending on the polarity. Also, they use "stacked" transposition: the transposed bands don't overlap and no tone/voltage/DiSEqC command is needed.

Returns
True if the LNB is polarization-controlled.

◆ bandsCount()

size_t ts::LNB::bandsCount ( ) const
inline

Get the number of frequency bands in the LNB.

Returns
The number of frequency bands in the LNB.

◆ legacyLowOscillatorFrequency()

uint64_t ts::LNB::legacyLowOscillatorFrequency ( ) const

Get the legacy "low oscillator frequency" value.

Returns
The legacy "low oscillator frequency" or zero if there no equivalent.

◆ legacyHighOscillatorFrequency()

uint64_t ts::LNB::legacyHighOscillatorFrequency ( ) const

Get the legacy "high oscillator frequency" value.

Returns
The legacy "high oscillator frequency" or zero if there no equivalent.

◆ legacySwitchFrequency()

uint64_t ts::LNB::legacySwitchFrequency ( ) const

Get the legacy "switch frequency" value.

Returns
The legacy "switch frequency" or zero if there no equivalent.

◆ transpose()

bool ts::LNB::transpose ( Transposition transposition,
uint64_t  satellite_frequency,
Polarization  polarity,
Report report = (ts::CerrReport::Instance()) 
) const

Compute the intermediate frequency and transposition from a satellite carrier frequency.

Parameters
[out]transpositionReturned transposition information.
[in]satellite_frequencySatellite carrier frequency in Hz.
[in]polarityCarrier polarity. Used only on polarization-controlled LNB's. These LNB's typically transpose different polarizations in different bands of intermediate frequencies.
[in,out]reportWhere to log errors.
Returns
True on success, false on error. Return zero on error (invalid LNB, frequency out or range).

◆ set() [1/3]

bool ts::LNB::set ( const UString name,
Report report = (ts::CerrReport::Instance()) 
)

Set the LNB to the specified type of LNB.

Parameters
[in]nameLNB name of alias as found in file tsduck.lnbs.xml. Can also be a full specification in legacy format (frequencies in MHz):
  • "freq" if the LNB has no high band.
  • "low,high,switch" if the LNB has a high band.
[in,out]reportWhere to log errors.
Returns
True on success, false on error. In case of error, an error is displayed and the LNB object is marked as invalid.

◆ set() [2/3]

void ts::LNB::set ( uint64_t  frequency)

Set values of a simple legacy LNB without high band.

Parameters
[in]frequencyLow frequency.

◆ set() [3/3]

void ts::LNB::set ( uint64_t  low_frequency,
uint64_t  high_frequency,
uint64_t  switch_frequency 
)

Set values of a legacy LNB with low and high band.

Parameters
[in]low_frequencyLow frequency.
[in]high_frequencyHigh frequency.
[in]switch_frequencySwitch frequency.

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