anycast.nc
来自「主要用于无线传感网络的编写的书籍.对于初学者有着很大的用处」· NC 代码 · 共 37 行
NC
37 行
/* Anycast wiring components. *//* Written by Kin Sun Ho (ksho@cse) *//* Last Modified: 25 July 2005 */includes Sasha;configuration Anycast { provides interface Anycastlib;}implementation{ components Main, AnycastM, TimerC, LedsC, GenericComm as Comm, CLNN; /* Components that uses StdControl */ Main.StdControl -> AnycastM; Main.StdControl -> TimerC; /* Components that AnycastM uses */ AnycastM.Table_Timer -> TimerC.Timer[unique("Timer")]; AnycastM.Sleep_Timer -> TimerC.Timer[unique("Timer")]; AnycastM.Sensor_Timer -> TimerC.Timer[unique("Timer")]; AnycastM.Leds -> LedsC; /* Communication */ AnycastM.CommControl -> Comm; AnycastM.ReceiveMsg -> Comm.ReceiveMsg[ANYCAST]; AnycastM.SendMsg -> Comm.SendMsg[ANYCAST]; /* CLNN */ AnycastM.CLNNControl -> CLNN; AnycastM.CLNNlib -> CLNN; // who provide the implementation of library Anycastlib = AnycastM;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?