mealy.h

来自「WCDMA的仿真程序,分别用C和MATLAB两种语言仿真」· C头文件 代码 · 共 67 行

H
67
字号
/* | | Copyright disclaimer: |   This software was developed at the National Institute of Standards |   and Technology by employees of the Federal Government in the course |   of their official duties. Pursuant to title 17 Section 105 of the |   United States Code this software is not subject to copyright |   protection and is in the public domain. | |   We would appreciate acknowledgement if the software is used. |*//* | Project:     WCDMA simulation environment | Module:      Convolutional encoder | Author:      C. Britton Rorabaugh | Date:        January 12, 1999 | | History: |              January 12, 1999 Tommi Makelainen |                      Modified Rorabaugh's example code |			(book Error coding cookbook, McGraw-Hill, 1996) |                      to rate 1/3 code with constraint length |                      K=9 (i.e. length of memory shift register). | */#ifndef MEALY_H#define MEALY_H//  private:struct MealyEncoder_type {	int Output_Symbol[256][2]; /* [no. of states][no. of input states] */	int Next_State[256][2];  /* [no. of states][no. of input states] */	int Max_Input;	int Max_State;};typedef struct MealyEncoder_type MealyEncoder;// public:	void MealyEncoder_R1o3_Init(                        MealyEncoder* this,                        int num_stages,                        int gen_poly_1,                         int gen_poly_2,                        int gen_poly_3);void MealyEncoder_R1o2_Init(                        MealyEncoder* this,			int num_stages,			int gen_poly_1, 			int gen_poly_2);int MealyEncoder_GetNextState(	MealyEncoder* this,				int current_state,				int input);int MealyEncoder_GetOutput(	MealyEncoder* this,				int current_state,				int input);								int MealyEncoder_GetTransitionTrigger(	MealyEncoder* this,					int previous_state,					int current_state);#endif

⌨️ 快捷键说明

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