Skip to content
Snippets Groups Projects
Commit c6f97368 authored by tho's avatar tho
Browse files

replaced some tabs with spaces

parent 4e761779
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,7 @@ BOOST_AUTO_UNIT_TEST(RadiotapPacket_packet) ...@@ -34,7 +34,7 @@ BOOST_AUTO_UNIT_TEST(RadiotapPacket_packet)
/* used madwifi 0.9.4 */ /* used madwifi 0.9.4 */
unsigned char data[] = { unsigned char data[] = {
0x00 ,0x00 ,0x1a ,0x00, 0x6f, 0x18, 0x00, 0x00, 0x00 ,0x00 ,0x1a ,0x00, 0x6f, 0x18, 0x00, 0x00,
0x02, 0xe6, 0x8a, 0xdf, 0x12, 0x00, 0x00, 0x00, 0x02, 0xe6, 0x8a, 0xdf, 0x12, 0x00, 0x00, 0x00,
0x12, 0x0c, 0xc8, 0x14, 0x40, 0x01, 0xc3, 0xa0, 0x12, 0x0c, 0xc8, 0x14, 0x40, 0x01, 0xc3, 0xa0,
0x02, 0x23 0x02, 0x23
}; };
......
// $Id: DVBConfigParser.hh 965 2008-11-18 16:04:20Z g0dil $ // $Id$
// //
// Copyright (C) 2007 // Copyright (C) 2007
// Fraunhofer Institute for Open Communication Systems (FOKUS) // Fraunhofer Institute for Open Communication Systems (FOKUS)
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
/** \file /** \file
\brief DVBDemuxHandles public header */ \brief DVBDemuxHandles public header */
#ifndef DVBCONFIGPARSER_HH_ #ifndef HH_SENF_Socket_Protocols_DVB_DVBConfigParser_
#define DVBCONFIGPARSER_HH_ #define HH_SENF_Socket_Protocols_DVB_DVBConfigParser_ 1
#include <string> #include <string>
#include <vector> #include <vector>
...@@ -34,10 +34,12 @@ ...@@ -34,10 +34,12 @@
#include <fstream> #include <fstream>
#include <boost/tokenizer.hpp> #include <boost/tokenizer.hpp>
#include <linux/dvb/frontend.h> #include <linux/dvb/frontend.h>
namespace senf { namespace senf {
class DVBConfigParser
{ class DVBConfigParser
struct DVBParams { {
struct DVBParams {
std::map<std::string, fe_spectral_inversion_t> inversion; std::map<std::string, fe_spectral_inversion_t> inversion;
std::map<std::string, fe_bandwidth_t> bandwidth; std::map<std::string, fe_bandwidth_t> bandwidth;
std::map<std::string, fe_code_rate_t> code_rate; std::map<std::string, fe_code_rate_t> code_rate;
...@@ -45,29 +47,29 @@ class DVBConfigParser ...@@ -45,29 +47,29 @@ class DVBConfigParser
std::map<std::string, fe_hierarchy_t> hierarchy; std::map<std::string, fe_hierarchy_t> hierarchy;
std::map<std::string, fe_modulation_t> modulation; std::map<std::string, fe_modulation_t> modulation;
std::map<std::string, fe_transmit_mode_t> transmit_mode; std::map<std::string, fe_transmit_mode_t> transmit_mode;
DVBParams(); }; DVBParams();
static const DVBParams params; };
typedef boost::tokenizer<boost::char_separator<char> > tokenizer; static const DVBParams params;
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
public:
public: DVBConfigParser(fe_type_t type_, const std::string & configFilePath = "");
DVBConfigParser(fe_type_t type_, const std::string & configFilePath = ""); ~DVBConfigParser();
~DVBConfigParser();
std::string getConfigLine(std::string channel); std::string getConfigLine(std::string channel);
dvb_frontend_parameters getFrontendParam(std::string configLine); dvb_frontend_parameters getFrontendParam(std::string configLine);
private:
fe_type_t type; private:
std::ifstream configFile; fe_type_t type;
void initConfigFile(std::string _configFilePath); std::ifstream configFile;
void initConfigFile(std::string _configFilePath);
dvb_frontend_parameters getFrontendParamDVB_T( const tokenizer & tokens);
dvb_frontend_parameters getFrontendParamDVB_C( const tokenizer & tokens); dvb_frontend_parameters getFrontendParamDVB_T( const tokenizer & tokens);
dvb_frontend_parameters getFrontendParamDVB_S( const tokenizer & tokens); dvb_frontend_parameters getFrontendParamDVB_C( const tokenizer & tokens);
dvb_frontend_parameters getFrontendParamDVB_S( const tokenizer & tokens);
}; };
} }
#endif /*DVBCONFIGPARSER_H_*/
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment