hey,
I am not sure about how it will work in TOSSIM. I implement on motes
directly and don havent worked with simulator at all.


> Hi Dear Deeksha,
>
> Thanks for your solution.
>
> But the problem is ,when I modify ReceiverP file,Changes will not affect
> the
> program.even if i write a irrelevant words in the middle of ReceiverP
> file!
>
> Cheers.
>
> I'm useing "Make micaz sim" and  then simulate it by TOSSIM.
> Where is the problem?
>
> On Wed, Sep 15, 2010 at 11:56 AM, Deeksha Rao Sahib <
> [email protected]> wrote:
>
>>
>> Hey,
>>
>> Check the CC2420ReceiveP.nc program. In the receiveDone_task(show below)
>> the Receive.receive is signalled after checking for the address in the
>> function passesAddressCheck(). So after the address part is over you
>> have
>> to implement the logic you want to add. Try it out. I have not worked
>> with
>> anything like this.
>>
>> task void receiveDone_task() {
>>
>>    cc2420_metadata_t* metadata = call CC2420PacketBody.getMetadata(
>> m_p_rx_buf );
>>
>>    cc2420_header_t* header = call CC2420PacketBody.getHeader(
>> m_p_rx_buf);
>>
>>    uint8_t length = header->length;
>>
>>    uint8_t tmpLen __DEPUTY_UNUSED__ = sizeof(message_t) -
>> (offsetof(message_t, data) - sizeof(cc2420_header_t));
>>
>>    uint8_t* COUNT(tmpLen) buf = TCAST(uint8_t* COUNT(tmpLen), header);
>>
>>
>>
>>    metadata->crc = buf[ length ] >> 7;
>>
>>    metadata->lqi = buf[ length ] & 0x7f;
>>
>>    metadata->rssi = buf[ length - 1 ];
>>
>>
>>
>>    if (passesAddressCheck(m_p_rx_buf) && length >= CC2420_SIZE) {
>>
>> #ifdef CC2420_HW_SECURITY
>>
>>      if(securityOn == 1){
>>
>>        if(m_missed_packets > 0){
>>
>>          m_missed_packets --;
>>
>>        }
>>
>>        if(authentication){
>>
>>          length -= micLength;
>>
>>        }
>>
>>      }
>>
>>      micLength = 0;
>>
>>      securityOn = 0;
>>
>>      authentication = 0;
>>
>> #endif
>>
>>      m_p_rx_buf = signal Receive.receive( m_p_rx_buf, m_p_rx_buf->data,
>>
>>                                           length - CC2420_SIZE);
>>
>>    }
>>
>>     atomic receivingPacket = FALSE;
>>
>>    waitForNextPacket();
>>
>>  }
>>
>>
>>
>>
>> > Thanks Dear Deeksha,
>> >
>> > Yes I want to know that in which layer this logic is checked In order
>> to
>> > change it to my scenario.
>> > In my scenario I want to use AM_BROADCAST_ADDR .But i dont like every
>> node
>> > in the listening distance receives this packet.Just some nodes with a
>> > characteristic inside the node can receive the broadcastet message.
>> >
>> > So do you know which file or module I have to change ?
>> >
>> > On Tue, Sep 14, 2010 at 12:43 PM, Deeksha Rao Sahib <
>> > [email protected]> wrote:
>> >
>> >> Hey,
>> >>
>> >> I gather that you are talking about the unicast instead of broadcast.
>> >> The checking of the destination address is done in some lower layers
>> >> before it is pushed to the application where Receive.receive is
>> >> signalled.
>> >>
>> >> If you want to include another parameter in making this decision,
>> then
>> >> you
>> >> will have to include some extra details and logic at the place where
>> it
>> >> is
>> >> checking  for the destination.
>> >>
>> >> These details might be like the structure inside the packet(data
>> field
>> >> of
>> >> message_t), any exclusive packet type that you are using your
>> >> application(ex: alarm pkt, event pkt, status pkt might have a field
>> >> which
>> >> will distinguish them from each other)
>> >>
>> >> Hope this helps you
>> >>
>> >> > Hi Dear Jeonghoon,
>> >> >
>> >> > Thanks for your answer.
>> >> >
>> >> > I didn't get your solution.May be I'm not making myself clear.
>> >> >
>> >> > I want to avoid signaling the Receive.receive event.
>> >> > The scenario is this:
>> >> > when we use AMSend.Send(*node1*,...)(I mean not broadcasting),every
>> >> other
>> >> > node in the listening node of sender will receive the signal,But
>> >> because
>> >> > the
>> >> > destination of the message is *node1* so only this node will
>> receive
>> >> the
>> >> > packet(Receive.receive of other nodes will not triggered). I want
>> to
>> >> add
>> >> > another factor(beside the destination of the message). for example
>> a
>> >> > variable in the node.So if we are sending a message to *node1*,the
>> >> message
>> >> > should be received by a node by the the address of *node1* as well
>> as
>> >> > having
>> >> > the mentioned factor.
>> >> >
>> >> > Any Solution?
>> >> >
>> >> >
>> >> > On Mon, Sep 13, 2010 at 5:41 PM, Jeonghoon Kang
>> >> > <[email protected]>wrote:
>> >> >
>> >> >> Hi,
>> >> >>
>> >> >> How about trying to use different AM type.
>> >> >>
>> >> >> command send[1]
>> >> >> command send[2]
>> >> >> event receive[1]
>> >> >> event receive[2]
>> >> >>
>> >> >> or
>> >> >>
>> >> >> if (NODE_ID == 0x00) { ~~~ }
>> >> >>
>> >> >> Jeonghoon Kang
>> >> >> Managerial Researcher
>> >> >> at Korea Electronics Technology Institute(www.keti.re.kr)
>> >> >> TinyOS Korea Forum Administrator
>> >> >> www.tinyos.or.kr
>> >> >> work = [email protected]
>> >> >> private = [email protected]
>> >> >> www.pinkfloyd.re.kr/rnd/
>> >> >> *Kmote Connector
>> >> >> http://www.tinyos.re.kr/bbs/upload/kmote_connector.pdf
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> 2010/9/11 mojtaba raznahan <[email protected]>:
>> >> >> > Hi,
>> >> >> >
>> >> >> > How can I filter a message depending on some feature of nodes ?I
>> >> mean
>> >> >> a
>> >> >> way
>> >> >> > to prevent the Receive.receive from being signaled.
>> >> >> >
>> >> >> > your help would be highly appreciated.
>> >> >> >
>> >> >> > --
>> >> >> > Mojtaba Raznahan
>> >> >> > BS of Computer engineering
>> >> >> > TMU university
>> >> >> > www.raznahan.com
>> >> >> >
>> >> >> > _______________________________________________
>> >> >> > Tinyos-help mailing list
>> >> >> > [email protected]
>> >> >> >
>> >>
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>> >> >> >
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Mojtaba Raznahan
>> >> > BS of Computer engineering
>> >> > TMU university
>> >> > www.raznahan.com
>> >> >
>> >> > --
>> >> > This message has been scanned for viruses and
>> >> > dangerous content by MailScanner, and is
>> >> > believed to be clean.
>> >> >
>> >> > _______________________________________________
>> >> > Tinyos-help mailing list
>> >> > [email protected]
>> >> >
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>> >>
>> >>
>> >> --Deeksha
>> >>
>> >> --
>> >> This message has been scanned for viruses and
>> >> dangerous content by MailScanner, and is
>> >> believed to be clean.
>> >>
>> >>
>> >
>> >
>> > --
>> > Mojtaba Raznahan
>> > BS of Computer engineering
>> > TMU university
>> > www.raznahan.com
>> >
>> > --
>> > This message has been scanned for viruses and
>> > dangerous content by MailScanner, and is
>> > believed to be clean.
>> >
>> >
>>
>>
>> --Deeksha
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>>
>
>
> --
> Mojtaba Raznahan
> BS of Computer engineering
> TMU university
> www.raznahan.com
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>


--Deeksha

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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

Reply via email to