No subject


Sun Jul 26 12:29:11 PDT 2009


-------------------------------------------------------------------------------------
event message_t* Receive.receive(message_t* msg, void *payload, uint8_t
len)
  {

     SensorMessage1_t* in = (SensorMessage1_t*)payload;
     SensorMessage1_t out;
     call Leds.led0Toggle();
     if (uartbusy == FALSE)
     {
       out = (SensorMessage1_t*)call SerialSend.getPayload(&uartpkt,
sizeof(SensorMessage1_t));
       if (len != sizeof(SensorMessage1_t) || out == NULL)
       {
return msg;
       }
       else
       {
memcpy(out, in, sizeof(SensorMessage1_t));
       }
       uartlength = sizeof(SensorMessage1_t);
     post uartSendTask();
     }
return msg ;
}
--------------------------------------------------------------------


Error message

In file included from Root_MoteAppC.nc:15:
In component `Root_MoteC':
Root_MoteC.nc: In function `Receive.receive':
Root_MoteC.nc:110: incompatible types in assignment
Root_MoteC.nc:111: invalid operands to binary ==
Root_MoteC.nc:117: incompatible type for argument 1 of `memcpy'
Root_MoteC.nc:134: incompatible types in assignment
Root_MoteC.nc:135: invalid operands to binary ==
Root_MoteC.nc:139: incompatible type for argument 1 of `memcpy'
/opt/tinyos-2.x/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning: #warning
"*** L
OW POWER COMMUNICATIONS DISABLED ***"
make: *** [exe0] Error 1
-----------------------------------------------------------------------------------------


What might be the problem in this case ??
thanks in advance ..




-- 
With Best Regards
Himanshu Barve
M.Tech Electrical Engineering (Power System)
IIT Kharagpur , West Bengal , India
Ph: - +91 9775201181

--000e0cd327f278b3c7046fd4e176
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>From header file</div><div>-------------------------------------------=
----------------------------------------</div><div><div>typedef nx_struct S=
ensorMessage1 {</div><div>=A0<span class=3D"Apple-tab-span" style=3D"white-=
space:pre">	</span></div>
<div>=A0<span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>nx=
_int32_t reading1;</div><div>=A0=A0<span class=3D"Apple-tab-span" style=3D"=
white-space:pre">	</span>nx_int32_t reading2;</div><div>=A0=A0<span class=
=3D"Apple-tab-span" style=3D"white-space:pre">	</span>nx_int32_t reading3;<=
/div>
<div>=A0<span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>nx=
_int32_t reading4;</div><div>=A0=A0<span class=3D"Apple-tab-span" style=3D"=
white-space:pre">	</span>nx_int32_t reading5;</div><div>=A0=A0<span class=
=3D"Apple-tab-span" style=3D"white-space:pre">	</span></div>
<div>=A0=A0<span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span=
></div><div>=A0=A0<span class=3D"Apple-tab-span" style=3D"white-space:pre">=
	</span></div><div>} SensorMessage1_t;</div><div>--------------------------=
