[Tinyos-help] Modifying XMeshBase

Lei Mlapom lmuguira at yahoo.es
Mon Feb 25 08:42:38 PST 2008


Hi;
I am working with micaz platform. I have a remote note transmiting and the base station is loaded with the XMeshBaseM.nc code. 
The remote transmits correctly to the base station, but then, I want to transmit a message from the base to the remote and I dont know where I have to insert this.

When the base station receives a message what happens in the base station? I don`t see any event. 

I want to know in which part of XMeshBase.nc the base receives a message, to modify it and transmit my message to the base.

Code:

module XMeshBaseM {
    provides {
    interface StdControl;
    }
    uses {
    interface RouteControl;
    interface XCommand;
    interface Leds;
    }
}

implementation {
      command result_t StdControl.init() {
      call Leds.init();
      atomic{ TOS_LOCAL_ADDRESS = 0; }
      return SUCCESS;
  }
  command result_t StdControl.start(){
      return SUCCESS;
  }
  command result_t StdControl.stop() {
      return SUCCESS;
  }
  event result_t XCommand.received(XCommandOp *opcode) {

      switch (opcode->cmd) {
      case XCOMMAND_SET_RATE:
          break;
      case XCOMMAND_SLEEP:
            break;
      case XCOMMAND_WAKEUP:
            break;
      case XCOMMAND_RESET:
            break;
      default:
           break;
      }
      return SUCCESS;
  }  
}




       
______________________________________________ 
¿Con Mascota por primera vez? Sé un mejor Amigo. Entra en Yahoo! Respuestas http://es.answers.yahoo.com/info/welcome
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20080225/243011cc/attachment.html


More information about the Tinyos-help mailing list