XMeshBase already supports downstream communication via XCommand interface. You may send commands out to the network using XServe>XCmd. Please refer to the XServe manual below. http://www.xbow.com/Support/Support_pdf_files/XServe_Users_Manual.pdf All the XMesh apps (including XMeshBase support these). Simple examples are actuating a LED or changing the data rate. If you want to add your own commands, you would need to implement them both in the XMesh app that runs on your sensor nodes as well as in XServe that sends them out. Regards, Giri
________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lei Mlapom Sent: Monday, February 25, 2008 8:43 AM To: tinyos-help@millennium.berkeley.edu Subject: [Tinyos-help] Modifying XMeshBase 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.rd.yahoo.com/evt:51361/*http://es.answers.yahoo.com/dir/index;_ylc=X3oDMTE4ZWhyZjU0BF9TAzIxMTQ3MTQzMjIEc2VjA0Jhbm5lcgRzbGsDQWNxdWlzaXRpb24-?link=over&sid=XXXXXXXX> .
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help