[net2-wg] Fwd: CtpRoutingPacket.nc Rev1.5

Omprakash Gnawali gnawali at usc.edu
Sun Sep 20 19:20:57 PDT 2009


---------- Forwarded message ----------
From: Omprakash Gnawali <gnawali at usc.edu>
Date: Sun, Sep 20, 2009 at 7:20 PM
Subject: Re: CtpRoutingPacket.nc Rev1.5
To: Mehmet Akif Antepli <akifantepli at gmail.com>
Cc: Tinyos-Help <tinyos-help at millennium.berkeley.edu>


On Sun, Sep 20, 2009 at 3:09 AM, Mehmet Akif Antepli
<akifantepli at gmail.com> wrote:
> Hi Omprakash,
>
> I was looking at CtpRoutingPacket interface and its implementation at
> CtpRoutingEngineP.nc. I think there is something wrong with setEtx(.)
>
> Etx field is defined to be uint16_t in the Ctp.h
>
>>>   76 typedef nx_struct {
>>>   77   nx_ctp_options_t    options;
>>>   78   nx_am_addr_t        parent;
>>>   79   nx_uint16_t         etx;
>>>   80   nx_uint8_t (COUNT(0) data)[0]; // Deputy place-holder, field will
>>> probably be removed when we Deputize Ctp
>>>   81 } ctp_routing_header_t;
>
> But CtpRoutingPacket interface is the following:
>
>>> 57   command void          setEtx(message_t* ONE msg, uint8_t etx);
>
> Filed type seems to be incorrect. It should be uint16_t, isn' t it?
>
> Thus , implemenatattion in the CtpRoutingEngine is also wrong.
>
>  >> 811     command void          CtpRoutingPacket.setEtx(message_t* msg,
> uint8_t etx) {
>  >> 812       getHeader(msg)->etx = etx;
>  >>A 813     }

Thanks for reporting this bug. I have checked in the changes after
doing some test. If you can test it too, that will be great.

- om_p



More information about the net2-wg mailing list