⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 config.cpp

📁 This a framework to test new ideas in transmission technology. Actual development is a LDPC-coder in
💻 CPP
字号:
/***************************************************************************        config.cpp  -  The definition for the configuration                           -------------------   begin                :  2003   authors              :  Vincent Porchet   emails               :  vincent.porchet@epfl.ch***************************************************************************//*************************************************************************** *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU General Public License as published by  * *   the Free Software Foundation; either version 2 of the License, or     * *   (at your option) any later version.                                   * *                                                                         * ***************************************************************************//** * @short Holds the definition of a configuration */#include <iostream>#include <qfile.h>#include "config.h"#include "parameter_types.h"// this is the standard C++-way of using cout <<using namespace std;Config::Config( FifoCmd *c, int m_i, int i ) :  radio( c ), module_id( m_i ), id( i ){  QStringList all = radio->getConfig( module_id );  if ( (uint)id >= all.count() ){    cout << "Desired config-id is bigger than available configs\n";    return;  }  QStringList args = QStringList::split( ",", all[ i ] );  name = args[0];  type = args[1].toInt();  flags = args[2].toULong();  if ( ( type == BLOCK ) || ( type == IMAGE ) ){    args.pop_front(); args.pop_front(); args.pop_front();    value = args.join( "," );  } else {    value = args[3];  }}void Config::slotValueChanged( int v ) {  if ( !radio->setConfig( module_id, id, QString( "%1" ).arg( v ) ) ){    cout << "Couldn't change the config-param.\n";  }}void Config::slotTextChanged( const QString &v ) {  if ( !radio->setConfig( module_id, id, v ) ){    cout << "Couldn't change the config-param.\n";  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -