📄 bse-agent.h
字号:
/************************************************** * File: bse-agent.h Author: Suman Banerjee <suman@cs.umd.edu> Date: July 31, 2001 Terms: GPL UNI implementation in myns This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * **************************************************/#ifndef _BSE_AGENT_H_#define _BSE_AGENT_H_#include <agent.h>#include <timer.h>#include "app-packet.h"#include "uninode.h"class bseAgent;class RefreshTimer : public Timer {public: bseAgent *ba; RefreshTimer (void) : Timer () { ba = NULL;}; RefreshTimer (bseAgent * BA) : Timer () { ba = BA;}; void EventHandler(void);};struct BseAgentInfo { AgentInfo ag; bool refresh; BseAgentInfo (int aid, int nid) { ag.agent_id = aid; ag.node_id = nid; refresh = true; }};class bseAgent : public Agent {private : RefreshTimer rt;public : LinkedList <BseAgentInfo *, int> m_member_list; LinkedList <BseAgentInfo *, int> m_source_list; // agent id and node id are in the agent class bseAgent (void); void start (void); void init (int Id, int Index, Node *N); void specific_rx_pkt_handler (Packet *p); void handle_refresh_timeout (void);private : void handle_join (AppPacket * ap); void handle_source (AppPacket * ap); void send_group_update_to_source (int aid, int nid);};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -