• arash_it
    了解作者
  • tcl/tk
    开发工具
  • 182KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 10 积分
    下载积分
  • 0
    下载次数
  • 2020-07-17 23:02
    上传日期
this is a template for VANET simulation in NS@
VANET.zip
  • ns files
  • gpsr
  • gpsr_rtable.o
    3.6KB
  • gpsr_logs.cc
    3.7KB
  • gpsr_rqueue.cc
    4.9KB
  • gpsr_rtable.cc
    4.3KB
  • gpsr_neighbor.h
    4.4KB
  • gpsr.o
    52.3KB
  • gpsr.h
    4.9KB
  • gpsr_logs.o
    2.2KB
  • gpsr.tcl
    2KB
  • gpsr_neighbor.cc
    9.8KB
  • gpsr_rqueue.o
    9.2KB
  • gpsr.cc
    10.2KB
  • gpsr_neighbor.o
    2.2KB
  • gpsr_packet.h
    4.1KB
  • gpsr_sinklist.cc
    3.4KB
  • gpsr_rtable.h
    4.9KB
  • gpsr_sinklist.o
    3.6KB
  • gpsr_rqueue.h
    3.1KB
  • gpsr_sinklist.h
    2.3KB
  • grua
  • grua_vanet.h
    2.5KB
  • grua_vanet.cc
    17.8KB
  • grua_rtable.cc
    2.5KB
  • BroadcastbaseAgent.o
    2.3KB
  • grua_rtable.o
    3.6KB
  • grua_logs.cc
    2KB
  • grua_rqueue.h
    1.4KB
  • grua_rqueue.cc
    3.1KB
  • bbcast-packet.h
    1.9KB
  • grua_logs.o
    2.2KB
  • grua.cc
    8.8KB
  • grua.tcl
    2.4KB
  • bbcast_const.h
    229B
  • BroadcastbaseApp.h
    4KB
  • BroadcastbaseAgent.cc
    1.9KB
  • BroadcastbaseAgent.h
    407B
  • grua_vanet.o
    3.6KB
  • grua.o
    54.9KB
  • grua_packet.h
    4.5KB
  • BroadcastbaseApp.cc
    14.3KB
  • grua_rqueue.o
    9.2KB
  • BroadcastbaseApp.o
    2.3KB
  • grua_rtable.h
    3.2KB
  • bbcast-packet.cc
    1.5KB
  • grua.h
    3KB
  • bbcast-packet.o
    2.3KB
  • priqueue.cc
    4.8KB
  • trace-all-vanet.awk
    10.6KB
  • ns-agent.tcl
    5.3KB
  • ns-lib.tcl
    60.9KB
  • dsr-priqueue.cc
    7.3KB
  • ns-mobilenode.tcl
    21.8KB
  • proposed-method.tcl
    8.5KB
  • dsr-priqueue.h
    3.8KB
  • packet.h
    17.2KB
  • priqueue.h
    3.1KB
  • cmu-trace.h
    5.1KB
  • ns-default.tcl
    45.8KB
  • Makefile
    18.4KB
  • cmu-trace.cc
    37.5KB
