mhleachrouter.nc

来自「Tinyos LEACH protocol modify」· NC 代码 · 共 43 行

NC
43
字号
/*
* 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 + =
减小字号Ctrl + -
显示快捷键?