libdvbv5 1.22.1
Library to work with Digital TV devices on Linux
Data Structures | Macros | Functions
dvb-fe.h File Reference

Provides interfaces to deal with DVB frontend. More...

#include <stdio.h>
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <string.h>
#include "dvb-frontend.h"
#include "dvb-sat.h"
#include "dvb-log.h"
Include dependency graph for dvb-fe.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dvb_v5_fe_parms
 Keeps data needed to handle the DVB frontend. More...
 

Macros

#define ARRAY_SIZE(x)
 Calculates the number of elements of an array. More...
 
#define MAX_DELIVERY_SYSTEMS
 Max number of delivery systems for a given frontend. More...
 

Functions

struct dvb_v5_fe_parmsdvb_fe_dummy (void)
 Allocates a dummy frontend structure. More...
 
struct dvb_v5_fe_parmsdvb_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. More...
 
struct dvb_v5_fe_parmsdvb_fe_open (int adapter, int frontend, unsigned verbose, unsigned use_legacy_call)
 Opens a frontend and allocates a structure to work with. More...
 
struct dvb_v5_fe_parmsdvb_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. More...
 
void dvb_fe_close (struct dvb_v5_fe_parms *parms)
 Closes the frontend and frees allocated resources. More...
 
const char * dvb_cmd_name (int cmd)
 Returns the string name associated with a DVBv5 command. More...
 
const char *const * dvb_attr_names (int cmd)
 Returns an string array with the valid string values associated with a DVBv5 command. More...
 
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. More...
 
int dvb_fe_store_parm (struct dvb_v5_fe_parms *parms, unsigned cmd, uint32_t value)
 Stores the value of a DVBv5/libdvbv5 property. More...
 
int dvb_set_sys (struct dvb_v5_fe_parms *parms, fe_delivery_system_t sys)
 Sets the delivery system. More...
 
int dvb_add_parms_for_sys (struct dvb_v5_fe_parms *parms, fe_delivery_system_t sys)
 Make dvb properties reflect the current standard. More...
 
int dvb_set_compat_delivery_system (struct dvb_v5_fe_parms *parms, uint32_t desired_system)
 Sets the delivery system. More...
 
void dvb_fe_prt_parms (const struct dvb_v5_fe_parms *parms)
 Prints all the properties at the cache. More...
 
int dvb_fe_set_parms (struct dvb_v5_fe_parms *parms)
 Prints all the properties at the cache. More...
 
int dvb_fe_get_parms (struct dvb_v5_fe_parms *parms)
 Prints all the properties at the cache. More...
 
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. More...
 
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. More...
 
int dvb_fe_get_stats (struct dvb_v5_fe_parms *parms)
 Retrieve the stats from the Kernel. More...
 
float dvb_fe_retrieve_ber (struct dvb_v5_fe_parms *parms, unsigned layer, enum fecap_scale_params *scale)
 Retrieve the BER stats from cache. More...
 
float dvb_fe_retrieve_per (struct dvb_v5_fe_parms *parms, unsigned layer)
 Retrieve the PER stats from cache. More...
 
enum dvb_quality dvb_fe_retrieve_quality (struct dvb_v5_fe_parms *parms, unsigned layer)
 Retrieve the quality stats from cache. More...
 
int dvb_fe_snprintf_eng (char *buf, int len, float val)
 Ancillary function to sprintf on ENG format. More...
 
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. More...
 
int dvb_fe_get_event (struct dvb_v5_fe_parms *parms)
 Get both status statistics and dvb parameters. More...
 
int dvb_fe_sec_voltage (struct dvb_v5_fe_parms *parms, int on, int v18)
 DVB ioctl wrapper for setting SEC voltage. More...
 
int dvb_fe_sec_tone (struct dvb_v5_fe_parms *parms, fe_sec_tone_mode_t tone)
 DVB ioctl wrapper for setting SEC tone. More...
 
int dvb_fe_lnb_high_voltage (struct dvb_v5_fe_parms *parms, int on)
 DVB ioctl wrapper for setting LNBf high voltage. More...
 
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. More...
 
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. More...
 
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. More...
 
int dvb_fe_is_satellite (uint32_t delivery_system)
 DVB Ancillary routine to check if a given Delivery system is satellite. More...
 
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. More...
 

Detailed Description

Provides interfaces to deal with DVB frontend.

Author
Mauro Carvalho Chehab

The libdvbv5 API works with a set of key/value properties. There are two types of properties:

Just like the DTV properties, the stats are cached. That warrants that all stats are got at the same time, when dvb_fe_get_stats() is called.

Bug Report
Please submit bug reports and patches to linux.nosp@m.-med.nosp@m.ia@vg.nosp@m.er.k.nosp@m.ernel.nosp@m..org

Definition in file dvb-fe.h.