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

📄 fifocmd.h

📁 This a framework to test new ideas in transmission technology. Actual development is a LDPC-coder in
💻 H
字号:
/***************************************************************************         fifocmd.h  -  Fifo-cmd interface with the sradio-framework                            -------------------    begin                :  2003    authors              :  Linus Gasser    emails               :  linus.gasser@epfl.ch ***************************************************************************//***************************************************************************                                 Changes                                 ------- date - name - description 03/08/11 - ineiti- begin **************************************************************************//*************************************************************************** *                                                                         * *   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.                                   * *                                                                         * ***************************************************************************//** * The interface to the sradio-framework changed in august 2003 from a  * proc-based, directory-like interface to a simple, more rt-friendly * two-fifo system. One fifo is used to send commands to the sradio, * the other fifo is used to read back the results. */#ifndef FIFOCMD_H__#define FIFOCMD_H__#include <qobject.h>#include <qdir.h>#include <qstring.h>#include <qfile.h>#include <qcstring.h>#include <qtextstream.h>#include <qstringlist.h>class FifoCmd : public QObject{ Q_OBJECT   public: // without parameter it's for realtime  FifoCmd( ); // with parameter it's the user-space dir  FifoCmd( QString bdir );  // Only sends 'cmd' to the fifo  bool sendCmd( QString cmd );  // Reads the length of the reply  uint getReplyLen();  // Returns at max 'max_len' bytes. If max_len == 0, returns  // everything  QByteArray getReplyBlock( uint len, uint max_len = 0 );  // Sends 'cmd' to the fifo and waits for reply  QByteArray getReply( QString cmd );  // Same as getReply, but converts to QString  QString getReplyQStr( QString cmd );  // Same as getReplyQStr, but converts to QStringList  QStringList getReplyQStrList( QString cmd );  // Same as getReplyQStrList but deletes  // first line (which contains the number of lines )  QStringList getReplyQStrListCut( QString cmd );  // Checks whether the fifos are actif and sends a ping  bool isAlive();  // Sends a process-message -> starts doing something  void processData( int module_id );  // Returns a list of all available modules. Each string is a comma-  // seperated id,name value  QStringList getModules();  // Returns a list of all available modules. Each string is a comma-  // seperated id,name value  // All modules are tagged 'seen'  QStringList getTagModules();  // Returns a list of all not yet seen modules. Each string is a comma-  // seperated id,name value  QStringList getNewModules();  // Returns the name of a module given its id  QString getName( int module_id );  // Returns a list of all inputs of a given module  QStringList getInputs( int module_id );  // Returns a list of all outputs of a given module  QStringList getOutputs( int module_id );  // Returns a list of all config-params of a given module  QStringList getConfig( int module_id );  // Returns a list of all stats-params of a given module  QStringList getStats( int module_id );  // Gets a memory for a block-stats  QByteArray getBlock( int module_id, int stats_id );  // Gets a memory for an image-stats  QByteArray getImage( int module_id, int stats_id );  // Gets the data from a port  QByteArray getPort( int module_id, int port );  // Sets a new config  int setConfig( int module_id, int config_id, QString new_value );  // Sets up a new list  int newList( int m1, int s1, int m2, int s2 );  // Returns a list of comma-seperated value-pairs  QStringList readList( int list_id );  // Closes down a list  void closeList( int list_id );  // Returns the (time,calls) pairs of:  // msgs, data, total  QValueList<QPair<long long int,long long int> >     FifoCmd::getProfiling( int module_id ); private:  QFile *f_cmd, *f_reply;  QTextStream *fifo_cmd;  bool fifo_lives;};#endif

⌨️ 快捷键说明

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