common.h

来自「This a framework to test new ideas in tr」· C头文件 代码 · 共 45 行

H
45
字号
#ifndef COMMON_H__#define COMMON_H__#include "chain.h"#include "sradio.h"struct chain_t *setup_rcv( int slot, swr_sdb_id stfa,			   swr_sdb_id *mafi, swr_sdb_id *cch,			   char **slot_str ){  struct chain_t *ret;  PR_DBG( 1, "Setting up rcv-chain on slot %i\n", slot );  ret = swr_chain_create( OLD_SPC_OUT( stfa, slot ),			  NEW_SPC_VAR( "matched_filter", mafi[ slot ] ),			  NEW_SPC( "slicer" ),			  NEW_SPC_VAR( "cch_rcv", cch[ slot ] ),			  CHAIN_END );  slot_str[ slot ] = swr_malloc( STR_LEN );  swr_sdb_set_config_pointer( cch[ slot ], "data", slot_str[ slot ] );  swr_sdb_set_config_int( cch[ slot ], "length", STR_LEN );  return ret;}struct chain_t *setup_send( int slot, swr_sdb_id *cch, swr_sdb_id *mod,			    swr_sdb_id stfa, char **slot_str ){  struct chain_t *ret;  PR_DBG( 1, "Setting up send-chain on slot %i\n", slot );  ret = swr_chain_create( NEW_SPC_VAR( "cch_send", cch[ slot ] ),			  NEW_SPC_VAR( "mapper", mod[ slot ] ),			  NEW_SPC( "midamble" ),			  NEW_SPC( "rrc" ),			  OLD_SPC_IN( stfa, slot ),			  CHAIN_END );  slot_str[ slot ] = swr_malloc( STR_LEN );  swr_sdb_set_config_pointer( cch[ slot ], "data", slot_str[ slot ] );  swr_sdb_set_config_int( cch[ slot ], "length", STR_LEN );  swr_stfa_notice_sdb( stfa, slot, cch[ slot ] );  return ret;}#endif

⌨️ 快捷键说明

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