38 static DVBParam dvbParams[] = {
52 return (boost::uint16_t(fec) << 8) | (boost::uint16_t(mod) << 4) | (boost::uint16_t(gi));
56 prefix_ senf::emu::DVBModulationParameter::DVBModulationParameter(std::string
const & _label,
short _minRssi,
unsigned _rate,
57 fec_rate_t _fec, modulation_t mod, guard_interval_t gi)
59 fec(_fec), modulation(mod), guard_interval(gi)
63 prefix_ boost::uint16_t senf::emu::DVBModulationParameter::v_modulationId()
66 return calc_modulationId(fec, modulation, guard_interval);
75 prefix_ void senf::emu::DVBModulationParameter::v_dump(std::ostream & os)
78 os <<
"todo!" << std::endl;
81 prefix_ void senf::emu::DVBModulationParameter::v_dumpTableHeader(std::ostream & os)
87 prefix_ void senf::emu::DVBModulationParameter::v_dumpTableRow(std::ostream & os)
93 prefix_ senf::emu::DVBModulationParameterRegistry::DVBModulationParameterRegistry()
95 for (DVBParam
const & param : dvbParams) {
96 DVBModulationParameter p (param.coding, param.rssi, param.rate, param.fec, param.modulation, param.guard_interval);
97 registerModulation( p);
104 modulations_.insert( std::make_pair(
id, p));
105 idTranslateMap_.insert( std::make_pair(p.v_modulationId(), id));
112 Modulations::const_iterator it (modulations_.find(
id));
113 if (it == modulations_.end())
122 IdTranslateMap::const_iterator i (idTranslateMap_.find(calc_modulationId(fec, mod, gi)));
123 return (i != idTranslateMap_.end() ? i->second : 0);
129 return senf::make_transform_range(modulations_, ::__gnu_cxx::select1st<Modulations::value_type>());
135 namespace senf {
namespace emu {
137 (FEC_NONE)(FEC_1_2)(FEC_2_3)(FEC_3_4)(FEC_4_5)(FEC_5_6)(FEC_6_7)(FEC_7_8)(FEC_8_9)
138 (FEC_AUTO)(FEC_3_5)(FEC_9_10) );
140 (QPSK)(QAM_16)(QAM_32)(QAM_64)(QAM_128)(QAM_256)(QAM_AUTO)(VSB_8)(VSB_16)(PSK_8)
141 (APSK_16)(APSK_32)(DQPSK) );
143 (GUARD_INTERVAL_1_32)(GUARD_INTERVAL_1_16)(GUARD_INTERVAL_1_8)(GUARD_INTERVAL_1_4)
144 (GUARD_INTERVAL_AUTO)(GUARD_INTERVAL_1_128)(GUARD_INTERVAL_19_128)(GUARD_INTERVAL_19_256) );
151 namespace fty = console::factory;
155 prefix_ boost::uint8_t senf::emu::DVBInterface::v_linkTypeId()
164 v_tune( fec, mod, gi, freq);
unsigned registerModulation(ModulationParameter ¶meter)
boost::iterator_range< ModulationParameterId_iterator > ModulationParameterIds
void tune(DVBModulationParameter::fec_rate_t fec, DVBModulationParameter::modulation_t mod, DVBModulationParameter::guard_interval_t gi, unsigned freq)
boost::uint8_t linkTypeId() const
Wireless modulation parameter.
SENF_CONSOLE_REGISTER_ENUM_MEMBER(DVBModulationParameter, fec_rate_t,(FEC_NONE)(FEC_1_2)(FEC_2_3)(FEC_3_4)(FEC_4_5)(FEC_5_6)(FEC_6_7)(FEC_7_8)(FEC_8_9)(FEC_AUTO)(FEC_3_5)(FEC_9_10))
ModulationParameter::id_t parameterId(DVBModulationParameter::fec_rate_t fec, DVBModulationParameter::modulation_t mod, DVBModulationParameter::guard_interval_t gi) const
console::ScopedDirectory & consoleDir()
DVBModulationParameter const & findModulationById(ModulationParameter::id_t id) const
static ModulationParameterRegistry & instance()
DVBInterface public header.
ModulationParameterIds parameterIds() const