5 #include <lib/dvb/idvb.h>
12 NONE, SLEEP, SET_VOLTAGE, SET_TONE, SEND_DISEQC, SEND_TONEBURST, IF_LOCK_GOTO, IF_NOT_LOCK_GOTO, SET_FRONTEND
21 eDVBDiseqcCommand diseqc;
23 eSecCommand( int cmd, int val )
24 :cmd(cmd), voltage(val)
26 eSecCommand( int cmd, eDVBDiseqcCommand diseqc )
27 :cmd(cmd), diseqc(diseqc)
36 std::list<eSecCommand> secSequence;
37 std::list<eSecCommand>::iterator cur;
40 :cur(secSequence.end())
43 void push_front(const eSecCommand &cmd)
45 secSequence.push_front(cmd);
47 void push_back(const eSecCommand &cmd)
49 secSequence.push_back(cmd);
54 cur=secSequence.end();
56 inline std::list<eSecCommand>::iterator ¤t()
60 inline std::list<eSecCommand>::iterator begin()
62 return secSequence.begin();
64 inline std::list<eSecCommand>::iterator end()
66 return secSequence.end();
70 return secSequence.size();
74 return secSequence.size();
78 class eDVBSatelliteDiseqcParameters
81 enum { AA=0, AB=1, BA=2, BB=3, SENDNO=4 /* and 0xF0 .. 0xFF*/ }; // DiSEqC Parameter
84 enum t_diseqc_mode { NONE=0, V1_0=1, V1_1=2, V1_2=3, SMATV=4 }; // DiSEqC Mode
85 t_diseqc_mode m_diseqc_mode;
87 enum t_toneburst_param { NO=0, A=1, B=2 };
88 t_toneburst_param m_toneburst_param;
90 int m_repeats; // for cascaded switches
91 bool m_use_fast; // send no DiSEqC on H/V or Lo/Hi change
92 bool m_seq_repeat; // send the complete DiSEqC Sequence twice...
93 bool m_swap_cmds; // swaps the committed & uncommitted cmd
94 int m_uncommitted_cmd; // state of the 4 uncommitted switches..
97 class eDVBSatelliteSwitchParameters
100 enum t_22khz_signal { HILO=0, ON=1, OFF=2 }; // 22 Khz
101 enum t_voltage_mode { HV=0, _14V=1, _18V=2, _0V=3 }; // 14/18 V
102 t_voltage_mode m_voltage_mode;
103 t_22khz_signal m_22khz_signal;
106 class eDVBSatelliteRotorParameters
109 enum { NORTH, SOUTH, EAST, WEST };
111 struct eDVBSatelliteRotorInputpowerParameters
113 bool m_use; // can we use rotor inputpower to detect rotor running state ?
114 int m_threshold; // threshold between running and stopped rotor
116 eDVBSatelliteRotorInputpowerParameters m_inputpower_parameters;
118 struct eDVBSatelliteRotorGotoxxParameters
120 bool m_can_use; // rotor support gotoXX cmd ?
121 int m_lo_direction; // EAST, WEST
122 int m_la_direction; // NORT, SOUTH
123 double m_longitude; // longitude for gotoXX° function
124 double m_latitude; // latitude for gotoXX° function
126 eDVBSatelliteRotorGotoxxParameters m_gotoxx_parameters;
128 struct Orbital_Position_Compare
130 inline bool operator()(const int &i1, const int &i2) const
132 return abs(i1-i2) < 6 ? false: i1 < i2;
135 std::map< int, int, Orbital_Position_Compare > m_rotor_position_table;
136 /* mapping orbitalposition <-> number stored in rotor */
138 void setDefaultOptions(); // set default rotor options
141 class eDVBSatelliteParameters
144 eDVBSatelliteDiseqcParameters m_diseqc_parameters;
145 eDVBSatelliteRotorParameters m_rotor_parameters;
146 eDVBSatelliteSwitchParameters m_switch_parameters;
149 class eDVBSatelliteLNBParameters
152 enum t_12V_relais_state { OFF=0, ON };
153 t_12V_relais_state m_12V_relais_state; // 12V relais output on/off
155 unsigned int m_lof_hi, // for 2 band universal lnb 10600 Mhz (high band offset frequency)
156 m_lof_lo, // for 2 band universal lnb 9750 Mhz (low band offset frequency)
157 m_lof_threshold; // for 2 band universal lnb 11750 Mhz (band switch frequency)
159 bool m_increased_voltage; // use increased voltage ( 14/18V )
161 std::map<int, eDVBSatelliteParameters> m_satellites;
164 class eDVBSatelliteEquipmentControl: public iDVBSatelliteEquipmentControl
166 std::list<eDVBSatelliteLNBParameters> m_lnblist;
168 DECLARE_REF(eDVBSatelliteEquipmentControl);
169 eDVBSatelliteEquipmentControl();
170 RESULT prepare(iDVBFrontend &frontend, FRONTENDPARAMETERS &parm, eDVBFrontendParametersSatellite &sat);