+ else if (m_type == eDVBFrontend::feTerrestrial)
+ return 1;
+ return 0;
+}
+
+bool eDVBFrontend::setSlotInfo(ePyObject obj)
+{
+ ePyObject Id, Descr, Enabled;
+ if (!PyTuple_Check(obj) || PyTuple_Size(obj) != 3)
+ goto arg_error;
+ Id = PyTuple_GET_ITEM(obj, 0);
+ Descr = PyTuple_GET_ITEM(obj, 1);
+ Enabled = PyTuple_GET_ITEM(obj, 2);
+ if (!PyInt_Check(Id) || !PyString_Check(Descr) || !PyBool_Check(Enabled))
+ goto arg_error;
+ strcpy(m_description, PyString_AS_STRING(Descr));
+ m_slotid = PyInt_AsLong(Id);
+ m_enabled = Enabled == Py_True;
+ // HACK.. the rotor workaround is neede for all NIMs with LNBP21 voltage regulator...
+ m_need_rotor_workaround = !!strstr(m_description, "Alps BSBE1") ||
+ !!strstr(m_description, "Alps BSBE2") ||
+ !!strstr(m_description, "Alps -S") ||
+ !!strstr(m_description, "BCM4501");
+ m_can_handle_dvbs2 = !!strstr(m_description, "Alps BSBE2") || !!strstr(m_description, "BCM4501");
+ eDebug("setSlotInfo for dvb frontend %d to slotid %d, descr %s, need rotorworkaround %s, enabled %s, DVB-S2 %s",
+ m_dvbid, m_slotid, m_description, m_need_rotor_workaround ? "Yes" : "No", m_enabled ? "Yes" : "No", m_can_handle_dvbs2 ? "Yes" : "No" );
+ return true;
+arg_error:
+ PyErr_SetString(PyExc_StandardError,
+ "eDVBFrontend::setSlotInfo must get a tuple with first param slotid, second param slot description and third param enabled boolean");
+ return false;