TSDuck v3.40-3963
MPEG Transport Stream Toolkit
|
Definition of an HF frequency band (UHF, VHF). More...
#include <tsHFBand.h>
Public Member Functions | |
UString | bandName () const |
Get the name of the HF band as a string. | |
uint64_t | bandWidth (uint32_t channel) const |
Get the bandwidth of a channel in the HF band. | |
uint32_t | channelCount () const |
Get the number of channels in the HF band. | |
UString | channelList () const |
Get the list of channels in the HF band as a string. | |
uint32_t | channelNumber (uint64_t frequency) const |
Compute a channel number from a frequency. | |
UString | description (uint32_t channel, int32_t offset) const |
Return a human-readable description of a channel. | |
bool | empty () const |
Check if there is no channel in the HF band. | |
uint32_t | firstChannel () const |
Get the first channel number in the HF band. | |
int32_t | firstOffset (uint32_t channel) const |
Get the first allowed offset of a channel in the HF band. | |
uint64_t | frequency (uint32_t channel, int32_t offset=0) const |
Get the frequency of a channel in the HF band. | |
uint64_t | highestFrequency (bool strict=false) const |
Get the highest frequency in the HF band. | |
bool | inBand (uint64_t frequency, bool strict=false) const |
Check if a frequency is in the HF band. | |
bool | isValidChannel (uint32_t channel) const |
Check if a channel is valid in the HF band. | |
bool | isValidChannel (uint32_t channel, Report &report) const |
Check if a channel is valid in the HF band and report an error if invalid. | |
uint32_t | lastChannel () const |
Get the last channel number in the HF band. | |
int32_t | lastOffset (uint32_t channel) const |
Get the last allowed offset of a channel in the HF band. | |
uint64_t | lowestFrequency (bool strict=false) const |
Get the lowest frequency in the HF band. | |
uint32_t | nextChannel (uint32_t channel) const |
Get the next channel in the HF band. | |
int32_t | offsetCount (uint64_t frequency) const |
Compute an offset count from frequency (approximate if necessary) | |
uint64_t | offsetWidth (uint32_t channel) const |
Get the offset frequency width of a channel in the HF band. | |
Polarization | polarization (uint32_t channel) const |
Get the polarization of a channel in the HF band. | |
uint32_t | previousChannel (uint32_t channel) const |
Get the previous channel in the HF band. | |
UString | regionName (bool include_aliases=false) const |
Get the region name as a string. | |
Static Public Member Functions | |
static UString | DefaultRegion (Report &report=(ts::CerrReport::Instance())) |
Get the default region. | |
static UStringList | GetAllBands (const UString ®ion=UString(), Report &report=(ts::CerrReport::Instance())) |
Get a list of all available HF bands for a given region in the configuration file. | |
static UStringList | GetAllRegions (Report &report=(ts::CerrReport::Instance())) |
Get a list of all available regions from the configuration file. | |
static const HFBand * | GetBand (const UString ®ion=UString(), const UString &band=u"UHF", Report &report=(ts::CerrReport::Instance()), bool silent_band=false) |
Get the description of an HF band from the configuration file. | |
static void | SetDefaultRegion (const UString ®ion=UString(), Report &report=(ts::CerrReport::Instance())) |
Set the default region. | |
Definition of an HF frequency band (UHF, VHF).
Each region or country has it own definitions of the frequencies bands and layouts. The most common types of frequency bands are VHF (Very High Frequency) and UHF (Ultra High Frequency) for terrestrial TV. Some countries also define predefined layouts for satellite frequency bands. This is the case for Japan with the "BS" and "CS" satellite bands.
There is a repository of known HF bands layout per country or region. This repository is read from an XML file. There is only one instance of HFBand per country or region.
|
static |
Get the default region.
[in,out] | report | Where to report errors. |
|
static |
Set the default region.
[in] | region | The new region to use as default. If empty, then use the value of the parameter "default.region" in the TSDuck configuration file for the current application. If undefined in the configuration file, the default is "europe". |
[in,out] | report | Where to report errors. |
|
static |
Get a list of all available regions from the configuration file.
[in,out] | report | Where to report errors. |
|
static |
Get a list of all available HF bands for a given region in the configuration file.
[in] | region | The region name. If empty, then use the default region. |
[in,out] | report | Where to report errors. |
|
static |
Get the description of an HF band from the configuration file.
[in] | region | Region of country name (not case sensitive). |
[in] | band | HF band type (u"UHF", u"VHF", etc). |
[in,out] | report | Where to report errors. |
[in] | silent_band | If true, do not report error message if the band is not found in the file. Other errors (HF band file not found, region not found) are still reported. |
|
inline |
Get the name of the HF band as a string.
UString ts::HFBand::regionName | ( | bool | include_aliases = false | ) | const |
Get the region name as a string.
[in] | include_aliases | Also add the list of aliases. |
|
inline |
Check if there is no channel in the HF band.
|
inline |
Get the first channel number in the HF band.
|
inline |
Get the last channel number in the HF band.
|
inline |
Get the number of channels in the HF band.
Note that this cannot be computed from firstChannel() and lastChannel() since an HF band can have "holes", non-existent channels.
UString ts::HFBand::channelList | ( | ) | const |
Get the list of channels in the HF band as a string.
bool ts::HFBand::isValidChannel | ( | uint32_t | channel | ) | const |
Check if a channel is valid in the HF band.
[in] | channel | Channel number. |
bool ts::HFBand::isValidChannel | ( | uint32_t | channel, |
Report & | report | ||
) | const |
Check if a channel is valid in the HF band and report an error if invalid.
[in] | channel | Channel number. |
[in,out] | report | Where to report errors. |
uint32_t ts::HFBand::nextChannel | ( | uint32_t | channel | ) | const |
Get the next channel in the HF band.
[in] | channel | Channel number. |
uint32_t ts::HFBand::previousChannel | ( | uint32_t | channel | ) | const |
Get the previous channel in the HF band.
[in] | channel | Channel number. |
uint64_t ts::HFBand::lowestFrequency | ( | bool | strict = false | ) | const |
Get the lowest frequency in the HF band.
[in] | strict | If true, frequency must be strictly inside the allowed offset range of a channel. When false, only check that the frequency is inside the global band. |
uint64_t ts::HFBand::highestFrequency | ( | bool | strict = false | ) | const |
Get the highest frequency in the HF band.
[in] | strict | If true, frequency must be strictly inside the allowed offset range of a channel. When false, only check that the frequency is inside the global band. |
uint64_t ts::HFBand::frequency | ( | uint32_t | channel, |
int32_t | offset = 0 |
||
) | const |
Get the frequency of a channel in the HF band.
[in] | channel | Channel number. |
[in] | offset | Optional offset number. |
uint64_t ts::HFBand::bandWidth | ( | uint32_t | channel | ) | const |
Get the bandwidth of a channel in the HF band.
[in] | channel | Channel number. |
uint64_t ts::HFBand::offsetWidth | ( | uint32_t | channel | ) | const |
Get the offset frequency width of a channel in the HF band.
[in] | channel | Channel number. |
int32_t ts::HFBand::firstOffset | ( | uint32_t | channel | ) | const |
Get the first allowed offset of a channel in the HF band.
[in] | channel | Channel number. |
int32_t ts::HFBand::lastOffset | ( | uint32_t | channel | ) | const |
Get the last allowed offset of a channel in the HF band.
[in] | channel | Channel number. |
Polarization ts::HFBand::polarization | ( | uint32_t | channel | ) | const |
Get the polarization of a channel in the HF band.
[in] | channel | Channel number. |
uint32_t ts::HFBand::channelNumber | ( | uint64_t | frequency | ) | const |
Compute a channel number from a frequency.
[in] | frequency | Frequency in Hz. |
int32_t ts::HFBand::offsetCount | ( | uint64_t | frequency | ) | const |
Compute an offset count from frequency (approximate if necessary)
[in] | frequency | Frequency in Hz. |
bool ts::HFBand::inBand | ( | uint64_t | frequency, |
bool | strict = false |
||
) | const |
Check if a frequency is in the HF band.
[in] | frequency | Frequency in Hz. |
[in] | strict | If true, frequency must be strictly inside the allowed offset range of a channel. When false, only check that the frequency is inside the global band. |
UString ts::HFBand::description | ( | uint32_t | channel, |
int32_t | offset | ||
) | const |
Return a human-readable description of a channel.
[in] | channel | Channel number. |
[in] | offset | Channel offset count. Displayed only if non-zero. |