On Thu, June 14, 2007 2:41 pm, projet19 projet19 said:
> We have done a nesC application capable of  sending  multiple custom
messages ( MoteAppMsg,  PositionMsg,  ThresholdMsg) that are defined in a
header file like that :
> ***************************************************************************

> ***************************************************************************
We did all MIG for all custom messages successfully,
>
> but it appears that when we send a MoteAppMsg with the line "call
Send.send(pMsgBuf,sizeof(struct MoteAppMsg))" to our computer Application,
the nesC program always send all types of messages...

>*******************************************************************
>Mote_AppM.Send -> multihopM.Send[AM_MOTEAPPMSG];
>
>  Mote_AppM.Send -> multihopM.Send[AM_POSITIONMSG];
>
>  Mote_AppM.Send -> multihopM.Send[AM_THRESHOLDMSG];
>********************************************************************

> So how can we modify nesC Application that when we send a MoteAppMsg, the
nesC
> Code send only a MoteAppMsg, and when we send a PositionMsg, the nesC Code
only
> send a PositionMsg ?
>
> Or, can anybody explain us a simple nesC application which utilise
multiple
> Custom Message ?

You have wired all your sends together. Try:
  Mote_AppM.SendApp       -> multihopM.Send[AM_MOTEAPPMSG];
  Mote_AppM.SendPosition  -> multihopM.Send[AM_POSITIONMSG];
  Mote_AppM.SendThreshold -> multihopM.Send[AM_THRESHOLDMSG];

Your going to have to add an interface for each:
  uses interface Send as SendApp
and call each separately. Your receives may have to be altered to fit the
pattern also. Do not worry, wiring is one of the most difficult new concepts
in NesC.

-Ben


-- 
The difference between the right word and the almost right word is really a
large matter- it's the difference between a lightning bug and the lightning.
-Twain




_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to