[Tinyos-help] Problem using Netprog for heterogeneous networking
Miguel Barroso
mdbarroso at gmail.com
Thu Jun 18 07:04:58 PDT 2009
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));
}
More information about the Tinyos-help
mailing list