Hi Islam,
In the file CtpP.nc, there is the following code:
Router.BeaconReceive -> Estimator.Receive;
Estimator.SubReceive -> ReceiveControl;
This means that received beacon is processed by LinkEstimator and then
RoutingEngine. Each component adds the corresponding header on which they
operate:
Look at the LinkEstimator.h:
-----------------------------------------------
// link estimator header added to
// every message passing through the link estimator
typedef nx_struct linkest_header {
nx_uint8_t flags;
nx_uint8_t seq;
} linkest_header_t;
In the Ctp.h:
--------------------
typedef nx_struct {
nx_ctp_options_t options;
nx_am_addr_t parent;
nx_uint16_t etx;
nx_uint8_t (COUNT(0) data)[0]; // Deputy place-holder, field will probably
be removed when we Deputize Ctp
} ctp_routing_header_t;
I also recommend you to read the following paper:
http://sing.stanford.edu/pubs/sing-09-01.pdf
Collection Tree Protocol "Tecnical Report"
Regards,
--
Mehmet Akif Antepli
Telecommunications Lab. D-217
Dept. of EEE
Middle East Technical University
2010/3/2 Islam Hegazy <[email protected]>
> Hi,
>
> I am studying CTP to simulate it in ns-2 for my PhD. I read the TEP123,
> "Collection Tree Protocol" and "Four-bit Wireless Link Estimation" papers. I
> understand that CTP has 3 engines forwarding, routing, and estimation. I am
> confused about the structure of the beacons. CTP and TEP123 say that the
> beacon has control bits, parent, and ETX fields. 4-bit paper says that the
> beacon contains the LQs of neighbours and seq. number. When I checked the
> code in TinyOS I found that the two approaches are implemented.
> 'SendBeaconTask' in CtpRoutingEngine.nc sends a beacon with control bits,
> parent, and ETX value. While 'addLinkEstHeaderAndFooter' in
> LinkEstimatorP.nc sends a beacon with a seq. number and LQs of some
> neighbours. so far, I cannot link the two functions together. My questions
> are:
> 1) Are both functions called? If so, which one precedes the other? i.e.
> what is the packet flow in this case
> 2) What is the seq. number added in 'addLinkEstHeaderAndFooter'? Is it
> different from the one added to data packets?
>
> Your help is really appreciated.
>
> Regards
> Islam Hegazy
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help