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

📄 rcagent.h

📁 无线传感器网络中,基于ns2仿真平台,mannasim的源代码,研究ns2必不可少的
💻 H
字号:
/************************************************************************* * * This code was developed as part of the MIT SPIN project. (June, 1999) * *************************************************************************/#ifndef ns_rca_h#define ns_rca_h#include "math.h"#include "object.h"#include "agent.h"#include "trace.h"#include "packet.h"#include "priqueue.h"#include "mac.h"#include "random.h"#include "agent.h"#include "app.h"//#include "../../sensorBaseApp.h"#define SAMPLERATE 8000#define ADV 0#define REQ 1#define DATA 2#define RESEND 3class RCAgent : public Agent {public:  RCAgent();  ~RCAgent();  inline void sendmsg(int data_size, const char* meta_data, int destination, int sendto, double dist_to_dest, int code, int packetMsg);  void sendmsg(int data_size, const char* meta_data, int meta_size, int mac_dst, int link_dst, double dist_to_dest, int code, int packetMsg);  virtual void recv(Packet*, Handler*);  void log(const char *msg);  int command(int argc, const char*const* argv);protected:  int packetMsg_;  int packetSize_;  double distEst_;private:  NsObject *ll;            // our link layer object   Mac *mac;    // our MAC layer object  Trace *log_target;  // log targetpublic:  inline Mac * getMAC() { return mac; }};#endif

⌨️ 快捷键说明

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