Hi all,

I'm using Deluge to do over the air programming in *micaz* devices, but
since I want to have different applications on my network I have to use the
'Netprog' component in order to do so.

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 used. From
what I understood, I need to use the StorageMap.getPhysicalAddress(imgNum)
interface to map the image number presented in the flash to the "real" flash
address.

I have previously generated the VolumeMapC.nc and StorageVolumes.h with
tos-storage-at45 for the micaz platform.

I now use (netprog/deluge related) the following components:

   - components DelugeC;
   - components NetProgC;
   - components BlockStorageManagerC;

I use the following wiring:

   - BlinkClientC.NetProg -> NetProgC;
   - BlinkClientC.StorageMap -> BlockStorageManagerC;

In the component definition I define the module as:

module BlinkClientC @safe()
{
...
  uses interface NetProg;
  uses interface StorageMap[uint8_t volumeId];
}

And later, in the programming logic I use something like:

if(id == TOS_NODE_ID){
            imgNumber = imgNum2volumeId(imgNumber);
            call NetProg.programImageAndReboot(call
StorageMap.getPhysicalAddress[imgNumber](0));
        }

>From what I read I believe this should be enough to get the network to
reprogram heterogeneously over the air. (would like some comments on this,
please)

The thing is: I can't even get it to compile, the compiler gives me the
following output:

mkdir -p build/micaz
    compiling BlinkClientAppC to a micaz binary
ncc -o build/micaz/main.exe  -Os -fnesc-separator=__ -Wall -Wshadow
-Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb
-DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=100000
-Ibuild/micaz -DDELUGE_BASESTATION -I/opt/tinyos-2.x/tos/lib/printf
-I/opt/tinyos-2.x/tos/lib/net/Deluge -DPRINTF_BUFFER_SIZE=250
-DIDENT_APPNAME=\"BlinkClientAppC\" -DIDENT_USERNAME=\"maique\"
-DIDENT_HOSTNAME=\"maique-desktop\" -DIDENT_USERHASH=0x69b400dbL
-DIDENT_TIMESTAMP=0x4a3a47f2L -DIDENT_UIDHASH=0x59d8b188L -DDELUGE
-I/opt/tinyos-2.x/tos/lib/net -I/opt/tinyos-2.x/tos/lib/net/drip
-I/opt/tinyos-2.x/tos/lib/net/Deluge
-I/opt/tinyos-2.x/tos/lib/net/Deluge/FlashVolumeManager
-I/opt/tinyos-2.x/tos/lib/net/Deluge/BlockStorageManager
-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/micaz
-I/opt/tinyos-2.x/tos/lib/net/Deluge/extra/mica2 -fnesc-dump=wiring
-fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs,
components)' -fnesc-dumpfile=build/micaz/wiring-check.xml BlinkClientAppC.nc
-lm
In file included from BlinkClientC.nc:56,
                 from BlinkClientAppC.nc:46:
In interface `StorageMap':
/opt/tinyos-2.x/tos/lib/net/Deluge/StorageMap.nc:47: only commands and
events can be defined in interfaces
/opt/tinyos-2.x/tos/lib/net/Deluge/StorageMap.nc:47: warning: return-type
defaults to `int'
/opt/tinyos-2.x/tos/lib/net/Deluge/StorageMap.nc:47: syntax error before
`getPhysicalAddress'
In component `BlinkClientC':
BlinkClientC.nc: In function `Receive.receive':
BlinkClientC.nc:130: interface has no command or event named
`getPhysicalAddress'
BlinkClientC.nc:130: subscripted value is neither array nor pointer
/opt/tinyos-2.x/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning: #warning
"*** LOW POWER COMMUNICATIONS DISABLED ***"
In file included from
/opt/tinyos-2.x/tos/lib/net/Deluge/BlockStorageManager/BlockStorageManagerC.nc:45,
                 from
/opt/tinyos-2.x/tos/lib/net/Deluge/BlockStorageManager/BlockReaderC.nc:45,
                 from /opt/tinyos-2.x/tos/lib/net/Deluge/DelugeC.nc:38,
                 from BlinkClientAppC.nc:48:
In component `BlockStorageManagerP':
/opt/tinyos-2.x/tos/lib/net/Deluge/BlockStorageManager/BlockStorageManagerP.nc:
At top level:
/opt/tinyos-2.x/tos/lib/net/Deluge/BlockStorageManager/BlockStorageManagerP.nc:179:
`getPhysicalAddress' is not in interface `StorageMap'
/opt/tinyos-2.x/tos/lib/net/Deluge/BlockStorageManager/BlockStorageManagerP.nc:46:
`StorageMap.storage_addr_t' not implemented
In file included from /opt/tinyos-2.x/tos/lib/net/Deluge/DelugeC.nc:59,
                 from BlinkClientAppC.nc:48:
In component `DelugeP':
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeP.nc: In function
`ObjectTransfer.receiveDone':
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeP.nc:146: interface has no command
or event named `getPhysicalAddress'
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeP.nc:146: subscripted value is
neither array nor pointer
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeP.nc: In function
`DelugeMetadata.readDone':
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeP.nc:159: interface has no command
or event named `getPhysicalAddress'
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeP.nc:159: subscripted value is
neither array nor pointer
In file included from
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeManagerC.nc:40,
                 from /opt/tinyos-2.x/tos/lib/net/Deluge/DelugeC.nc:89,
                 from BlinkClientAppC.nc:48:
In component `DelugeManagerP':
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeManagerP.nc: In function
`DelayTimer.fired':
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeManagerP.nc:116: interface has no
command or event named `getPhysicalAddress'
/opt/tinyos-2.x/tos/lib/net/Deluge/DelugeManagerP.nc:116: subscripted value
is neither array nor pointer
make: *** [exe0] Error 1


>From what I see all errors are extremelly related to the
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
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to