内容介绍
/* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */ /* * Copyright (c) 1997 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the Computer Systems * Engineering Group at Lawrence Berkeley Laboratory. * 4. Neither the name of the University nor of the Laboratory may be used * to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#) $Header: /nfs/jade/vint/CVSROOT/ns-2/common/packet.h,v 1.98 2005/09/18 23:33:31 tomh Exp $ (LBL) */ #ifndef ns_packet_h #define ns_packet_h #include <string.h> #include <assert.h rel='nofollow' onclick='return false;'> #include "config.h" #include "scheduler.h" #include "object.h" #include "lib/bsd-list.h" #include "packet-stamp.h" #include "ns-process.h" // Used by wireless routing code to attach routing agent #define RT_PORT 255 /* port that all route msgs are sent to */ #define HDR_CMN(p) (hdr_cmn::access(p)) #define HDR_ARP(p) (hdr_arp::access(p)) #define HDR_MAC(p) (hdr_mac::access(p)) #define HDR_MAC802_11(p) ((hdr_mac802_11 *)hdr_mac::access(p)) #define HDR_MAC_TDMA(p) ((hdr_mac_tdma *)hdr_mac::access(p)) #define HDR_SMAC(p) ((hdr_smac *)hdr_mac::access(p)) #define HDR_LL(p) (hdr_ll::access(p)) #define HDR_HDLC(p) ((hdr_hdlc *)hdr_ll::access(p)) #define HDR_IP(p) (hdr_ip::access(p)) #define HDR_RTP(p) (hdr_rtp::access(p)) #define HDR_TCP(p) (hdr_tcp::access(p)) #define HDR_SCTP(p) (hdr_sctp::access(p)) #define HDR_SR(p) (hdr_sr::access(p)) #define HDR_TFRC(p) (hdr_tfrc::access(p)) #define HDR_TORA(p) (hdr_tora::access(p)) #define HDR_IMEP(p) (hdr_imep::access(p)) #define HDR_CDIFF(p) (hdr_cdiff::access(p)) /* chalermak's diffusion*/ //#define HDR_DIFF(p) (hdr_diff::access(p)) /* SCADD's diffusion ported into ns */ #define HDR_LMS(p) (hdr_lms::access(p)) /* --------------------------------------------------------------------*/ enum packet_t { PT_TCP, PT_UDP, PT_CBR, PT_AUDIO, PT_VIDEO, PT_ACK, PT_START, PT_STOP, PT_PRUNE, PT_GRAFT, PT_GRAFTACK, PT_JOIN, PT_ASSERT, PT_MESSAGE, PT_RTCP, PT_RTP, PT_RTPROTO_DV, PT_CtrMcast_Encap, PT_CtrMcast_Decap, PT_SRM, /* simple signalling messages */ PT_REQUEST, PT_ACCEPT, PT_CONFIRM, PT_TEARDOWN, PT_LIVE, // packet from live network PT_REJECT, PT_TELNET, // not needed: telnet use TCP PT_FTP, PT_PARETO, PT_EXP, PT_INVAL, PT_HTTP, /* new encapsulator */ PT_ENCAPSULATED, PT_MFTP, /* CMU/Monarch's extnsions */ PT_ARP, PT_MAC, PT_TORA, PT_DSR, PT_GRUA, PT_IMEP, // RAP packets PT_RAP_DATA, PT_RAP_ACK, PT_TFRC, PT_TFRC_ACK, PT_PING, // Diffusion packets - Chalermek PT_DIFF, // LinkState routing update packets PT_RTPROTO_LS, // MPLS LDP header PT_LDP, // GAF packet PT_GAF, // ReadAudio traffic PT_REALAUDIO, // Pushback Messages PT_PUSHBACK, #ifdef HAVE_STL // Pragmatic General Multicast PT_PGM, #endif //STL // LMS packets PT_LMS, PT_LMS_SETUP, PT_SCTP, PT_SCTP_APP1, // SMAC packet PT_SMAC, // XCP packet PT_XCP, // HDLC packet PT_HDLC, // insert new packet types here PT_NTYPE // This MUST be the LAST one }; class p_info { public: p_info() { name_[PT_TCP]= "tcp"; name_[PT_UDP]= "udp"; name_[PT_CBR]= "cbr"; name_[PT_AUDIO]= "audio"; name_[PT_VIDEO]= "video"; name_[PT_ACK]= "ack"; name_[PT_START]= "start"; name_[PT_STOP]= "stop"; name_[PT_PRUNE]= "prune"; name_[PT_GRAFT]= "graft"; name_[PT_GRAFTACK]= "graftAck"; name_[PT_JOIN]= "join"; name_[PT_ASSERT]= "assert"; name_[PT_MESSAGE]= "message"; name_[PT_RTCP]= "rtcp"; name_[PT_RTP]= "rtp"; name_[PT_RTPROTO_DV]= "rtProtoDV"; name_[PT_CtrMcast_Encap]= "CtrMcast_Encap"; name_[PT_CtrMcast_Decap]= "CtrMcast_Decap"; name_[PT_SRM]= "SRM"; name_[PT_REQUEST]= "sa_req"; name_[PT_ACCEPT]= "sa_accept"; name_[PT_CONFIRM]= "sa_conf"; name_[PT_TEARDOWN]= "sa_teardown"; name_[PT_LIVE]= "live"; name_[PT_REJECT]= "sa_reject"; name_[PT_TELNET]= "telnet"; name_[PT_FTP]= "ftp"; name_[PT_PARETO]= "pareto"; name_[PT_EXP]= "exp"; name_[PT_INVAL]= "httpInval"; name_[PT_HTTP]= "http"; name_[PT_ENCAPSULATED]= "encap"; name_[PT_MFTP]= "mftp"; name_[PT_ARP]= "ARP"; name_[PT_MAC]= "MAC"; name_[PT_TORA]= "TORA"; name_[PT_DSR]= "DSR"; name_[PT_GRUA]= "GRUA"; name_[PT_IMEP]= "IMEP"; name_[PT_RAP_DATA] = "rap_data"; name_[PT_RAP_ACK] = "rap_ack"; name_[PT_TFRC]= "tcpFriend"; name_[PT_TFRC_ACK]= "tcpFriendCtl"; name_[PT_PING]="ping"; /* For diffusion : Chalermek */ name_[PT_DIFF] = "diffusion"; // Link state routing updates name_[PT_RTPROTO_LS] = "rtProtoLS"; // MPLS LDP packets name_[PT_LDP] = "LDP"; // for GAF name_[PT_GAF] = "gaf"; // RealAudio packets name_[PT_REALAUDIO] = "ra"; //pushback name_[PT_PUSHBACK] = "pushback"; #ifdef HAVE_STL // for PGM name_[PT_PGM] = "PGM"; #endif //STL // LMS entries name_[PT_LMS]="LMS"; name_[PT_LMS_SETUP]="LMS_SETUP"; name_[PT_SCTP]= "sctp"; name_[PT_SCTP_APP1] = "sctp_app1"; // smac name_[PT_SMAC]="smac"; // HDLC name_[PT_HDLC]="HDLC"; // XCP name_[PT_XCP]="xcp"; name_[PT_NTYPE]= "undefined"; } const char* name(packet_t p) const { if ( p <= PT_NTYPE ) return name_[p]; return 0; } static bool data_packet(packet_t type) { return ( (type) == PT_TCP || \ (type) == PT_TELNET || \ (type) == PT_CBR || \ (type) == PT_AUDIO || \ (type) == PT_VIDEO || \ (type) == PT_ACK || \ (type) == PT_SCTP || \ (type) == PT_SCTP_APP1 || \ (type) == PT_HDLC \ ); } private: static char* name_[PT_NTYPE+1]; }; extern p_info packet_info; /* map PT_* to string name */ //extern char* p_info::name_[]; #define DATA_PACKET(type) ( (type) == PT_TCP || \ (type) == PT_TELNET || \ (type) == PT_CBR || \ (type) == PT_AUDIO || \ (type) == PT_VIDEO || \ (type) == PT_ACK || \ (type) == PT_SCTP || \ (type) == PT_SCTP_APP1 \ ) #define OFFSET(type, field) ((long) &((type *)0)->field) class PacketData : public AppData { public: PacketData(int sz) : AppData(PACKET_DATA) { datalen_ = sz; if (datalen_ > 0) data_ = new unsigned char[datalen_]; else data_ = NULL; } PacketData(PacketData& d) : AppData(d) { datalen_ = d.datalen_;
评论
    相关推荐
    • VANET1.zip
      CONEXION VANET EXAMPLE VANET
    • SIM800C_MQTT.rar
      使用SIM800C模块,使用MQTT协议,连接中国移动onenet平台,能实现数据的订阅、发布、存储等
    • 卷积神经网络
      这是卷积神经网络的一个实际用例,已经调试好了,能够在matlab上成功运行,适合从事卷积神经网络(CNN)研究的人员学习使用。
    • android从bootloader到launcher启动流程整理
      讲述android 开机流程 从boot rom---bootloader---init--zygote---systemserver---ams 并附上自己整理的每个流程的流程图 ,清晰熟悉android 启动流程
    • matlabpam代码-dsp-library:用于光通信的MATLABDSP函数库
      matlab pam代码 DSP库 该项目包含几种不同的功能,可将DSP算法应用于光通信。 这些功能适用于相干和非相干(PAM,DMT)光通信。 大多数功能是相互独立的。 因此,该代码中的功能可以轻松使用,并与其他DSP功能结合使用。 用法 功能列表以及简短说明在文件中。 输入和输出参数的描述在每个函数的标题中。 讯号 通常,输入(和输出)信号在第一维度上具有时间(例如,列向量),而第二维度用于一次管理多个信号(例如,不同的极化,不同的参数等)。 之所以选择这种约定,是因为MATLAB通过将列保留在内存的连续部分中来存储矩阵,因此,这种约定比其他方法(行向量)要快。 参数 大多数功能使用参数结构作为输入参数。 函数中使用的参数的描述通常在标头中,而coherent-dsp函数的默认参数在文件中。 参考 执照 此代码在下发布。
    • 有关多目标跟踪的PHD滤波的一些资料
      一些关于多目标跟踪的新的文献,主要是有关概率假设密度(PHD)的
    • 基于python开发的全国新工商采集工具 v1.2版本
      这个软件是通过scrapy爬虫框架结合代理IP池再加上request模拟请求技术以及验证码识别技术,可以做到日更新采集全国新工商信息。采集的数据自动存储在mysql数据库表里,可下载全量1.8亿多企业工商基本信息和36维度的详细信息.支持sql和excel导出数据包格式。
    • matlab匹配滤波代码-matlab_for_thesis:Matlab博士学位论文代码
      matlab匹配滤波代码博士论文的MATLAB代码 博士论文的MATLAB代码的一部分,“井田双色散水下声通道中的多载波通信”。 函数下的func_JingTian文件夹 FUNC_JINGTIAN包含多载波通信中一些通常需要的功能: OFDM调制/解调模块,包括几种数据辅助的信道估计方法和差分解调; 快速实现GFDM和C-FBMC调制/解调,分别包括时域和频域的迫零(ZF)和匹配滤波(MF)均衡; 为OFDM信道估计中使用的压缩感测方法计算字典的功能; 增加信道效应,施加宽带多普勒失真的功能; 通过线性调频Z变换(CZT)以任意精度对频域中的信号进行重采样; Hermite函数合成的信号之间的交叉歧义函数的计算。 演示文件夹 以下列出了四个演示 demo1:使用基本追踪(BP)算法形式的压缩感知方法对OFDM进行稀疏2-D信道估计; demo2:比较基本数据辅助OFDM信道估计算法,包括常规频域插值和基于IDFT的变换域方法; demo3:圆形滤波器组多载波(C-FBMC / OQAM)的基于DFT特征向量的原型滤波器合成; demo4:用于广义频分复用(GFDM)的辅助日期辅助无干
    • Aerosim Blockset
      The AeroSim aeronautical simulation blockset provides a complete set of tools for the rapid development of nonlinear 6-degree of freedom aircraft dynamic models. In addition to the basic aircraft dynamics blocks, the library also includes complete aircraft models which can be customized through parameter files.
    • OFDM的MATLAB仿真
      1.使用Matlab实现一个OFDM系统。 OFDM系统具体参数参照LTE标准,具体为: 系统带宽:5MHz; OFDM符号长度:0.0714ms; 子载波间隔:15kHz; CP长度:OFDM符号长度的7 ; FFT点数:512; 2.选择一种降低OFDM系统峰均比的算法,在1的基础上实现,并分析其性能。