No subject
Thu Jun 18 11:58:53 PDT 2009
StorageMap.getPhysicalAddress command. The first error it gives me even says
that "commands and events can only be defined in interfaces". This error
occurs in StorageMap interface definition in $TOSROOT/tos/lib/Deluge !
Can anyone help me out?
Thanks in advance,
Miguel Barroso
--000e0cd23866a1312c046c9fe4b6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi all,<br><br>I'm using Deluge to do over the air programming in <b>mi=
caz</b> devices, but since I want to have different applications on my netw=
ork I have to use the 'Netprog' component in order to do so.<br>
<br>I followed one of Razvan's replies to someone's question saying=
that I should take a look at DelugeManagerP, to see how the component is u=
sed. From what I understood, I need to use the StorageMap.getPhysicalAddres=
s(imgNum) interface to map the image number presented in the flash to the &=
quot;real" flash address.<br>
<br>I have previously generated the VolumeMapC.nc and StorageVolumes.h with=
tos-storage-at45 for the micaz platform.<br><br>I now use (netprog/deluge =
related) the following components:<br><ul><li>components DelugeC;</li><li>
components NetProgC;</li><li>components BlockStorageManagerC;</li></ul>I us=
e the following wiring:<br><ul><li>BlinkClientC.NetProg -> NetProgC;</li=
><li>BlinkClientC.StorageMap -> BlockStorageManagerC;</li></ul>In the co=
mponent definition I define the module as:<br>
<br>module BlinkClientC @safe()<br>{<br>...=A0 <br>=A0 uses interface NetPr=
og;<br>=A0 uses interface StorageMap[uint8_t volumeId];<br>}<br><br>And lat=
er, in the programming logic I use something like:<br><br>if(id =3D=3D TOS_=
NODE_ID){<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 imgNumber =3D imgNum2volumeId(imgNumber);=
<br>=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 call NetProg.programImageAndReboot(call S=
torageMap.getPhysicalAddress[imgNumber](0));<br>=A0=A0=A0 =A0=A0=A0 }<br><b=
r>From what I read I believe this should be enough to get the network to re=
program heterogeneously over the air. (would like some comments on this, pl=
ease)<br>
<br>The thing is: I can't even get it to compile, the compiler gives me=
the following output:<br><br>mkdir -p build/micaz<br>=A0=A0=A0 compiling B=
linkClientAppC to a micaz binary<br>ncc -o build/micaz/main.exe=A0 -Os -fne=
sc-separator=3D__ -Wall -Wshadow -Wnesc-all -target=3Dmicaz -fnesc-cfile=3D=
build/micaz/app.c -board=3Dmicasb -DDEFINED_TOS_AM_GROUP=3D0x22 --param max=
-inline-insns-single=3D100000 -Ibuild/micaz -DDELUGE_BASESTATION -I/opt/tin=
yos-2.x/tos/lib/printf -I/opt/tinyos-2.x/tos/lib/net/Deluge -DPRINTF_BUFFER=
_SIZE=3D250 -DIDENT_APPNAME=3D\"BlinkClientAppC\" -DIDENT_USERNAM=
E=3D\"maique\" -DIDENT_HOSTNAME=3D\"maique-desktop\" -D=
IDENT_USERHASH=3D0x69b400dbL -DIDENT_TIMESTAMP=3D0x4a3a47f2L -DIDENT_UIDHAS=
H=3D0x59d8b188L -DDELUGE -I/opt/tinyos-2.x/tos/lib/net -I/opt/tinyos-2.x/to=
s/lib/net/drip -I/opt/tinyos-2.x/tos/lib/net/Deluge -I/opt/tinyos-2.x/tos/l=
ib/net/Deluge/FlashVolumeManager -I/opt/tinyos-2.x/tos/lib/net/Deluge/Block=
StorageManager -I/opt/tinyos-2.x/tos/lib/net/Deluge/extra -I/opt/tinyos-2.x=
/tos/lib/net/Deluge/extra/avr -I/opt/tinyos-2.x/tos/lib/net/Deluge/extra/mi=
caz -I/opt/tinyos-2.x/tos/lib/net/Deluge/extra/mica2 -fnesc-dump=3Dwiring -=
fnesc-dump=3D'interfaces(!abstract())' -fnesc-dump=3D'reference=
d(interfacedefs, components)' -fnesc-dumpfile=3Dbuild/micaz/wiring-chec=
k.xml BlinkClientAppC.nc -lm <br>
In file included from BlinkClientC.nc:56,<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0 from BlinkClientAppC.nc:46:<br>In interface `StorageMap&=
#39;:<br>/opt/tinyos-2.x/tos/lib/net/Deluge/StorageMap.nc:47: only commands=
and events can be defined in interfaces<br>
/opt/tinyos-2.x/tos/lib/net/Deluge/StorageMap.nc:47: warning: return-type d=
efaults to `int'<br>/opt/tinyos-2.x/tos/lib/net/Deluge/StorageMap.nc:47=
: syntax error before `getPhysicalAddress'<br>In component `BlinkClient=
C':<br>
BlinkClientC.nc: In function `Receive.receive':<br>BlinkClientC.nc:130:=
interface has no command or event named `getPhysicalAddress'<br>
BlinkClientC.nc:130: subscripted value is neither array nor pointer<br>
/opt/tinyos-2.x/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning: #warning &=
quot;*** LOW POWER COMMUNICATIONS DISABLED ***"<br>
In file included from /opt/tinyos-2.x/tos/lib/net/Deluge/BlockStorageManage=
r/BlockStorageManagerC.nc:45,<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 from /opt/tinyos-2.x/tos/l=
ib/net/Deluge/BlockStorageManager/BlockReaderC.nc:45,<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 from /opt/tinyos-2.x/tos/l=
ib/net/Deluge/DelugeC.nc:38,<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 from BlinkClientAppC.nc:48=
:<br>
In component `BlockStorageManagerP':<br>
/opt/tinyos-2.x/tos/lib/net/Deluge/BlockStorageManager/BlockStorageManagerP=
.nc: At top level:<br>
/opt/tinyos-2.x/tos/lib/net/Deluge/BlockStorageManager/BlockStorageManagerP=
.nc:179:
`getPhysicalAddress' is not in interface `StorageMap'<br>
/opt/tinyos-2.x/tos/lib/net/Deluge/BlockStorageManager/BlockStorageManagerP=
.nc:46: `StorageMap.storage_addr_t' not implemented<br>
In file included from /opt/tinyos-2.x/tos/lib/net/Deluge/DelugeC.nc:59,<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 from BlinkClientAppC.nc:48=
:<br>
In component `DelugeP':<br>
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeP.nc: In function `ObjectTransfer.=
receiveDone':<br>
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeP.nc:146: interface has no command=
or event named `getPhysicalAddress'<br>
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeP.nc:146: subscripted value is nei=
ther array nor pointer<br>
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeP.nc: In function `DelugeMetadata.=
readDone':<br>
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeP.nc:159: interface has no command=
or event named `getPhysicalAddress'<br>
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeP.nc:159: subscripted value is nei=
ther array nor pointer<br>
In file included from /opt/tinyos-2.x/tos/lib/net/Deluge/DelugeManagerC.nc:=
40,<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 from /opt/tinyos-2.x/tos/l=
ib/net/Deluge/DelugeC.nc:89,<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 from BlinkClientAppC.nc:48=
:<br>
In component `DelugeManagerP':<br>
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeManagerP.nc: In function `DelayTim=
er.fired':<br>
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeManagerP.nc:116: interface has no =
command or event named `getPhysicalAddress'<br>
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeManagerP.nc:116: subscripted value=
is neither array nor pointer<br>
make: *** [exe0] Error 1<br>
<br><br>From what I see all errors are extremelly related to the StorageMap=
.getPhysicalAddress command. The first error it gives me even says that &qu=
ot;commands and events can only be defined in interfaces". This error =
occurs in StorageMap interface definition in $TOSROOT/tos/lib/Deluge !<br>
<br>Can anyone help me out? <br><br>Thanks in advance,<br><br>Miguel Barros=
o<br><br>
--000e0cd23866a1312c046c9fe4b6--
More information about the Tinyos-help
mailing list