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

📄 tglobaltraffictable.h

📁 片上网络的noxim仿真平台
💻 H
字号:
/*****************************************************************************  TGlobalTrafficTable.h -- Global Traffic Table definition*****************************************************************************/#ifndef __TGLOBAL_TRAFFIC_TABLE_H__#define __TGLOBAL_TRAFFIC_TABLE_H__//---------------------------------------------------------------------------#include <stdio.h>#include <stdlib.h>#include <vector>#include "NoximDefs.h"using namespace std;//---------------------------------------------------------------------------// Structure used to store information into the tablestruct TCommunication{  int   src;                  // ID of the source node (PE)  int   dst;                  // ID of the destination node (PE)  float pir;                  // Packet Injection Rate for the link  float por;                  // Probability Of Retransmission for the link  int   t_on;                 // Time (in cycles) at which activity begins  int   t_off;                // Time (in cycles) at which activity ends  int   t_period;             // Period after which activity starts again};//---------------------------------------------------------------------------class TGlobalTrafficTable{public:  TGlobalTrafficTable();   // Load traffic table from file. Returns true if ok, false otherwise  bool load(const char* fname);  // Returns the cumulative pir por along with a vector of pairs. The  // first component of the pair is the destination. The second  // component is the cumulative shotting probability.  double getCumulativePirPor(const int src_id, 			     const int ccycle,			     const bool pir_not_por,			     vector<pair<int,double> >& dst_prob);  // Returns the number of occurrences of soruce src_id in the traffic  // table  int occurrencesAsSource(const int src_id);private:  vector<TCommunication> traffic_table;};//---------------------------------------------------------------------------#endif

⌨️ 快捷键说明

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