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

📄 test_data.c

📁 This a framework to test new ideas in transmission technology. Actual development is a LDPC-coder in
💻 C
字号:
/*************************************************************************** *    test_data.c  -  Allows to check for a good communication *                           ------------------- *   begin                :  2003 *   authors              :  ineiti *   emails               :  linus.gasser@epfl.ch ***************************************************************************//*************************************************************************** *                                Changes *                                ------- * date - name - description * 03/02/06 - ineiti - start * 04/03/06 - ineiti - adjusted description * **************************************************************************//*************************************************************************** *                                                                         * *   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 goal of this module is to test a given coding-algorithm with * respect to it's performances. *  This module offers two parts: one sending part, "test_data_send",  * where random chars are sent through two output-ports and a receiving part,  * "test_data_rcv", that takes two streams of random chars. In the sending  *  part, both streams are identical. * One stream shall go through the module that needs to be tested,  * the other goes through a mostly error-free path. The receiving module * then compares the two and prints out the BER. * *  *  In a real radio-case, you usually have something like this: *   *      transmission side: *  random_1 -> test_data_send -> coding -> stfa -> air *   *      reception side: *  air -> decoding -\ *                    test_data_rcv *         random_2 -/ * * by setting the following config-variables at the random-modules: *   config->seed = 0x1234 (or any other value) *   config->mode = 1 * you can make sure that both test_data_* modules have the same random- * data to compare with. Furthermore, you can set at the test_data_rcv * the following config-variable: *   config->wait = 1 * and call once the random_2 module. Like this, the test_data_rcv has * always the random-data available, and each time it receives some * data from the decoding part, it will perform the bit-comparison and * output the results. */#include "spc.h"#define DBG_LVL 4int rcv_module_init( void );void rcv_module_exit( void );int send_module_init( void );void send_module_exit( void );/* * Just call the two init-functions */int spc_module_init(void) {  if( rcv_module_init() < 0 ) {    PR_DBG( 0, "Couldn't init rcv-part\n" );    return -1;  }  if ( send_module_init() < 0 ) {    rcv_module_exit();    PR_DBG( 0, "Couldn't init send-part\n" );    return -1;  }  return 0;}/* * And call the two exit-funcitons */void spc_module_exit( void ) {  rcv_module_exit();  send_module_exit();}module_init( spc_module_init );module_exit( spc_module_exit );

⌨️ 快捷键说明

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