frontend(3)

πŸ“¦
version 1.32.0 Β· 2 versions
, in fedora 43

πŸ’– frontend(3) β€” Digital TV frontend control πŸ’–

okay so bestie, welcome to frontend(3) from the Library Functions Manual β€” yes the manual name is literally frontend and it lives in section 3, and it is the whole entire vibe of Digital TV frontend control. ✨ It's a chunky one tho, so it's split into 3 parts and this is part 1. Do not go anywhere, we're just getting started. 🫢


πŸ‘‘ NAME πŸ‘‘

frontend β€” Digital TV frontend control. That's her. That's the whole name. Iconic, no notes. πŸ’…


🌸 SYNOPSIS 🌸

πŸ“ Files πŸ“

  • dvb-fe.h β€” Provides interfaces to deal with DVB frontend.
  • dvb-v5-std.h β€” Provides libdvbv5 defined properties for the frontend.

🧚 Data Structures 🧚

  • struct dvb_v5_fe_parms β€” Keeps data needed to handle the DVB frontend. She's the little bag of holding for everything the frontend needs. πŸ‘œ

πŸŽ€ Macros πŸŽ€

  • #define MAX_DELIVERY_SYSTEMS β€” Max number of delivery systems for a given frontend.
  • #define DTV_USER_COMMAND_START β€” Start number for libdvbv5 user commands.
  • #define DTV_POLARIZATION β€” Satellite polarization (for Satellite delivery systems)
  • #define DTV_AUDIO_PID β€” Audio PID.
  • #define DTV_VIDEO_PID β€” Video PID.
  • #define DTV_SERVICE_ID β€” MPEG TS service ID.
  • #define DTV_CH_NAME β€” Digital TV service name.
  • #define DTV_VCHANNEL β€” Digital TV channel number.
  • #define DTV_SAT_NUMBER β€” Number of the satellite (used on multi-dish Satellite systems)
  • #define DTV_DISEQC_WAIT β€” Extra time needed to wait for DiSeqC to complete, in ms.
  • #define DTV_DISEQC_LNB β€” LNBf name.
  • #define DTV_FREQ_BPF β€” SCR/Unicable band-pass filter frequency in kHz.
  • #define DTV_PLS_CODE β€” DVB-T2 PLS code.
  • #define DTV_PLS_MODE β€” DVB-T2 PLS mode.
  • #define DTV_COUNTRY_CODE β€” Country variant of international delivery system standard.
  • #define DTV_MAX_USER_COMMAND β€” Last user command.
  • #define DTV_USER_NAME_SIZE β€” Number of user commands.
  • #define DTV_STAT_COMMAND_START β€” Start number for libdvbv5 statistics commands.
  • #define DTV_STATUS β€” Lock status of a DTV frontend.
  • #define DTV_BER β€” Bit Error Rate.
  • #define DTV_PER β€” Packet Error Rate.
  • #define DTV_QUALITY β€” A quality indicator that represents if a locked channel provides a good, OK or poor signal.
  • #define DTV_PRE_BER β€” Bit Error Rate before Viterbi.
  • #define DTV_MAX_STAT_COMMAND β€” Last statistics command.
  • #define DTV_STAT_NAME_SIZE β€” Number of statistics commands.
  • #define DTV_NUM_KERNEL_STATS β€” Number of statistics commands provided by the Kernel.
  • #define DTV_NUM_STATS_PROPS β€” Total number of statistics commands.

🌈 Enumerations 🌈

  • enum dvb_quality { DVB_QUAL_UNKNOWN, DVB_QUAL_POOR, DVB_QUAL_OK, DVB_QUAL_GOOD } β€” Provides an estimation about the user's experience while watching to a given MPEG stream. Basically a vibe check on your channel. πŸ“Ί

