xxx module.nc
module xxx{
provides interface StdControl;
use interface ReceiveMsg as ReceiveIntMsg;
}
implementation{
task void dataTask(){
}
event TOS_MsgPtr ReceiveIntMsg.receive(TOS_MsgPtr m) {
IntMsg *message = (IntMsg *)m->data;
post dataTask();
return m;
}
}
==========组件与配件分割线======================
xxx configration.nc
configration xxx{
}
implementation {
components Main,GenericComm;
Main.StdControl -> GenericComm;
RfmToUartM.ReceiveIntMsg->GenericComm.ReceiveMsg[AM_INTMSG];
}