亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? visualizer.cpp

?? 大名鼎鼎的傳感器網絡仿真實驗室平臺SENSE
?? CPP
字號:
/************************************************************************* *   @<title> Visualizer.cpp </title>@ * *   @<!-- Copyright 2006 Mark Lisee, Boleslaw K. Szymanski and Rensselaer *   Polytechnic Institute. All worldwide rights reserved.  A license to use, *   copy, modify and distribute this software for non-commercial research *   purposes only is hereby granted, provided that this copyright notice and *   accompanying disclaimer is not modified or removed from the software. * *   DISCLAIMER: The software is distributed "AS IS" without any express or *   implied warranty, including but not limited to, any implied warranties of *   merchantability or fitness for a particular purpose or any warranty of *   non-infringement of any current or pending patent rights. The authors of *   the software make no representations about the suitability of this *   software for any particular purpose. The entire risk as to the quality *   and performance of the software is with the user. Should the software *   prove defective, the user assumes the cost of all necessary servicing, *   repair or correction. In particular, neither Rensselaer Polytechnic *   Institute, nor the authors of the software are liable for any indirect, *   special, consequential, or incidental damages related to the software, *   to the maximum extent the law permits.-->@ * *************************************************************************/#include "ether_addr.h"#include "path.h"#include "Visualizer.h"using namespace std;Visualizer	*Visualizer::instance = NULL;const char	intro[] = "#Use the gnuplot command 'plot \"%s\" using 2:3 with lines' to display.\n"			  "#Use scripts/extractPaths to extract a subset of paths.\n#\n";Visualizer::Visualizer(  const char	*base)     : enabled( false), connectFileOpen( false), cfMaxX( 0.0), cfMaxY( 0.0){  if( base != NULL)  {    int		len = strlen( base);    char	*str = new char[ len + 6 + 1];    strcpy( str, base);    strcpy( str + len, ".nodes");    nodeFile = fopen( str, "w");    if( nodeFile == NULL)      printf( "Unable to open file %s for writing\n", str);    else    {      fprintf( nodeFile, "#use the gnuplot command "	       "'plot \"%s\" using 2:3' to display\n#\n", str);      strcpy( str + len, ".paths");      pathFile = fopen( str, "w");      if( pathFile == NULL)      {	printf( "Unable to open file %s for writing\n", str);	fclose( nodeFile);	nodeFile = NULL;      }      else      {	fprintf( pathFile, intro, str);	strcpy( str + len, ".drops");	dropFile = fopen( str, "w");	if( dropFile == NULL)	{	  printf( "Unable to open file %s for writing\n", str);	  fclose( nodeFile);	  fclose( pathFile);	  nodeFile = NULL;	  pathFile = NULL;	}	else	{	  fprintf( dropFile, intro, str);	  enabled = true;	  baseName = new char[ len + 6 + 1];	// extra room for extension	  if( baseName != NULL)	    strcpy( baseName, base);	}      }    }    delete [] str;  }  return;}Visualizer::~Visualizer(){  if( enabled == true)  {    fclose( nodeFile);    fclose( pathFile);    fclose( dropFile);    if( baseName != NULL)      delete [] baseName;  }  if( connectFileOpen == true)    endConnectFile();  enabled = false;  LocationList::iterator	iter;  for( iter = nodes.begin(); iter != nodes.end(); iter++)  {    delete (*iter).second;    nodes.erase( iter);  }  return;}Visualizer *Visualizer::instantiate(){  return instantiate( NULL);}Visualizer *Visualizer::instantiate(  const char	*baseName){  if( instance == NULL)    instance = new Visualizer( baseName);  return instance;}void Visualizer::nodeLocation(  int	addr,  double	xLoc,  double	yLoc){  if( instance == NULL)  {    printf( "***** Visualizer not instantiated.\n");    assert( instance != NULL);  }  if( enabled == false)    return;  LocationList::iterator	iter;  LocInfo	*li;  iter = nodes.find( addr);  if( iter != nodes.end())  {    delete iter->second;    nodes.erase( iter);  }  li = new LocInfo( xLoc, yLoc);  nodes.insert( make_pair( addr, li));  displayNode( addr, wFNode);  return;}void Visualizer::writePath(  int		src,  int		dest,  int		seqNumber,  Path		path,  bool		atDestination){  if( enabled == false)    return;  int		id;  bool		status;  FILE		*fp = atDestination == true ? pathFile : dropFile;  whichFile	wF = atDestination == true ? wFPath : wFDrop;  fprintf( fp, "\n# src %3d; dest %3d; sn%08X\n", src, dest, seqNumber);  if( displayNode( src, wF) == false)    return;  for( status = path.firstNode( id); status == true;       status = path.nextNode( id))    if( displayNode( id, wF) == false)      break;  if( path.getOverFlow() == true)    fprintf( fp, "888 10000 10000\n***** Path incomplete *****\n");  fprintf( fp, "##\n");  return;}bool Visualizer::displayNode(  int		node,  whichFile	wF){  LocationList::iterator	iter;  FILE		*fp = wF == wFNode ? nodeFile : wF == wFPath ? pathFile : dropFile;    iter = nodes.find( node);  if( iter == nodes.end())  {    fprintf( fp, "********** node %d not in map **********\n", (int) node);    return false;  }  fprintf( fp, "%d %f %f\n", (int) node, iter->second->x, iter->second->y);  return true;}bool Visualizer::startConnectFile(  double	maxX,  double	maxY){  if( enabled == false)    return false;  // constructor allocated enough space to hold file name extension  int		len = strlen( baseName);  strcpy( baseName + len, ".links");  connectFile = fopen( baseName, "w");  baseName[ len] = 0;	// restore baseName  if( connectFile == NULL)    return false;  cfMaxX = maxX;  cfMaxY = maxY;  fprintf( connectFile, "# This file may be used as input for gnuplot, "	   "Version 4.0\n# It provides a graphical representation of the "	   "topology described in the configuration file.\n# Links are "	   "unidirectional unless there are arrow heads at both ends.\n#\n");  return true;}void Visualizer::addConnection(  double	srcX,  double	srcY,  double	destX,  double	destY){  if( enabled == false)    return;  fprintf( connectFile, "set arrow from %f,%f to %f,%f\n", srcX, srcY, destX,	   destY);  return;}void Visualizer::endConnectFile(){  if( enabled == false)    return;  fprintf( connectFile, "plot [0:%f] [0:%f] \"%s.nodes\" using 2:3 with "	   "points lt 3 pt 6 ps 2\n", cfMaxX, cfMaxY, baseName);  fclose( connectFile);  connectFileOpen = false;  return;}/* end file Visualizer.cpp */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲视频1区2区| 国产精品亚洲一区二区三区在线| 亚洲va天堂va国产va久| 国产麻豆精品theporn| 一本久久精品一区二区| 久久一区二区三区国产精品| 亚洲女人的天堂| 激情综合网天天干| 欧美亚洲动漫制服丝袜| 中文字幕精品综合| wwww国产精品欧美| 精品久久久久久久久久久久久久久 | 亚洲图片自拍偷拍| 蜜臀av性久久久久av蜜臀妖精| 国产sm精品调教视频网站| 欧美乱熟臀69xxxxxx| 一区在线观看视频| 国产成人av影院| 337p粉嫩大胆色噜噜噜噜亚洲 | 精品乱人伦小说| 无码av中文一区二区三区桃花岛| 夫妻av一区二区| 欧美成人精品二区三区99精品| 一区二区三区在线免费播放 | 色综合天天综合网国产成人综合天| 精品国产成人在线影院| 午夜日韩在线电影| 欧美艳星brazzers| 亚洲蜜桃精久久久久久久| 成人h版在线观看| 久久久精品影视| 国产精品69久久久久水密桃| 久久久久久久久伊人| 精品一区二区三区在线播放 | 日韩欧美国产精品| 蜜臀av一级做a爰片久久| 欧美日韩亚洲丝袜制服| 亚洲韩国一区二区三区| 欧美艳星brazzers| 亚洲成人av电影| 91精品国产综合久久福利| 亚洲一区精品在线| 欧美日韩一区久久| 日本vs亚洲vs韩国一区三区| 91精品国产综合久久久久久| 日韩不卡一区二区三区 | 亚洲高清中文字幕| 欧美一区三区二区| 卡一卡二国产精品| 久久精品欧美日韩| 成人短视频下载| 一二三区精品福利视频| 欧美美女视频在线观看| 久久精品国产亚洲5555| 欧美韩日一区二区三区| 91蝌蚪国产九色| 日韩综合小视频| 久久久久久9999| 色哟哟国产精品免费观看| 天天爽夜夜爽夜夜爽精品视频| 欧美一二三四在线| 国产福利不卡视频| 依依成人精品视频| 欧美成人艳星乳罩| aa级大片欧美| 午夜精品久久久久久久99樱桃| 精品久久一区二区| 一本久久a久久精品亚洲| 日本美女一区二区| 亚洲日穴在线视频| 日韩欧美中文一区二区| 不卡电影一区二区三区| 亚洲成人精品一区| 国产欧美日韩中文久久| 欧美三级在线播放| 成人在线视频首页| 五月激情六月综合| 中文字幕中文字幕在线一区| 欧美日韩美少妇| 国产不卡在线一区| 美女性感视频久久| 亚洲夂夂婷婷色拍ww47| 久久久不卡网国产精品二区| 日本久久一区二区| 国产成人免费视频| 男人的天堂久久精品| 亚洲色图欧美在线| 国产丝袜美腿一区二区三区| 欧美喷水一区二区| 99久久er热在这里只有精品66| 美女mm1313爽爽久久久蜜臀| 亚洲综合精品自拍| 中文乱码免费一区二区| 91精品国产免费久久综合| 99久久久久久| 国产精品99久| 国产资源精品在线观看| 日本在线不卡一区| 亚洲一区二区三区中文字幕| 国产精品人成在线观看免费| 欧美成人精品1314www| 欧洲色大大久久| 91激情在线视频| 99综合影院在线| 99这里只有精品| 成人白浆超碰人人人人| 国产精品影视在线| 毛片基地黄久久久久久天堂| 日韩中文字幕一区二区三区| 一区二区三区免费| 亚洲精品视频一区二区| 亚洲人成网站影音先锋播放| 国产精品久久久久久妇女6080 | 国产在线视频精品一区| 久久丁香综合五月国产三级网站| 午夜精品久久久久久久久| 亚洲成年人网站在线观看| 亚洲风情在线资源站| 一区二区欧美精品| 一区二区三区国产| 亚洲444eee在线观看| 亚洲精品成人a在线观看| 一区二区三区蜜桃| 亚洲国产成人porn| 日本亚洲三级在线| 精品综合免费视频观看| 老司机午夜精品| 精品亚洲国产成人av制服丝袜| 韩国精品一区二区| 成人午夜大片免费观看| aa级大片欧美| 欧美视频你懂的| 日韩一区二区三区免费看 | 亚洲欧洲综合另类在线| 亚洲免费观看高清完整版在线观看| 国产精品久久久久毛片软件| 成人欧美一区二区三区1314| 伊人开心综合网| 日韩国产精品久久| 国模套图日韩精品一区二区| 国产99精品国产| 色婷婷精品大视频在线蜜桃视频| 欧美日韩免费不卡视频一区二区三区| 欧美一卡二卡三卡四卡| 国产亚洲污的网站| 亚洲精品网站在线观看| 免费久久精品视频| www.亚洲国产| 欧美日韩卡一卡二| 中文字幕的久久| 亚洲va欧美va天堂v国产综合| 久草精品在线观看| 懂色av一区二区夜夜嗨| 欧美亚洲国产一区二区三区va| 日韩三级伦理片妻子的秘密按摩| 国产欧美一区二区三区网站| 一区二区三区国产| 国产东北露脸精品视频| 欧美挠脚心视频网站| 欧美极品少妇xxxxⅹ高跟鞋| 亚洲美女精品一区| 欧美aaaaaa午夜精品| 色先锋aa成人| 久久综合狠狠综合久久激情 | 亚洲1区2区3区4区| 国产成人福利片| 在线综合亚洲欧美在线视频 | 欧美一区二区三区四区五区| 国产精品美女视频| 麻豆传媒一区二区三区| 色婷婷综合久久久中文字幕| 欧美成人精品1314www| 亚洲综合色噜噜狠狠| 国产在线精品不卡| 欧美一区二区久久久| 日韩码欧中文字| 韩国精品一区二区| 欧美精品一二三区| 亚洲欧美日韩系列| 风间由美一区二区av101| 欧美一区二区在线播放| 亚洲美女视频在线| 成人黄色综合网站| 精品国产a毛片| 男男成人高潮片免费网站| 一本到不卡精品视频在线观看| 欧美精品一区二区三区久久久| 亚洲成人av在线电影| 色婷婷综合久久久| 亚洲天天做日日做天天谢日日欢| 精品一区二区在线免费观看| 欧美日韩午夜精品| 亚洲一区在线免费观看| 91丨porny丨户外露出| 国产精品网站在线观看| 国产一区不卡在线| 国产欧美日韩不卡| 国产一区二区剧情av在线| 欧美精品一区二区三区很污很色的 | 中文字幕av在线一区二区三区|