-------------------------------------------------------</div>
<div><br></div><div><br></div><div><br></div><div>From Module file</div><di=
v>-------------------------------------------------------------------------=
------------</div><div><div>event message_t* Receive.receive(message_t* msg=
, void *payload, uint8_t len)=A0</div>
<div>=A0<span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>{<=
/div><div>=A0=A0 =A0<span class=3D"Apple-tab-span" style=3D"white-space:pre=
">		</span></div><div>=A0=A0 =A0<span class=3D"Apple-tab-span" style=3D"whi=
te-space:pre">		</span>SensorMessage1_t* in =3D (SensorMessage1_t*)payload;=
</div>
<div>=A0=A0 =A0<span class=3D"Apple-tab-span" style=3D"white-space:pre">		<=
/span>SensorMessage1_t out;</div><div>=A0=A0 =A0<span class=3D"Apple-tab-sp=
an" style=3D"white-space:pre">		</span>call Leds.led0Toggle();</div><div>=
=A0=A0 =A0<span class=3D"Apple-tab-span" style=3D"white-space:pre">		</span=
>if (uartbusy =3D=3D FALSE)=A0</div>
<div>=A0=A0 =A0<span class=3D"Apple-tab-span" style=3D"white-space:pre">		<=
/span>{</div><div>=A0=A0 =A0 =A0<span class=3D"Apple-tab-span" style=3D"whi=
te-space:pre">			</span>out =3D (SensorMessage1_t*)call SerialSend.getPaylo=
ad(&amp;uartpkt, sizeof(SensorMessage1_t));</div>
<div>=A0=A0 =A0 =A0<span class=3D"Apple-tab-span" style=3D"white-space:pre"=
>			</span>if (len !=3D sizeof(SensorMessage1_t) || out =3D=3D NULL)=A0</di=
v><div>=A0=A0 =A0 =A0<span class=3D"Apple-tab-span" style=3D"white-space:pr=
e">			</span>{</div><div><span class=3D"Apple-tab-span" style=3D"white-spac=
e:pre">				</span>return msg;</div>
<div>=A0=A0 =A0 =A0<span class=3D"Apple-tab-span" style=3D"white-space:pre"=
>			</span>}</div><div>=A0=A0 =A0 =A0<span class=3D"Apple-tab-span" style=
=3D"white-space:pre">			</span>else=A0</div><div>=A0=A0 =A0 =A0<span class=
=3D"Apple-tab-span" style=3D"white-space:pre">			</span>{</div>
<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">				</span>me=
mcpy(out, in, sizeof(SensorMessage1_t));</div><div>=A0=A0 =A0 =A0<span clas=
s=3D"Apple-tab-span" style=3D"white-space:pre">			</span>}</div><div>=A0=A0=
 =A0 =A0<span class=3D"Apple-tab-span" style=3D"white-space:pre">			</span>=
uartlength =3D sizeof(SensorMessage1_t);</div>
<div>=A0=A0 =A0<span class=3D"Apple-tab-span" style=3D"white-space:pre">			=
</span>post uartSendTask();</div><div>=A0=A0 =A0<span class=3D"Apple-tab-sp=
an" style=3D"white-space:pre">		</span>}</div><div>return msg ;=A0</div><di=
v>}</div><div>-------------------------------------------------------------=
-------</div>
<div><br></div><div><br></div><div>Error message=A0</div><div><br></div><di=
v><div>In file included from Root_MoteAppC.nc:15:</div><div>In component `R=
oot_MoteC&#39;:</div><div>Root_MoteC.nc: In function `Receive.receive&#39;:=
</div>
<div>Root_MoteC.nc:110: incompatible types in assignment</div><div>Root_Mot=
eC.nc:111: invalid operands to binary =3D=3D</div><div>Root_MoteC.nc:117: i=
ncompatible type for argument 1 of `memcpy&#39;</div><div>Root_MoteC.nc:134=
: incompatible types in assignment</div>
<div>Root_MoteC.nc:135: invalid operands to binary =3D=3D</div><div>Root_Mo=
teC.nc:139: incompatible type for argument 1 of `memcpy&#39;</div><div>/opt=
/tinyos-2.x/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning: #warning &quot=
;*** L</div>
<div>OW POWER COMMUNICATIONS DISABLED ***&quot;</div><div>make: *** [exe0] =
Error 1</div><div>---------------------------------------------------------=
--------------------------------</div><div><br></div><div><br></div><div>
What might be the problem in this case ??=A0</div><div>thanks in advance ..=
=A0</div><div><br></div></div></div></div><div><br></div><br clear=3D"all">=
<br>-- <br>With Best Regards<br>Himanshu Barve<br>M.Tech Electrical Enginee=
ring (Power System)<br>
IIT Kharagpur , West Bengal , India<br>Ph: - +91 9775201181<br>

--000e0cd327f278b3c7046fd4e176--


More information about the Tinyos-help mailing list