✨ Functions ✨

  • struct dvb_v5_fe_parms * dvb_fe_dummy (void) β€” Allocates a dummy frontend structure.
  • struct dvb_v5_fe_parms * dvb_fe_open_flags (int adapter, int frontend, unsigned verbose, unsigned use_legacy_call, dvb_logfunc logfunc, int flags) β€” Opens a frontend and allocates a structure to work with.
  • struct dvb_v5_fe_parms * dvb_fe_open (int adapter, int frontend, unsigned verbose, unsigned use_legacy_call) β€” Opens a frontend and allocates a structure to work with.
  • struct dvb_v5_fe_parms * dvb_fe_open2 (int adapter, int frontend, unsigned verbose, unsigned use_legacy_call, dvb_logfunc logfunc) β€” Opens a frontend and allocates a structure to work with.
  • void dvb_fe_close (struct dvb_v5_fe_parms *parms) β€” Closes the frontend and frees allocated resources.
  • const char * dvb_cmd_name (int cmd) β€” Returns the string name associated with a DVBv5 command.
  • const char *const * dvb_attr_names (int cmd) β€” Returns an string array with the valid string values associated with a DVBv5 command.
  • int dvb_fe_retrieve_parm (const struct dvb_v5_fe_parms *parms, unsigned cmd, uint32_t *value) β€” Retrieves the value of a DVBv5/libdvbv5 property.
  • int dvb_fe_store_parm (struct dvb_v5_fe_parms *parms, unsigned cmd, uint32_t value) β€” Stores the value of a DVBv5/libdvbv5 property.
  • int dvb_set_sys (struct dvb_v5_fe_parms *parms, fe_delivery_system_t sys) β€” Sets the delivery system.
  • int dvb_add_parms_for_sys (struct dvb_v5_fe_parms *parms, fe_delivery_system_t sys) β€” Make dvb properties reflect the current standard.
  • int dvb_set_compat_delivery_system (struct dvb_v5_fe_parms *parms, uint32_t desired_system) β€” Sets the delivery system.
  • void dvb_fe_prt_parms (const struct dvb_v5_fe_parms *parms) β€” Prints all the properties at the cache.
  • int dvb_fe_set_parms (struct dvb_v5_fe_parms *parms) β€” Prints all the properties at the cache.
  • int dvb_fe_get_parms (struct dvb_v5_fe_parms *parms) β€” Prints all the properties at the cache.
  • struct dtv_stats * dvb_fe_retrieve_stats_layer (struct dvb_v5_fe_parms *parms, unsigned cmd, unsigned layer) β€” Retrieve the stats for a DTV layer from cache.
  • int dvb_fe_retrieve_stats (struct dvb_v5_fe_parms *parms, unsigned cmd, uint32_t *value) β€” Retrieve the stats for a DTV layer from cache.
  • int dvb_fe_get_stats (struct dvb_v5_fe_parms *parms) β€” Retrieve the stats from the Kernel.
  • float dvb_fe_retrieve_ber (struct dvb_v5_fe_parms *parms, unsigned layer, enum fecap_scale_params *scale) β€” Retrieve the BER stats from cache.
  • float dvb_fe_retrieve_per (struct dvb_v5_fe_parms *parms, unsigned layer) β€” Retrieve the PER stats from cache.
  • enum dvb_quality dvb_fe_retrieve_quality (struct dvb_v5_fe_parms *parms, unsigned layer) β€” Retrieve the quality stats from cache.
  • int dvb_fe_snprintf_eng (char *buf, int len, float val) β€” Ancillary function to sprintf on ENG format.
  • int dvb_fe_snprintf_stat (struct dvb_v5_fe_parms *parms, uint32_t cmd, char *display_name, int layer, char **buf, int *len, int *show_layer_name) β€” Ancillary function to sprintf on ENG format.
  • int dvb_fe_get_event (struct dvb_v5_fe_parms *parms) β€” Get both status statistics and dvb parameters.
  • int dvb_fe_sec_voltage (struct dvb_v5_fe_parms *parms, int on, int v18) β€” DVB ioctl wrapper for setting SEC voltage.
  • int dvb_fe_sec_tone (struct dvb_v5_fe_parms *parms, fe_sec_tone_mode_t tone) β€” DVB ioctl wrapper for setting SEC tone.
  • int dvb_fe_lnb_high_voltage (struct dvb_v5_fe_parms *parms, int on) β€” DVB ioctl wrapper for setting LNBf high voltage.
  • int dvb_fe_diseqc_burst (struct dvb_v5_fe_parms *parms, int mini_b) β€” DVB ioctl wrapper for setting SEC DiSeqC tone burst to select between satellite A or B.
  • int dvb_fe_diseqc_cmd (struct dvb_v5_fe_parms *parms, const unsigned len, const unsigned char *buf) β€” DVB ioctl wrapper for setting SEC DiSeqC command.
  • int dvb_fe_diseqc_reply (struct dvb_v5_fe_parms *parms, unsigned *len, char *buf, int timeout) β€” DVB ioctl wrapper for getting SEC DiSEqC reply.
  • int dvb_fe_is_satellite (uint32_t delivery_system) β€” DVB Ancillary routine to check if a given Delivery system is satellite.
  • int dvb_fe_set_default_country (struct dvb_v5_fe_parms *parms, const char *country) β€” Set default country variant of delivery systems like ISDB-T.

