summaryrefslogtreecommitdiff
path: root/mcast/common/satlists.h
blob: ad958890e0e0eb100b70744d0b7b441a5f918be1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/*
 * (c) BayCom GmbH, http://www.baycom.de, info@baycom.de
 *
 * See the COPYING file for copyright information and
 * how to reach the author.
 *
 */

#define DISEQC_MAX_EXTRA 8
#define MAX_EXTRA_DATA 16

typedef enum
{
//the defines for circular polarisation are taken from official DiSEqC-Spec at
//http://www.eutelsat.com/satellites/pdf/Diseqc/Reference%20docs/bus_spec.pdf
	POL_V = SEC_VOLTAGE_13,
	POL_H = SEC_VOLTAGE_18,
	POL_R = SEC_VOLTAGE_13,
	POL_L = SEC_VOLTAGE_18,
} polarisation_t;

typedef struct
{
	int magic;
	int version;
	
	polarisation_t Polarisation;	// H/V/L/R
	int RangeMin;		// 11700
	int RangeMax;		// 12750

// SEC Settings to be used for the specification above
	int LOF;		// 9750
	recv_sec_t sec;
	struct dvb_diseqc_master_cmd diseqc_cmd[DISEQC_MAX_EXTRA];
	int diseqc_cmd_num;
} satellite_component_t;

typedef enum
{
	SAT_SRC_LNB=0,
	SAT_SRC_ROTOR=1,
	SAT_SRC_UNI=2,       // !!! match DISEQC_* values in dvb_server.h !!!
} satellite_source_t;

typedef struct
{
	int magic;
	int version;
	
// Specification of satellite parameters
	char Name[UUID_SIZE];	// Astra 19,2
	int SatPos;		// 1920
	int SatPosMin;		// Only used for SAT_SRC_ROTOR
	int SatPosMax;		// Only used for SAT_SRC_ROTOR
	satellite_source_t type;	// see above

	satellite_component_t *comp;	// What to do for polarisation and range for SEC?
	int comp_num;		// Number of components
	int AutoFocus;
	int Latitude;
	int Longitude;
	int num_extra_data;
	int extra_data[MAX_EXTRA_DATA];  // reserved
} satellite_info_t;

typedef struct satellite_list
{
	int magic;
	int version;
	
	char Name[UUID_SIZE];	// Magic unique identifier
	satellite_info_t *sat;
	int sat_num;
} satellite_list_t;

typedef struct
{
	int magic;
	int version;
	
	int netceiver;
	int sat_list;
	int sat;
	int comp;
	int position;  // for rotor
} satellite_reference_t;

DLL_SYMBOL int satellite_find_by_diseqc (satellite_reference_t * ref, recv_sec_t *sec, struct dvb_frontend_parameters *fep, int mode);
DLL_SYMBOL int satellite_get_pos_by_ref (satellite_reference_t * ref);
DLL_SYMBOL int satellite_get_lof_by_ref (satellite_reference_t * ref);
DLL_SYMBOL polarisation_t satellite_find_pol_by_ref (satellite_reference_t * ref);
DLL_SYMBOL recv_sec_t *satellite_find_sec_by_ref (satellite_reference_t * ref);