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

📄 vanetrbc_rxdatadb.h

📁 基于NS-2的车辆Ad Hoc网络(VANET)的一个应用层协议框架
💻 H
字号:
/* ------------------------------------------------------------------- * Vehicular Ad Hoc Networks: Regular Broadcasting of messages. * Skeleton for VANET-protocols. This should be considered as an * example to create other VANET protocols! * Apart from channel load, the "protocol" as it is now does not do * anything useful. * * Dan Jungels (daniel.jungels@epfl.ch) * LCA - EPFL * * * Header file for the ReceiveData-database * Originally written for ns2.29 * * 2005-12-15: release of first version (dj) * 2005-12-23: update and cleanup, public release (dj) * ------------------------------------------------------------------- */#ifndef vanetrbc_rxdatadb_h#define vanetrbc_rxdatadb_h#include <map>#include <trace.h>// this is an example "database", to show you how you can easily// store some data. If you don't need it, simply remove it. If you// need more databases, copy this code, and store it with a different// name (don't forget to update the Makefile in this case).typedef struct rxData {    double tStamp;      // for example we want to store the timestamp,    double xPos;        // and the coordinates (x, y)    double yPos;} rxData_t;// we use a "map": first we store the vanetID, and then the corresponding// rxData-structuretypedef std::map<u_int32_t, rxData_t> rxdatadb_t;class vanetrbc_rxdatadb {    rxdatadb_t rxddb_;public:    // some functions to access or use our "database"     vanetrbc_rxdatadb();    void print(Trace*);    void clear();    void rm_entry(u_int32_t);    void add_entry(u_int32_t, double, double, double);    double lookup(u_int32_t);};#endif

⌨️ 快捷键说明

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