On Mon, Feb 18, 2008 at 4:23 AM, Flavio Pompermaier <[EMAIL PROTECTED]> wrote: > Hi to all, > I have a question about the collection interface. > Collection assumes that only sources are interested in sending data, whereas > root are interested in receiving data. However, it could be that in direct > diffusion I would like to inform also application when messages for tree > construction (send by the roots) are received. How can I get around this in > EasyCollection for example? > Should I do something like > > new CollectionSenderC(BUILD) as BuildSender; > new CollectionSenderC(DATA) as DataSender; > EasyCollectionC.SendData->DataSender; > EasyCollectionC.SendBuild->BuildSender; > EasyCollection.ReceiveData->Collector.Receive[BUILD]; > EasyCollection.ReceiveBuild->Collector.Receive[DATA]; > or just > new CollectionSenderC(DATA); > EasyCollectionC.Send->CollectionSenderC; > EasyCollection.Receive->Collector.Receive[DATA]; > but how can EasyCollection.ReceiveBuild be advertised?? > In the firts solution it looks bad because sender is the routing layer, > and moreover collection_id it is used to distinguish between application > data...do I have to intend sink messages as a different collection_id?? > > Please help! > Flavio >
Diffusion is a reactive protocol so you might want to look into TYMO (tos/lib/net/tymo) which you might be able to modify to make it look like diffusion. Collection is a poor match for what you seem to want to do. - om_p _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
