X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fdvb%2Fsec.h;h=2efd0b4985462b2179ade6b750d3b73a899d6c4f;hp=92aff3dc1dc4002eef5e0d00f78310d2b586b00c;hb=b833353b5285a547eb18c079aa860c9ee2765d6e;hpb=5fc2635967a60400e54854500332e2be21b88b79 diff --git a/lib/dvb/sec.h b/lib/dvb/sec.h index 92aff3d..2efd0b4 100644 --- a/lib/dvb/sec.h +++ b/lib/dvb/sec.h @@ -19,15 +19,21 @@ public: MEASURE_IDLE_INPUTPOWER, MEASURE_RUNNING_INPUTPOWER, IF_MEASURE_IDLE_WAS_NOT_OK_GOTO, IF_INPUTPOWER_DELTA_GOTO, UPDATE_CURRENT_ROTORPARAMS, INVALIDATE_CURRENT_ROTORPARMS, + UPDATE_CURRENT_SWITCHPARMS, INVALIDATE_CURRENT_SWITCHPARMS, IF_ROTORPOS_VALID_GOTO, IF_TUNER_LOCKED_GOTO, IF_TONE_GOTO, IF_NOT_TONE_GOTO, - START_TUNE_TIMEOUT + START_TUNE_TIMEOUT, + SET_ROTOR_MOVING, + SET_ROTOR_STOPPED }; int cmd; struct rotor { - int deltaA; // difference in mA between running and stopped rotor + union { + int deltaA; // difference in mA between running and stopped rotor + int lastSignal; + }; int okcount; // counter int steps; // goto steps int direction; @@ -164,7 +170,7 @@ class eDVBSatelliteSwitchParameters #endif public: enum t_22khz_signal { HILO=0, ON=1, OFF=2 }; // 22 Khz - enum t_voltage_mode { HV=0, _14V=1, _18V=2, _0V=3 }; // 14/18 V + enum t_voltage_mode { HV=0, _14V=1, _18V=2, _0V=3, HV_13=4 }; // 14/18 V #ifndef SWIG t_voltage_mode m_voltage_mode; t_22khz_signal m_22khz_signal; @@ -225,7 +231,7 @@ public: #ifndef SWIG t_12V_relais_state m_12V_relais_state; // 12V relais output on/off - __u8 slot_mask; // useable by slot ( 1 | 2 | 4...) + int m_slot_mask; // useable by slot ( 1 | 2 | 4...) unsigned int m_lof_hi, // for 2 band universal lnb 10600 Mhz (high band offset frequency) m_lof_lo, // for 2 band universal lnb 9750 Mhz (low band offset frequency) @@ -236,6 +242,8 @@ public: std::map m_satellites; eDVBSatelliteDiseqcParameters m_diseqc_parameters; eDVBSatelliteRotorParameters m_rotor_parameters; + + int m_prio; // to override automatic tuner management ... -1 is Auto #endif }; @@ -257,18 +265,21 @@ public: DELAY_AFTER_ENABLE_VOLTAGE_BEFORE_MOTOR_CMD, // delay after enable voltage before transmit motor command DELAY_AFTER_MOTOR_STOP_CMD, // delay after transmit motor stop DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_MOTOR_CMD, // delay after voltage change before transmit motor command + DELAY_BEFORE_SEQUENCE_REPEAT, // delay before the complete sequence is repeated (when enabled) MOTOR_COMMAND_RETRIES, // max transmit tries of rotor command when the rotor dont start turning (with power measurement) MOTOR_RUNNING_TIMEOUT, // max motor running time before timeout DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_SWITCH_CMDS, // delay after change voltage before transmit toneburst/diseqc + DELAY_AFTER_DISEQC_RESET_CMD, + DELAY_AFTER_DISEQC_PERIPHERIAL_POWERON_CMD, MAX_PARAMS }; private: #ifndef SWIG static eDVBSatelliteEquipmentControl *instance; - eDVBSatelliteLNBParameters m_lnbs[128]; // i think its enough + eDVBSatelliteLNBParameters m_lnbs[144]; // i think its enough int m_lnbidx; // current index for set parameters std::map::iterator m_curSat; - eSmartPtrList &m_avail_frontends; + eSmartPtrList &m_avail_frontends, &m_avail_simulate_frontends; bool m_rotorMoving; int m_not_linked_slot_mask; bool m_canMeasureInputPower; @@ -280,9 +291,9 @@ private: static int m_params[MAX_PARAMS]; public: #ifndef SWIG - eDVBSatelliteEquipmentControl(eSmartPtrList &avail_frontends); + eDVBSatelliteEquipmentControl(eSmartPtrList &avail_frontends, eSmartPtrList &avail_simulate_frontends); RESULT prepare(iDVBFrontend &frontend, FRONTENDPARAMETERS &parm, const eDVBFrontendParametersSatellite &sat, int frontend_id, unsigned int tunetimeout); - int canTune(const eDVBFrontendParametersSatellite &feparm, iDVBFrontend *, int frontend_id); + int canTune(const eDVBFrontendParametersSatellite &feparm, iDVBFrontend *, int frontend_id, int *highest_score_lnb=0); bool currentLNBValid() { return m_lnbidx > -1 && m_lnbidx < (int)(sizeof(m_lnbs) / sizeof(eDVBSatelliteLNBParameters)); } #endif static eDVBSatelliteEquipmentControl *getInstance() { return instance; } @@ -295,6 +306,7 @@ public: RESULT setLNBLOFH(int lofh); RESULT setLNBThreshold(int threshold); RESULT setLNBIncreasedVoltage(bool onoff); + RESULT setLNBPrio(int prio); /* DiSEqC Specific Parameters */ RESULT setDiSEqCMode(int diseqcmode); RESULT setToneburst(int toneburst);