Hi all,
I am working on an application for a CTP network for mica2 motes. I want the
source nodes to get data through UART port of the mote, and the sink node to
send the radio messages it received  to PC through the uart port, too. And I
want to the application work for both the source and the sink nodes. The
source node has to use the UartStream interface provided by PlatformSerialC
to send and receive bytes, and the sink node uses SerialAMSenderC and
SerialAMReceiverC to exchange data with PC.

I declared the components as:
components PmctpC, MainC, LedsC, ActiveMessageC;//PmctpC is the main
component of the application,it read sensor, send and forward

     // message for the source and exchange  data with PC for the sink

  components DisseminationC;
  components new DisseminatorC(uint16_t, SAMPLE_RATE_KEY) as Object16C;
  components PMdemoC;                                                //this
is a sensor component from which the source node gets data
  components PlatformSerialC;
  components CollectionC as Collector;
  components new CollectionSenderC(AM_MSG) as PMSend;

  components new SerialAMSenderC(AM_MSG);
  components new SerialAMReceiverC(AM_MSG);
  components SerialActiveMessageC;

and wired as:

  PmctpC.UARTReceive -> SerialAMReceiverC.Receive;
  PmctpC.UARTSend -> SerialAMSenderC.AMSend;
  PmctpC.Read->PMdemoC.Read;
  PMdemoC.UartStream->PlatformSerialC.UartStream;

I compiled the application and there was no error or warning about the
Serial. The source will only use the PlatformSerialC  and the sink will only
use the SerialAM** parts. But I notice that the SerialActiveMessageC is
wired to PlatformSerialC, so having both of them is  kind of weird ,will
there be any potential problem?


Thanks,
and Best Regards,



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

Reply via email to