Oh! I was using stale code :) It is working perfectly.

Thanks,
Vijayant

On Dec 5, 2007 8:58 PM, Vijayant Bhatnagar <[EMAIL PROTECTED]>
wrote:

> Hi !
> I really thank you for helping me out. But, I am facing some errors :
>
> I am trying to wire TossimActiveMesageC.
>
> These are the errors :
> In component `TossimActiveMessageC':
> /opt/tinyos-2.x/tos/lib/tossim/TossimActiveMessageC.nc:87: conflicting
> types for `AMSend.getPayload'
> /opt/tinyos-2.x/tos/interfaces/AMSend.nc:125: previous declaration of
> `AMSend.getPayload'
> /opt/tinyos-2.x/tos/lib/tossim/TossimActiveMessageC.nc: In function
> `AMSend.getPayload':
> /opt/tinyos-2.x/tos/lib/tossim/TossimActiveMessageC.nc:88: warning:
> passing argument 2 of `Packet.getPayload' makes pointer from integer without
> a cast
> /opt/tinyos-2.x/tos/lib/tossim/TossimActiveMessageC.nc: In function
> `Model.receive':
> /opt/tinyos-2.x/tos/lib/tossim/TossimActiveMessageC.nc:107: warning:
> passing argument 2 of `Packet.getPayload' makes pointer from integer without
> a cast
> /opt/tinyos-2.x/tos/lib/tossim/TossimActiveMessageC.nc: At top level:
> /opt/tinyos-2.x/tos/lib/tossim/TossimActiveMessageC.nc:184: conflicting
> types for `Packet.getPayload'
> /opt/tinyos-2.x/tos/interfaces/Packet.nc:108: previous declaration of
> `Packet.getPayload'
> /opt/tinyos-2.x/tos/lib/tossim/TossimActiveMessageC.nc:249: redefinition
> of `active_message_deliver'
> /opt/tinyos-2.x/tos/lib/tossim/TossimActiveMessageP.nc:250: previous
> declaration of `active_message_deliver'
> /opt/tinyos-2.x/tos/lib/tossim/TossimActiveMessageC.nc:52:
> `Snoop.payloadLength' not implemented
> /opt/tinyos-2.x/tos/lib/tossim/TossimActiveMessageC.nc:52:
> `Snoop.getPayload' not implemented
> /opt/tinyos- 2.x/tos/lib/tossim/TossimActiveMessageC.nc:52:
> `Receive.payloadLength' not implemented
> /opt/tinyos-2.x/tos/lib/tossim/TossimActiveMessageC.nc:52:
> `Receive.getPayload' not implemented
>
>
> I have added these two lines of code :
>
> components TossimActiveMessageC;
> App.TossimPacket -> TossimActiveMessageC;
>
> Am I doing something wrong ?
>
> Any help/hint is greatly appreciated..
>
> Thanks,
> Vijayant
>
>
>
>
> On Dec 5, 2007 5:55 AM, Van der Haegen Mathieu <[EMAIL PROTECTED]>
> wrote:
>
> > Hi !
> >
> > Here is what I use to get the rssi :
> >
> >     //inline functions
> > >     inline int8_t getRssi(message_t* m) {
> > > #ifdef TOSSIM
> > >         return call TossimPacket.strength(m);
> > > #else
> > >         return call CC2420Packet.getRssi(m);
> > > #endif
> > >     }
> > >
> >
> > Cheers
> > Mathieu
> >
> > On Dec 5, 2007 9:49 AM, Urs Hunkeler < [EMAIL PROTECTED]> wrote:
> >
> > > Hi Vijayant,
> > >
> > > I am not that familiar with TOSSIM, that's why I didn't reply to your
> > > other mails. In TinyOS 2.x the functions to obtain the RSSI and LQI
> > > values are provided in the CC2420Packet interface. If you have a look
> > > at
> > > those functions, you will see that they just access some data
> > > structures
> > > and are not really tied to the CC2420. So it should be straight
> > > forward
> > > to implement these functions in your own code or provide this part of
> > > the CC2420PacketC module to TOSSIM.
> > >
> > > The radio model used by TOSSIM probably already calculates somewhere
> > > the
> > > RSSI value, but it probably is ignored (other than to calculate the
> > > probability with which a packet should be received). It should be
> > > relatively easy to also set the packet fields correctly.
> > >
> > > Cheers,
> > > Urs
> > >
> > >
> > > Vijayant Bhatnagar schrieb:
> > > > Hi,
> > > > I really appreciate your help. But I am using TOSSIM. I guess,
> > > CC2420Packet
> > > > is not supported by TOSSIM. Please correct me if I am wrong.
> > > >
> > > > This is the reason why we had to make a new interface to link tossim
> > > message
> > > > and then pass it to putOnAir,
> > > >
> > > > Thanks,
> > > > Vijayant
> > > >
> > > > On Dec 5, 2007 2:35 AM, Urs Hunkeler < [EMAIL PROTECTED]> wrote:
> > > >
> > > >> Hi,
> > > >>
> > > >> You can use CC2420Packet.getRssi(msg) and CC2420Packet.getLqi(msg)
> > > >> functions with the received message as the parameter to get the
> > > RSSI and
> > > >> the LQI values.
> > > >>
> > > >> To set the desired transmission power with which a packet should be
> > > >> send, you can use the CC2420Packet.setPower(&packet, txPower)
> > > function.
> > > >>
> > > >> The CC2420Packet interface is provided by the CC2420PacketC module.
> > > >>
> > > >> Cheers,
> > > >> Urs
> > > >>
> > > >>
> > > >> john varkey schrieb:
> > > >>> Hi,
> > > >>> I would also like to know how to know the RSSI value from the
> > > CC2420
> > > >> packet metadata.
> > > >>> regards,
> > > >>> John Paul
> > > >>>
> > > >>> Vijayant Bhatnagar <[EMAIL PROTECTED] > wrote: hi,
> > > >>> I just read phil's reply on one of the threads that we can receive
> > > RSSI
> > > >> in tossim 2.0. Can anyone please let me know the interface through
> > > which
> > > >> we can do  this ? I checked the code for TossimMessage, there
> > > already exists
> > > >> a field in the metadata. However, when I tried accessing it, it
> > > returns zero
> > > >> value.
> > > >>> Any help is appreciated.
> > > >>>
> > > >>> Thanks,
> > > >>> Vijayant.
> > > _______________________________________________
> > > Tinyos-help mailing list
> > > Tinyos-help@Millennium.Berkeley.EDU
> > >
> > > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> > >
> >
> >
> >
> > --
> > Van der Haegen Mathieu
> > http://www.ulb.ac.be/di/map/mavdhaeg/
> > http://www.ulb.ac.be/di/labo/
> > [EMAIL PROTECTED]
>
>
>
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to