|
|
@@ -53,7 +53,7 @@ transponder::transponder()
|
|
|
|
|
|
|
|
|
|
|
|
bool transponder::operator==(const transponder& t) const
|
|
|
|
bool transponder::operator==(const transponder& t) const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (type != FE_OFDM)
|
|
|
|
if (deltype != FE_OFDM)
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
(satellitePosition == t.satellitePosition) &&
|
|
|
|
(satellitePosition == t.satellitePosition) &&
|
|
|
|
//(transport_stream_id == t.transport_stream_id) &&
|
|
|
|
//(transport_stream_id == t.transport_stream_id) &&
|
|
|
@@ -84,14 +84,14 @@ bool transponder::compare(const transponder& t) const
|
|
|
|
(dvb_feparams1->u.qam.modulation == dvb_feparams2->u.qam.modulation ||
|
|
|
|
(dvb_feparams1->u.qam.modulation == dvb_feparams2->u.qam.modulation ||
|
|
|
|
dvb_feparams1->u.qam.modulation == QAM_AUTO || dvb_feparams2->u.qam.modulation == QAM_AUTO)
|
|
|
|
dvb_feparams1->u.qam.modulation == QAM_AUTO || dvb_feparams2->u.qam.modulation == QAM_AUTO)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
} else if (type == FE_QPSK) {
|
|
|
|
} else if (deltype == FE_QPSK) {
|
|
|
|
ret = (
|
|
|
|
ret = (
|
|
|
|
(t == (*this)) &&
|
|
|
|
(t == (*this)) &&
|
|
|
|
(dvb_feparams1->u.qpsk.symbol_rate == dvb_feparams2->u.qpsk.symbol_rate) &&
|
|
|
|
(dvb_feparams1->u.qpsk.symbol_rate == dvb_feparams2->u.qpsk.symbol_rate) &&
|
|
|
|
(dvb_feparams1->u.qpsk.fec_inner == dvb_feparams2->u.qpsk.fec_inner ||
|
|
|
|
(dvb_feparams1->u.qpsk.fec_inner == dvb_feparams2->u.qpsk.fec_inner ||
|
|
|
|
dvb_feparams1->u.qpsk.fec_inner == FEC_AUTO || dvb_feparams2->u.qpsk.fec_inner == FEC_AUTO)
|
|
|
|
dvb_feparams1->u.qpsk.fec_inner == FEC_AUTO || dvb_feparams2->u.qpsk.fec_inner == FEC_AUTO)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
} else if (type == FE_OFDM) {
|
|
|
|
} else if (deltype == FE_OFDM) {
|
|
|
|
ret = ( (t == (*this)) &&
|
|
|
|
ret = ( (t == (*this)) &&
|
|
|
|
(dvb_feparams1->u.ofdm.bandwidth == dvb_feparams2->u.ofdm.bandwidth) &&
|
|
|
|
(dvb_feparams1->u.ofdm.bandwidth == dvb_feparams2->u.ofdm.bandwidth) &&
|
|
|
|
(dvb_feparams1->u.ofdm.code_rate_HP == dvb_feparams2->u.ofdm.code_rate_HP ||
|
|
|
|
(dvb_feparams1->u.ofdm.code_rate_HP == dvb_feparams2->u.ofdm.code_rate_HP ||
|
|
|
@@ -116,13 +116,13 @@ void transponder::dumpServiceXml(FILE * fd)
|
|
|
|
dvb_feparams->u.qam.symbol_rate, dvb_feparams->u.qam.fec_inner,
|
|
|
|
dvb_feparams->u.qam.symbol_rate, dvb_feparams->u.qam.fec_inner,
|
|
|
|
dvb_feparams->u.qam.modulation);
|
|
|
|
dvb_feparams->u.qam.modulation);
|
|
|
|
|
|
|
|
|
|
|
|
} else if (type == FE_QPSK) {
|
|
|
|
} else if (deltype == FE_QPSK) {
|
|
|
|
fprintf(fd, "\t\t<TS id=\"%04x\" on=\"%04x\" frq=\"%u\" inv=\"%hu\" sr=\"%u\" fec=\"%hu\" pol=\"%hu\">\n",
|
|
|
|
fprintf(fd, "\t\t<TS id=\"%04x\" on=\"%04x\" frq=\"%u\" inv=\"%hu\" sr=\"%u\" fec=\"%hu\" pol=\"%hu\">\n",
|
|
|
|
transport_stream_id, original_network_id,
|
|
|
|
transport_stream_id, original_network_id,
|
|
|
|
dvb_feparams->frequency, dvb_feparams->inversion,
|
|
|
|
dvb_feparams->frequency, dvb_feparams->inversion,
|
|
|
|
dvb_feparams->u.qpsk.symbol_rate, dvb_feparams->u.qpsk.fec_inner,
|
|
|
|
dvb_feparams->u.qpsk.symbol_rate, dvb_feparams->u.qpsk.fec_inner,
|
|
|
|
polarization);
|
|
|
|
polarization);
|
|
|
|
} else if (type == FE_OFDM) {
|
|
|
|
} else if (deltype == FE_OFDM) {
|
|
|
|
fprintf(fd, "\t\t<TS id=\"%04x\" on=\"%04x\" frq=\"%u\" inv=\"%hu\" bw=\"%u\" hp=\"%hu\" lp=\"%hu\" con=\"%u\" tm=\"%u\" gi=\"%u\" hi=\"%u\">\n",
|
|
|
|
fprintf(fd, "\t\t<TS id=\"%04x\" on=\"%04x\" frq=\"%u\" inv=\"%hu\" bw=\"%u\" hp=\"%hu\" lp=\"%hu\" con=\"%u\" tm=\"%u\" gi=\"%u\" hi=\"%u\">\n",
|
|
|
|
transport_stream_id, original_network_id,
|
|
|
|
transport_stream_id, original_network_id,
|
|
|
|
dvb_feparams->frequency, dvb_feparams->inversion,
|
|
|
|
dvb_feparams->frequency, dvb_feparams->inversion,
|
|
|
@@ -141,11 +141,11 @@ void transponder::dump(std::string label)
|
|
|
|
printf("%s tp-id %016" PRIx64 " freq %d rate %d fec %d mod %d\n", label.c_str(),
|
|
|
|
printf("%s tp-id %016" PRIx64 " freq %d rate %d fec %d mod %d\n", label.c_str(),
|
|
|
|
transponder_id, dvb_feparams->frequency, dvb_feparams->u.qam.symbol_rate,
|
|
|
|
transponder_id, dvb_feparams->frequency, dvb_feparams->u.qam.symbol_rate,
|
|
|
|
dvb_feparams->u.qam.fec_inner, dvb_feparams->u.qam.modulation);
|
|
|
|
dvb_feparams->u.qam.fec_inner, dvb_feparams->u.qam.modulation);
|
|
|
|
else if (type == FE_QPSK)
|
|
|
|
else if (deltype == FE_QPSK)
|
|
|
|
printf("%s tp-id %016" PRIx64 " freq %d rate %d fec %d pol %d\n", label.c_str(),
|
|
|
|
printf("%s tp-id %016" PRIx64 " freq %d rate %d fec %d pol %d\n", label.c_str(),
|
|
|
|
transponder_id, dvb_feparams->frequency, dvb_feparams->u.qpsk.symbol_rate,
|
|
|
|
transponder_id, dvb_feparams->frequency, dvb_feparams->u.qpsk.symbol_rate,
|
|
|
|
dvb_feparams->u.qpsk.fec_inner, polarization);
|
|
|
|
dvb_feparams->u.qpsk.fec_inner, polarization);
|
|
|
|
else if (type == FE_OFDM)
|
|
|
|
else if (deltype == FE_OFDM)
|
|
|
|
printf("%s tp-id %016llx freq %d bw %d coderate %d\n", label.c_str(),
|
|
|
|
printf("%s tp-id %016llx freq %d bw %d coderate %d\n", label.c_str(),
|
|
|
|
transponder_id, dvb_feparams->frequency, dvb_feparams->u.ofdm.bandwidth,
|
|
|
|
transponder_id, dvb_feparams->frequency, dvb_feparams->u.ofdm.bandwidth,
|
|
|
|
dvb_feparams->u.ofdm.code_rate_HP);
|
|
|
|
dvb_feparams->u.ofdm.code_rate_HP);
|
|
|
@@ -188,8 +188,8 @@ std::string transponder::description()
|
|
|
|
snprintf(buf, sizeof(buf), "%d %d %s %s %s ", dvb_feparams->frequency/1000, dvb_feparams->u.qam.symbol_rate/1000, f, s, m);
|
|
|
|
snprintf(buf, sizeof(buf), "%d %d %s %s %s ", dvb_feparams->frequency/1000, dvb_feparams->u.qam.symbol_rate/1000, f, s, m);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case FE_OFDM:
|
|
|
|
case FE_OFDM:
|
|
|
|
CFrontend::getDelSys(type, dvb_feparams->u.ofdm.code_rate_HP, dvb_feparams->u.ofdm.constellation, f, s, m);
|
|
|
|
CFrontend::getDelSys(deltype, dvb_feparams->u.ofdm.code_rate_HP, dvb_feparams->u.ofdm.constellation, f, s, m);
|
|
|
|
CFrontend::getDelSys(type, dvb_feparams->u.ofdm.code_rate_LP, dvb_feparams->u.ofdm.constellation, f2, s, m);
|
|
|
|
CFrontend::getDelSys(deltype, dvb_feparams->u.ofdm.code_rate_LP, dvb_feparams->u.ofdm.constellation, f2, s, m);
|
|
|
|
b = dvb_feparams->u.ofdm.bandwidth;
|
|
|
|
b = dvb_feparams->u.ofdm.bandwidth;
|
|
|
|
if (b > 3)
|
|
|
|
if (b > 3)
|
|
|
|
b = 3;
|
|
|
|
b = 3;
|
|
|
|