Hi
   I am a student in ICTCAS(China).I encountered a problem when I uploading the 
apps/SimpleCmd and I am at a loss so please help me.
   in file apps/SimpleCmd/SimpleCmd.nc , line 53(more or less),the code is as 
follows:
     SimpleCmdM.ReceiveCmdMsg -> Comm.ReceiveMsg[AM_SIMPLECMDMSG]; 
   My problem is about the enum variable AM_SIMPLECMDMSG,it is defined in the
file apps/SimpleCmd/SimpleCmdMsg.h in the line 41 (more or less),code like:
       enum {
             AM_SIMPLECMDMSG = 8,
             AM_LOGMSG=9
             };
    So, if no modification is done , the application runs well, like the 
lessesons 6 say,if "java net.tinyos.tools.BcastInject led_on" typed in the 
cygwin, the node will lighten the yellow led.
     Now I have 3 actions
   1.change code 
          SimpleCmdM.ReceiveCmdMsg -> Comm.ReceiveMsg[AM_SIMPLECMDMSG]; 
     to code
          SimpleCmdM.ReceiveCmdMsg -> Comm.ReceiveMsg[8];
     then run the application , it goes smoothly.
   2.forget action1,change code
           SimpleCmdM.ReceiveCmdMsg -> Comm.ReceiveMsg[AM_SIMPLECMDMSG];
     to code
           SimpleCmdM.ReceiveCmdMsg -> Comm.ReceiveMsg[20];
     then the yellow led does not turn on if a send cmd with java.
   3.forget 1 and 2,change code
            enum {
             AM_SIMPLECMDMSG = 8,
             AM_LOGMSG=9             
              };
     to code
           enum {
             AM_SIMPLECMDMSG = 10,
             AM_LOGMSG=11
             };
      then the yellow leds failed to turn on again.
 
Anyone can help me ??This problems had trbouled me serveral days and I can not 
go on my work.So,Thanks and expecting your reply
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to