Hi,

 

I  have following questions concerning the parameterized interfaces:

 

1)      In case of the scenario when I have two packets X and Z  with
corresponding identifiers MSG_X and MSG_Z. 

To send them both I need to declare two separate components in configuration
file?

 AMSenderC(MSG_X) as SenderX;

 AMSenderC(MSG_Z) as SenderZ;

 

App. SendX ->SenderX;

App.SendZ  -> SenderZ;

 

  and use each of them to send the corresponding packet or can I use single
parameterized interface:

 

 uses interface AMSend as  Sender [am_id id];  

 

wired to: ActiveMessageC.AMSend; 

 

 and then use this interface to send appropriate packet by e.g.:

 

 call Sender.send[MSG_X]() or call Sender.send[MSG_Z] ()

 

So the relevant receive event (for each message) will be signaled ?

 

2)      If I change the packet type with use of the command:

 

call AMPacket.setType(msg,MSG_Z)

 

 type of the message X to Z and send once more msg,  will this message be
received by the ReceiverC(MSG_Z) ?

 

3)      If I use the:

New component AMSenderC(MSG_X);

App.AMPacket-> AMSenderC;

 

And with wired in such a way AMPacket interface, I will manipulate with the
header fields (e.g. destination) of the packet Z will it change the type to
X  as well?

 

 

Thank you in advance for your help,

TK

 

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to