discrete_adv_T.h
上传用户:jtjnyq9001
上传日期:2014-11-21
资源大小:3974k
文件大小:2k
源码类别:

3G开发

开发平台:

Visual C++

  1. //
  2. //  File = discrete_adv_T.h
  3. //
  4. #ifndef _DISCRETE_ADV_T_H_
  5. #define _DISCRETE_ADV_T_H_
  6. #include "signal_T.h"
  7. #include "psmodel.h"
  8. #include "adv_modes.h"
  9. #include "control_T.h"
  10. template < class T >
  11. class DiscreteAdvance : public PracSimModel
  12. {
  13. public:
  14.   DiscreteAdvance< T >( char* instance_nam,
  15.                    PracSimModel* outer_model,
  16.                    Signal<T> *in_signal,
  17.                    Signal<T> *out_signal,
  18.                    Control<int> *dynam_adv_cntrl,
  19.                    Control<bool> *adv_chg_enab_cntrl );
  20.   DiscreteAdvance< T >( char* instance_nam,
  21.                    PracSimModel* outer_model,
  22.                    Signal<T> *in_signal,
  23.                    Signal<T> *out_signal,
  24.                    Control<int> *dynam_adv_cntrl );
  25.   DiscreteAdvance< T >( char* instance_nam,
  26.                    PracSimModel* outer_model,
  27.                    Signal<T> *in_signal,
  28.                    Signal<T> *out_signal );
  29.   ~DiscreteAdvance< T >(void);
  30.   void Initialize(void);
  31.   int Execute(void);
  32. private:
  33.   void Constructor_Common_Tasks( char *instance_name,
  34.                             Signal<T> *in_sig,
  35.                             Signal<T> *out_sig);
  36.   Signal<T> *In_Sig;
  37.   Signal<T> *Out_Sig;
  38.   Control<int> *Dynam_Adv_Cntrl;
  39.   Control<bool> *Adv_Chg_Enab_Cntrl;
  40.   //---------------------------------------------
  41.   //  user-specified static parameters
  42.   ADVANCE_MODE_T Advance_Mode;
  43.   int Initial_Adv_In_Samps;
  44.   int Max_Adv_In_Samps;
  45.   int Num_Initial_Passes;
  46.   //--------------------------------------------
  47.   //  state variables and derived parameters
  48.   int Block_Size;
  49.   int Max_Buffer_Len;
  50.   T *Start_Of_Buffer;
  51.   T *End_Of_Buffer;
  52.   T *Read_Ptr;
  53.   T *Write_Ptr;
  54.   int Active_Adv_In_Samps;
  55.   int Whole_Blocks_To_Adv;
  56.   int Blocks_Of_Offset;
  57.   int Num_Blocks_Skipped;
  58.   int Return_Status;
  59.   int New_Pass_Number;
  60. };
  61. #endif