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

📄 mhleachrouter.nc

📁 Tinyos LEACH protocol modify
💻 NC
字号:
/*
* MHLeachRouter.nc - The configuration for the LEACH router
*
* @author Geoff Martin
* @date 18th April 2004
* @version 1.0
*/
includes MH;
configuration MHLeachRouter
{
	provides
	{
		interface StdControl;
		interface Send[uint8_t id];
	}
	uses
	{
		interface ReceiveMsg[uint8_t id];
	}
}
implementation
{
	components MHEngineM, MHLeachPSC, GenericComm as MHComm, QueuedSend as MHQueuedSend,
	LedsC;

	StdControl = MHEngineM.StdControl;
	Send = MHEngineM.Send;
	ReceiveMsg = MHEngineM.ReceiveMsg;
	
	MHEngineM.QStdControl -> MHQueuedSend.StdControl;
	MHEngineM.PSMStdControl -> MHLeachPSC.StdControl;
	MHEngineM.CommStdControl -> MHComm.Control;
/*  #ifdef SIM
	MHEngineM.SimTimer -> TimerC.Timer[unique("Timer")];
	#endif
*/
	MHEngineM.SendMsg -> MHQueuedSend.SendMsg;
	MHEngineM.RouteSelect -> MHLeachPSC.RouteSelect;
	MHEngineM.Leds -> LedsC.Leds;
	MHEngineM.ReceiveMsg[AM_TEMPMONMSG] -> MHComm.ReceiveMsg[AM_TEMPMONMSG];
}

⌨️ 快捷键说明

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