rcagent.h

来自「无线传感器网络中,LEACH路由协议在NS-2仿真环境的下实现的源代码」· C头文件 代码 · 共 56 行

H
56
字号
/************************************************************************* * * 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"#define SAMPLERATE 8000#define ADV 0#define REQ 1#define DATA 2#define RESEND 3class RCAgent : public Agent {public:  RCAgent();  ~RCAgent();  void sendmsg(int data_size, const char* meta_data, int destination,                int sendto, double dist_to_dest, int code);  void recv(Packet*, Handler*);//  void log(const char *msg);  int command(int argc, const char*const* argv);protected:  int packetMsg_;  int packetSize_;  int distEst_;private:  NsObject *ll;            // our link layer object   Mac *mac;    // our MAC layer object  Trace *log_target;  // log target};#endif

⌨️ 快捷键说明

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