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

3G开发

开发平台:

Visual C++

  1. //
  2. //  File = sysgraph.h
  3. //
  4. #ifndef _SYSGRAPH_H_
  5. #define _SYSGRAPH_H_
  6. #include "model_graph.h"
  7. #include "digraph.h"
  8. typedef struct{
  9.   GenericSignal*     signal_id;
  10.   int                block_size;
  11.   double             samp_intvl;
  12.   SignalKinds_type   kind_of_signal;
  13.   } sdg_sig_desc_type;
  14. typedef struct{
  15.   PracSimModel*     model_id;
  16.   double            resamp_rate;
  17.   double            delta_delay;
  18.   bool              is_const_intvl;
  19.   } sdg_edge_desc_type;
  20. class SystemGraph
  21. {
  22. public:
  23.   SystemGraph(void);
  24.   ~SystemGraph(void);
  25.   void MergeCurrModelGraph( ModelGraph* cmsg );
  26.   void DumpSDGraph(void);
  27.   void ResolveSignalParms(void);
  28.   void TopoSortSDG(void);
  29.   void Propagate( int base_sig_num,
  30.                   int edge_num,
  31.                   int sig_num,
  32.                   bool is_forward);
  33.   void DistributeSignalParms(void);
  34.   void AllocateStorageBuffers(void);
  35.   void InitializeReadPtrs(void);
  36.   void DeleteModels(void);
  37.   void InitializeModels(void);
  38.   void RunSimulation(void);
  39.   void RegisterModel(PracSimModel* model);
  40.   void AllocatePlotPointers(void);
  41.   GenericSignal* GetSignalId( char* sig_name);
  42. private:
  43.   std::vector<sdg_sig_desc_type*> *Sdg_Vert_Descr;
  44.   std::vector<sdg_edge_desc_type*> *Sdg_Edge_Descr;
  45.   std::vector<double> *Samp_Intvl;
  46.   std::vector<int> *Block_Size;
  47.   DirectedGraph *Sig_Dep_Graph;
  48.   int Num_Regular_Sigs;
  49.   int *Sorted_Sig_Nodes;
  50.   std::vector<PracSimModel*> *Syst_Lev_Models;
  51.   int Num_Sys_Lev_Models;
  52.   
  53. };
  54. #endif //_SYSGRAPH_H_