Hi, You need different AMSenderC for each AM type, but you can use the same AMPacket and Packet, because these interfaces receive a pointer to the desired packet and perform the operation on the received data (regardless of the AM type).
Arik On Sun, Mar 14, 2010 at 23:56, Binh Luong <[email protected]> wrote: > > Hi all, > > Normally when we want to send a message we declare our configuration and > module as follows: > > (in configuration) > components new AMSenderC(AM_MSG); > > MyAppC.AMSend -> AMSenderC; > MyAppC.Packet -> AMSenderC; > MyAppC.AMPacket -> AMSenderC; > > (in module) > module MyAppC > { > uses { > ..... > interface Packet; > interface AMPacket; > interface AMSend; > ...... > } > } > > That means for AMSenderC we need to use the 3 interfaces: Packet, AMPacket > and AMSend > > Now my question is: When I have several types of message then I will need > several AMSenderC(s). So do I have to declare for each AMSenderC its own > necessary interfaces Packet, AMPacket and AMSend or can I just use the 3 > interfaces (Packet, AMPacket and AMSend) for all types of messages ? > > Thanks in advance > Regards, > Binh > -- > View this message in context: > http://old.nabble.com/multiple-components-AMSenderC-tp27898445p27898445.html > Sent from the TinyOS - Help mailing list archive at Nabble.com. > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- Best Regards, Arik Sapojnik
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
