Hi all,
i am trying to implement an application that uses multihopping(I'm using Surge,
as it is in examples). I execute the application with this command line
/surge/build/pc/main.exe -gui 7 & tinyviz
first of all i enable SetLocation plugin on tinyviz, then i move motes clicking
and dragging on them (in tinyviz appears the right output). i enable RadioModel
plugin and i set distance scaling factor to 5.0, so all motes can't send or
receive messages.
But if i press the "play" button every mote communicates with other motes!!!
I read some posts, which talks about FakeLocation, that "Provides a "fake"
location value to motes based on reading three ADC values for X, Y, and Z
coordinates. The TinyViz LocationPlugin sets these values to represent the
location of the mote in the display."
i have put FakeLocation, FakeLocationM, FakeLocation.h, Location and Location.h
in my application and i have added these following lines in Surge and SurgeM
------------------------------------
Surge.nc
includes FakeLocation
....
components ...FakeLocationM...
....
Main.StdControl ->FakeLocationM;
....
FakeLocationM.ADC_X->ADCC.ADC[FAKE_LOCATION_X_PORT];
FakeLocationM.ADC_Y->ADCC.ADC[FAKE_LOCATION_Y_PORT];
FakeLocationM.ADC_Z->ADCC.ADC[FAKE_LOCATION_Z_PORT];
....
SurgeM.Location->FakeLocationM.Location;
....
--------------------------------------------------------------
SurgeM.nc
....
uses{
...
interface Location;
...
}
....
command result_t StdControl.start() {
call Location.getLocation();
.....
}
....
event void Location.locationDone(location_3d_t *loc){
...
}
....
------------------------------------------------------------
now, if i execute the application like i have written above,every mote
communicates with other motes!!!!
my questions are:
- have i to wire FakeLocation in Surge (and use FakeLocation as i'm doing) or
have i simply to put FakeLocation etc in my application without wiring them in
Surge?
- why doesn't FakeLocation interact with SetLocation plugin in Tinyviz?even if
i put
command result_t StdControl.start() {
//call Location.getLocation();
getLocation is never called by SetLocation!!(and i have understood that
SetLocation interacts with FakeLocation, so it has to call getLocation)
-why doesn't multihop works????????(all messages are sent directly to node 0,
even if it's not (physically) possible because mote 0 and mote n are too far)
thanks for help
Antonio
---------------------------------
---------------------------------
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help