Hello Friends . ,
I have included Omprakash Gnawali as i have seen him answering most of the
answers related to CTP .

I am working on one program , in which i need some motes to have both
multihop and single hop instances together . Basically multihop protocol is
for data acquisition and its data flow is from sensor nodes to base node.
And AMsenderC instance is bidirectional which originates from base , and
does kind of manual multihop . with the help of if condition and again send
the same to respective mote.

Now the problem is arising in some motes where CollectionSenderC and
AMsenderC are working together . (Problem did not came for the one where
Receive and CollectionSenderC was there .. )

Now some part of my program ..

  Status_MoteAppC.nc (not whole but only required field)
_______________________________________________________________

        components CollectionC as Collector;  // Collection layer
     components ActiveMessageC;                       // AM layer
     components new CollectionSenderC(MHOP_WIRELESSMON); // Sends multihop
RF
     components new AMSenderC(AM_RADIO_SENSOR);
   components new AMReceiverC(AM_RADIO_STATUS);

        App.MhopSend -> CollectionSenderC.Send;
   App.SnoopMsg -> Collector.Intercept[MHOP_WIRELESSMON];
   App.RoutingControl -> Collector;
   App.RadioControl -> ActiveMessageC;
App.RootControl -> Collector;
App.ResetSend -> AMSenderC.AMSend;
   App.ResetReceive -> AMReceiverC.Receive;
   App.Packet -> AMSenderC;
-----------------------------------------------------------------------------------------------------------------------

Status_MoteC.nc (only required part)

         uses interface Send as MhopSend;
         uses interface CollectionPacket;
   uses interface RootControl;
   uses interface SplitControl as RadioControl;
   uses interface StdControl as RoutingControl;
   uses interface Receive as ResetReceive;
     uses interface Send as ResetSend;
     uses interface Packet;


event message_t* ResetReceive.receive(message_t* ResBuf ,void* payload,
uint8_t len)
{
if (len != sizeof(ResetMesg_t))
{
return ResBuf;
}
else
{
       ResetMesg_t* Res = (ResetMesg_t*)payload;
       if (Res -> reset_nodeid == TOS_NODE_ID || Res -> reset_nodeid == 0 )
       {
       call ResetTimer.startOneShot(100);
       }
       if (Res -> reset_statusid == TOS_NODE_ID)
       {
       if (!ResetBusy)
       {
       if (call ResetSend.send(TOS_BCAST_ADDR, &Resbuf, sizeof(ResetMesg_t))
== SUCCESS)
       {
ResetBusy = TRUE;
       }
       }
       }

       return ResBuf;
       }
       }

--------------------------------------------------------------------------------------------------------------------------------------

Error message

In component `Status_MoteC':
Status_MoteC.nc: In function `ResetReceive.receive':
Status_MoteC.nc:208: warning: passing argument 1 of `ResetSend.send' makes
point
er from integer without a cast
Status_MoteC.nc:208: warning: passing argument 2 of `ResetSend.send' makes
integ
er from pointer without a cast
Status_MoteC.nc:208: too many arguments to function `ResetSend.send'
/opt/tinyos-2.x/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning: #warning
"*** L
OW POWER COMMUNICATIONS DISABLED ***"
In component `Status_MoteAppC':
Status_MoteAppC.nc: At top level:
Status_MoteAppC.nc:42: no match
make: *** [exe0] Error 1

________________________________________________________________________________

Make file

COMPONENT=Status_MoteAppC
CFLAGS += -I$(TOSDIR)/lib/net/ -I$(TOSDIR)/lib/net/ctp
 -I$(TOSDIR)/lib/net/4bitle
CFLAFS += -DTOSH_DATA_LENGTH = 110
include $(MAKERULES)
________________________________________________________________________________-

This AM send interface is the new thing i had included .. previously CTP was
working very finely.
What may be the problem ?
Thanks in advance .


-- 
With Best Regards
Himanshu Barve
M.Tech Electrical Engineering (Power System)
IIT Kharagpur , West Bengal , India
Ph: - +91 9775201181
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to