πŸ’œ Detailed Description πŸ’œ

(Yeah bestie, this section is just vibes β€” the original has nothing under it either. Moving on, we're not gonna invent stuff. πŸ™ˆ)


🌟 Macro Definition Documentation 🌟

okay here come the macros again, but this time with their whole little biography. Same facts, more glitter. ✨

#define DTV_AUDIO_PID

Audio PID.

Definition at line 111 of file dvb-v5-std.h.

#define DTV_BER

Bit Error Rate. This is a parameter that it is derivated from two counters at the Kernel side

Definition at line 200 of file dvb-v5-std.h.

#define DTV_CH_NAME

Digital TV service name.

Definition at line 113 of file dvb-v5-std.h.

#define DTV_COUNTRY_CODE

Country variant of international delivery system standard. in ISO 3166-1 two letter code.

Definition at line 121 of file dvb-v5-std.h.

#define DTV_DISEQC_LNB

LNBf name.

Definition at line 117 of file dvb-v5-std.h.

#define DTV_DISEQC_WAIT

Extra time needed to wait for DiSeqC to complete, in ms. The minimal wait time is 15 ms. The time here will be added to the minimal time.

Definition at line 116 of file dvb-v5-std.h.

#define DTV_FREQ_BPF

SCR/Unicable band-pass filter frequency in kHz.

Definition at line 118 of file dvb-v5-std.h.

#define DTV_MAX_STAT_COMMAND

Last statistics command.

Definition at line 205 of file dvb-v5-std.h.

#define DTV_MAX_USER_COMMAND

Last user command.

Definition at line 123 of file dvb-v5-std.h.

#define DTV_NUM_KERNEL_STATS

Number of statistics commands provided by the Kernel.

Definition at line 210 of file dvb-v5-std.h.

#define DTV_NUM_STATS_PROPS

Total number of statistics commands.

Definition at line 212 of file dvb-v5-std.h.

#define DTV_PER

Packet Error Rate. This is a parameter that it is derivated from two counters at the Kernel side

Definition at line 201 of file dvb-v5-std.h.

#define DTV_PLS_CODE

DVB-T2 PLS code. Not used internally. It is needed only for file conversion.

Definition at line 119 of file dvb-v5-std.h.

#define DTV_PLS_MODE

DVB-T2 PLS mode. Not used internally. It is needed only for file conversion.

Definition at line 120 of file dvb-v5-std.h.

#define DTV_POLARIZATION

Satellite polarization (for Satellite delivery systems)

Definition at line 109 of file dvb-v5-std.h.

#define DTV_PRE_BER

Bit Error Rate before Viterbi. This is the error rate before applying the Forward Error Correction. This is a parameter that it is derivated from two counters at the Kernel side.

Definition at line 203 of file dvb-v5-std.h.

#define DTV_QUALITY

A quality indicator that represents if a locked channel provides a good, OK or poor signal. This is estimated considering the error rates, signal strengh and/or S/N ratio of the carrier.

Definition at line 202 of file dvb-v5-std.h.

#define DTV_SAT_NUMBER

Number of the satellite (used on multi-dish Satellite systems)

Definition at line 115 of file dvb-v5-std.h.

#define DTV_SERVICE_ID

MPEG TS service ID.

Definition at line 112 of file dvb-v5-std.h.

#define DTV_STAT_COMMAND_START

Start number for libdvbv5 statistics commands.

Definition at line 197 of file dvb-v5-std.h.

#define DTV_STAT_NAME_SIZE

Number of statistics commands.

Definition at line 207 of file dvb-v5-std.h.

#define DTV_STATUS

Lock status of a DTV frontend. This actually comes from the Kernel, but it uses a separate ioctl.

Definition at line 199 of file dvb-v5-std.h.

#define DTV_USER_COMMAND_START

Start number for libdvbv5 user commands.

Definition at line 107 of file dvb-v5-std.h.

#define DTV_USER_NAME_SIZE

Number of user commands.

Definition at line 125 of file dvb-v5-std.h.

#define DTV_VCHANNEL

Digital TV channel number. May contain symbols

Definition at line 114 of file dvb-v5-std.h.

#define DTV_VIDEO_PID

Video PID.

Definition at line 110 of file dvb-v5-std.h.

#define MAX_DELIVERY_SYSTEMS

Max number of delivery systems for a given frontend.

Definition at line 71 of file dvb-fe.h.


okay that's part 1 wrapped, but do NOT close the tab bestie, because part 2 is pulling up with the function documentation and she is long. πŸ’…βœ¨

Enumeration Type Documentation πŸ¦‹

enum dvb_quality

Okay so this enum is literally giving you an estimate of how the user's experience is while they're watching a given MPEG stream. πŸ’–

Parameters:

  • DVB_QUAL_UNKNOWN β€” Quality could not be estimated, as the Kernel driver doesn't provide enough statistics. 😭
  • DVB_QUAL_POOR β€” The signal reception is poor. Signal loss or packets can be lost too frequently. πŸ’€
  • DVB_QUAL_OK β€” The signal reception is ok. Eventual artifacts could be expected, but it should work. 🫢
  • DVB_QUAL_GOOD β€” The signal is good, and not many errors are happening. The user should have a good experience watching the stream. ✨

Enumerator:

  • DVB_QUAL_UNKNOWN
  • DVB_QUAL_POOR
  • DVB_QUAL_OK
  • DVB_QUAL_GOOD
Definition at line 231 of file dvb-v5-std.h.

Function Documentation πŸ’…

int dvb_add_parms_for_sys (struct dvb_v5_fe_parms * parms, fe_delivery_system_t sys)

Make dvb properties reflect the current standard. πŸŽ€

Parameters:

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • sys β€” delivery system to be selected

This function prepares the properties cache for a given delivery system. It is automatically called by dvb_set_sys(), and should not be normally called, except when dvb_fe_dummy() is used. πŸ‘‘

Returns:

  • Return 0 if success, EINVAL otherwise.

const char *const * dvb_attr_names (int cmd)

Returns an string array with the valid string values associated with a DVBv5 command. 🌈

Parameters:

  • cmd β€” DVBv5 or libdvbv5 property

Returns:

  • it returns a string array that corresponds to the names associated with the possible values for that property, when available. For example: dvb_cmd_name(DTV_CODE_RATE_HP) would return an array with the possible values for the code rates: { "1/2", "2/3", ... NULL }
Note: The array always ends with NULL. 🚨

const char * dvb_cmd_name (int cmd)

Returns the string name associated with a DVBv5 command. πŸ’œ

Parameters:

  • cmd β€” DVBv5 or libdvbv5 property

This function gets an integer argument (cmd) and returns a string that corresponds to the name of that property.

Returns:

  • it returns a string that corresponds to the property name. For example: dvb_cmd_name(DTV_GUARD_INTERVAL) would return "GUARD_INTERVAL" It also returns names for the properties used internally by libdvbv5.

void dvb_fe_close (struct dvb_v5_fe_parms * parms)

Closes the frontend and frees allocated resources. 🧚

Parameters:

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device

int dvb_fe_diseqc_burst (struct dvb_v5_fe_parms * parms, int mini_b)

DVB ioctl wrapper for setting SEC DiSeqC tone burst to select between satellite A or B. πŸ›°οΈ

Parameters:

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • mini_b β€” if different than zero, sends a 22 KHz tone burst to select satellite B. Otherwise, sends tone to select satellite A.

Valid only on certain DISEqC arrangements. ⚠️

If dvb_v5_fe_parms::lnb is set, this is controlled automatically. ✨


int dvb_fe_diseqc_cmd (struct dvb_v5_fe_parms * parms, const unsigned len, const unsigned char * buf)

DVB ioctl wrapper for setting SEC DiSeqC command. πŸ“‘

Parameters:

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • len β€” size of the DiSEqC command
  • buf β€” DiSEqC command to be sent

If dvb_v5_fe_parms::lnb is set, this is controlled automatically. πŸ’«


int dvb_fe_diseqc_reply (struct dvb_v5_fe_parms * parms, unsigned * len, char * buf, int timeout)

DVB ioctl wrapper for getting SEC DiSEqC reply. πŸ“¬

Parameters:

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • len β€” size of the DiSEqC command
  • buf β€” DiSEqC command to be sent
  • timeout β€” maximum time to receive the command, in ms.

If dvb_v5_fe_parms::lnb is set, this is controlled automatically. πŸ¦‹


struct dvb_v5_fe_parms * dvb_fe_dummy (void )

Allocates a dummy frontend structure. This is useful for some applications that may want to just use the frontend structure internally, without associating it with a real hardware. 🎭

Returns:

  • Returns a pointer to a dummy struct, or NULL if no memory.

int dvb_fe_get_event (struct dvb_v5_fe_parms * parms)

Get both status statistics and dvb parameters. πŸ“Š

Parameters:

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device

That's similar of calling both dvb_fe_get_parms() and dvb_fe_get_stats(). πŸ”„

Returns:

  • It returns 0 if success or an errorno otherwise.

int dvb_fe_get_parms (struct dvb_v5_fe_parms * parms)

Prints all the properties at the cache. πŸ–¨οΈ

Parameters:

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device

Gets the properties from the DVB hardware. The values will only reflect what's set at the hardware if the frontend is locked. πŸ”’

Returns:

  • Return 0 if success, EINVAL otherwise.

int dvb_fe_get_stats (struct dvb_v5_fe_parms * parms)

Retrieve the stats from the Kernel. 🧠

Parameters:

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device

Updates the stats cache from the available stats at the Kernel. πŸ“ˆ

Returns:

  • The returned value is 0 if success, EINVAL otherwise.

int dvb_fe_is_satellite (uint32_t delivery_system)

DVB Ancillary routine to check if a given Delivery system is satellite. πŸ›°οΈ

Parameters:

  • delivery_system β€” delivery system to be selected

int dvb_fe_lnb_high_voltage (struct dvb_v5_fe_parms * parms, int on)

DVB ioctl wrapper for setting LNBf high voltage. ⚑

Parameters:

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • on β€” a value different than zero indicates to produce lightly higher voltages instead of 13/18V, in order to compensate for long cables.

struct dvb_v5_fe_parms * dvb_fe_open (int adapter, int frontend, unsigned verbose, unsigned use_legacy_call)

Opens a frontend and allocates a structure to work with. πŸšͺ

Parameters:

  • adapter β€” Number of the adapter to open
  • frontend β€” Number of the frontend to open
  • verbose β€” Verbosity level of the messages that will be printed
  • use_legacy_call β€” Force to use the DVBv3 calls, instead of using the DVBv5 API

This function should be called before using any other function at the frontend library (or the other alternatives: dvb_fe_open2() or dvb_fe_dummy(). πŸ“

Returns:

  • Returns a pointer to an allocated data pointer or NULL on error.

struct dvb_v5_fe_parms * dvb_fe_open2 (int adapter, int frontend, unsigned verbose, unsigned use_legacy_call, dvb_logfunc logfunc)

Opens a frontend and allocates a structure to work with. πŸŽ‰

Parameters:

  • adapter β€” Number of the adapter to open
  • frontend β€” Number of the frontend to open
  • verbose β€” Verbosity level of the messages that will be printed
  • use_legacy_call β€” Force to use the DVBv3 calls, instead of using the DVBv5 API
  • logfunc β€” Callback function to be called when a log event happens. Can either store the event into a file or to print it at the TUI/GUI.

This function should be called before using any other function at the frontend library (or the other alternatives: dvb_fe_open() or dvb_fe_dummy(). πŸ“

Returns:

  • Returns a pointer to an allocated data pointer or NULL on error.

struct dvb_v5_fe_parms * dvb_fe_open_flags (int adapter, int frontend, unsigned verbose, unsigned use_legacy_call, dvb_logfunc logfunc, int flags)

Opens a frontend and allocates a structure to work with. 🌟

Parameters:

  • adapter β€” Number of the adapter to open
  • frontend β€” Number of the frontend to open
  • verbose β€” Verbosity level of the messages that will be printed
  • use_legacy_call β€” Force to use the DVBv3 calls, instead of using the DVBv5 API
  • logfunc β€” Callback function to be called when a log event happens. Can either store the event into a file or to print it at the TUI/GUI. If NULL, the library will use its internal handler.
  • flags β€” Flags to be passed to open. Currently only two flags are supported: O_RDONLY or O_RDWR. Using O_NONBLOCK may hit unexpected issues.
Todo: Add/check support for O_NONBLOCK at the scan routines. πŸ“

This function should be called before using any other function at the frontend library (or the other alternatives: dvb_fe_open() or dvb_fe_dummy(). πŸ“

In general, this is called using O_RDWR, except if all that it is wanted is to check the DVB frontend statistics. πŸ“Š

Returns:

  • Returns a pointer to an allocated data pointer or NULL on error.

void dvb_fe_prt_parms (const struct dvb_v5_fe_parms * parms)

Prints all the properties at the cache. πŸ–¨οΈ

Parameters:

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device

Used mostly for debugging issues. πŸ›


float dvb_fe_retrieve_ber (struct dvb_v5_fe_parms * parms, unsigned layer, enum fecap_scale_params * scale)

Retrieve the BER stats from cache. πŸ“‰

Parameters:

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • layer β€” DTV layer
  • scale β€” retrieves the scale

Gets the value for BER stats from stats cache, on a given layer. Layer 0 is always present. On DTV standards that doesn't have layers, it returns the same value as dvb_fe_retrieve_stats() for layer = 0. πŸ”„

For DTV standards with multiple layers, like ISDB, layer=1 is layer 'A', layer=2 is layer 'B' and layer=3 is layer 'C'. Please notice that not all frontends support per-layer stats. Also, the layer value is only valid if the layer exists at the original stream. Also, on such standards, layer 0 is typically a mean value of the layers, or a sum of events (if FE_SCALE_COUNTER). πŸ“š

For it to be valid, dvb_fe_get_stats() should be called first. ⚠️

Returns:

  • It returns a float number for the BER value. If the statistics is not available for any reason, scale will be equal to FE_SCALE_NOT_AVAILABLE.

int dvb_fe_retrieve_parm (const struct dvb_v5_fe_parms * parms, unsigned cmd, uint32_t * value)

Retrieves the value of a DVBv5/libdvbv5 property. πŸ”

Parameters:

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • cmd β€” DVBv5 or libdvbv5 property
  • value β€” Pointer to an uint32_t where the value will be stored.

This reads the value of a property stored at the cache. Before using it, a dvb_fe_get_parms() is likely required. πŸ“

Returns:

  • Return 0 if success, EINVAL otherwise.

float dvb_fe_retrieve_per (struct dvb_v5_fe_parms * parms, unsigned layer)

Retrieve the PER stats from cache. πŸ“ˆ

Parameters:

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • layer β€” DTV layer

Gets the value for BER stats from stats cache, on a given layer. Layer 0 is always present. On DTV standards that doesn't have layers, it returns the same value as dvb_fe_retrieve_stats() for layer = 0. πŸ”„

okay so we're mid-sentence, bestie β€” this bit is the tail end of the function right before this one, don't panic πŸ’–

For DTV standards with multiple layers, like ISDB: layer=1 is layer 'A', layer=2 is layer 'B' and layer=3 is layer 'C'. Please notice that not all frontends support per-layer stats. Also, the layer value is only valid if the layer exists at the original stream. Also β€” yes, third "also", she's thorough β€” on such standards, layer 0 is typically a mean value of the layers, or a sum of events (if FE_SCALE_COUNTER).

For it to be valid, dvb_fe_get_stats() should be called first. Like, mandatory. No vibe check pass without it.

Returns β€” a negative value indicates error. πŸ’€


πŸŽ€ dvb_fe_retrieve_quality

enum dvb_quality dvb_fe_retrieve_quality (struct dvb_v5_fe_parms * parms,
    unsigned layer)

Retrieve the quality stats from cache. ✨

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • layer β€” DTV layer

Gets a quality measure for a given layer. Layer 0 is always present, iconic behavior honestly. On DTV standards that don't have layers, it returns the same value as dvb_fe_retrieve_stats() for layer = 0.

For DTV standards with multiple layers, like ISDB: layer=1 is layer 'A', layer=2 is layer 'B' and layer=3 is layer 'C'. Please notice that not all frontends support per-layer stats. Also, the layer value is only valid if the layer exists at the original stream. Also, on such standards, layer 0 is typically a mean value of the layers, or a sum of events (if FE_SCALE_COUNTER).

For it to be valid, dvb_fe_get_stats() should be called first.

Returns β€” returns an enum dvb_quantity, where DVB_QUAL_UNKNOWN means that the stat isn't available. πŸ™ˆ


πŸ¦‹ dvb_fe_retrieve_stats

int dvb_fe_retrieve_stats (struct dvb_v5_fe_parms * parms, unsigned cmd,
    uint32_t * value)

Retrieve the stats for a DTV layer from cache. πŸ“

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • cmd β€” DVBv5 or libdvbv5 property
  • value β€” DTV value pointer

Gets the value for one stats property for layer = 0.

For it to be valid, dvb_fe_get_stats() should be called first.

Returns β€” the returned value is 0 if success, EINVAL otherwise. 😭


🌈 dvb_fe_retrieve_stats_layer

struct dtv_stats * dvb_fe_retrieve_stats_layer (struct dvb_v5_fe_parms *
    parms, unsigned cmd, unsigned layer)

Retrieve the stats for a DTV layer from cache. πŸ’«

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • cmd β€” DVBv5 or libdvbv5 property
  • layer β€” DTV layer

Gets the value for one stats cache, on a given layer. Layer 0 is always present. On DTV standards that doesn't have layers, it returns the same value as dvb_fe_retrieve_stats() for layer = 0.

For DTV standards with multiple layers, like ISDB: layer=1 is layer 'A', layer=2 is layer 'B' and layer=3 is layer 'C'. Please notice that not all frontends support per-layer stats. Also, the layer value is only valid if the layer exists at the original stream. Also, on such standards, layer 0 is typically a mean value of the layers, or a sum of events (if FE_SCALE_COUNTER).

For it to be valid, dvb_fe_get_stats() should be called first.

Returns β€” it returns a struct dtv_stats if succeed or NULL otherwise. no in-between, bestie


πŸ’… dvb_fe_sec_tone

int dvb_fe_sec_tone (struct dvb_v5_fe_parms * parms, fe_sec_tone_mode_t
    tone)

DVB ioctl wrapper for setting SEC tone. πŸ“‘

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • tone β€” tone setting, as defined by DVB fe_sec_tone_mode_t type

If dvb_v5_fe_parms::lnb is set, this is controlled automatically. Hands off the wheel, she's got it.


⚑ dvb_fe_sec_voltage

int dvb_fe_sec_voltage (struct dvb_v5_fe_parms * parms, int on, int v18)

DVB ioctl wrapper for setting SEC voltage. πŸ”Œ

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • on β€” a value different than zero indicates to enable voltage on a Satellite Equipment Control (SEC)
  • v18 β€” if on != 0, a value different than zero means 18 Volts; zero means 13 Volts.

If dvb_v5_fe_parms::lnb is set, this is controlled automatically.


🌍 dvb_fe_set_default_country

int dvb_fe_set_default_country (struct dvb_v5_fe_parms * parms, const char *
    country)

Set default country variant of delivery systems like ISDB-T. πŸ—ΊοΈ

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • country β€” default country, in ISO 3166-1 two letter code. If NULL, default charset is guessed from locale environment variables.

Returns β€” 0 if success or an errorno otherwise. 😡

The "COUNTRY" property in dvb_fe_set_parm() overrides the setting. The specific one wins, always.


πŸ› οΈ dvb_fe_set_parms

int dvb_fe_set_parms (struct dvb_v5_fe_parms * parms)

Prints all the properties at the cache. πŸ“‹ (yes, "prints" β€” that's what it says, bestie)

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device

Writes the properties stored at the DVB cache at the DVB hardware. At return, some properties could have a different value, as the frontend may not support the values set. So don't be shocked when the numbers change on you. πŸ™ˆ

Returns β€” return 0 if success, EINVAL otherwise.


πŸ”¬ dvb_fe_snprintf_eng

int dvb_fe_snprintf_eng (char * buf, int len, float val)

Ancillary function to sprintf on ENG format. ✍️

Parameters

  • buf β€” buffer to store the value
  • len β€” buffer length
  • val β€” value to be printed

On ENG notation, the exponential value should be multiple of 3. This is good to display some values, like BER. engineering notation stays winning

Returns β€” at return, it shows the actual size of the print. A negative value indicates an error.


🧚 dvb_fe_snprintf_stat

int dvb_fe_snprintf_stat (struct dvb_v5_fe_parms * parms, uint32_t cmd, char
    * display_name, int layer, char ** buf, int * len, int *
    show_layer_name)

Ancillary function to sprintf on ENG format. πŸŽ€

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • cmd β€” DVBv5 or libdvbv5 property
  • display_name β€” String with the name of the property to be shown
  • layer β€” DTV Layer
  • buf β€” buffer to store the value
  • len β€” buffer length
  • show_layer_name β€” a value different than zero shows the layer name, if the layer is bigger than zero.

This function calls internally dvb_fe_retrieve_stats_layer(). It allows to print a DVBv5 statistics value into a string. An extra property is available (DTV_QUALITY) with prints either one of the values: Poor, Ok or Good, depending on the overall measures. Poor / Ok / Good, the three moods ✨

Returns β€” it returns the length of the printed data. A negative value indicates an error.


πŸ“¦ dvb_fe_store_parm

int dvb_fe_store_parm (struct dvb_v5_fe_parms * parms, unsigned cmd,
    uint32_t value)

Stores the value of a DVBv5/libdvbv5 property. πŸ’Ύ

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • cmd β€” DVBv5 or libdvbv5 property
  • value β€” Pointer to an uint32_t where the value will be stored.

This stores the value of a property at the cache. The value will only be send to the hardware after calling dvb_fe_set_parms(). So it's a save, not a send. iykyk. 🫢

Returns β€” return 0 if success, EINVAL otherwise.


πŸ”„ dvb_set_compat_delivery_system

int dvb_set_compat_delivery_system (struct dvb_v5_fe_parms * parms, uint32_t
    desired_system)

Sets the delivery system. πŸ›°οΈ

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • desired_system β€” delivery system to be selected

This function changes the delivery system of the frontend. By default, the libdvbv5 will use the first available delivery system. If another delivery system is desirable, this function should be called before being able to store the properties for the new delivery system via dvb_fe_store_parm(). Order matters, bestie, always does.

This function is an enhanced version of dvb_set_sys(). It has an special logic inside to work with Kernels that supports only DVBv3. πŸ‘‘

Returns β€” return 0 if success, EINVAL otherwise.


πŸŒ€ dvb_set_sys

int dvb_set_sys (struct dvb_v5_fe_parms * parms, fe_delivery_system_t sys)

Sets the delivery system. 🌐

Parameters

  • parms β€” struct dvb_v5_fe_parms pointer to the opened device
  • sys β€” delivery system to be selected

This function changes the delivery system of the frontend. By default, the libdvbv5 will use the first available delivery system. If another delivery system is desirable, this function should be called before being able to store the properties for the new delivery system via dvb_fe_store_parm().

Returns β€” return 0 if success, EINVAL otherwise.


πŸ’– Author πŸ’–

Generated automatically by Doxygen for libdvbv5 from the source code. The robots wrote it, we just made it cute. πŸ€–πŸ’…


okay that's the whole page bestie, we made it πŸŽ‰ this was libdvbv5, Version 1.32.0, page frontend(3). go call dvb_fe_get_stats() first like we talked about, love u, bye πŸ¦‹βœ¨

πŸ“¦ where this page comes from