[ndnSIM] error : assignment of member 'ndn::Interest::TSI ' in read only object
SUBODH MISHRA
1911602 at iiitdmj.ac.in
Sat Nov 26 20:32:31 PST 2022
Dear Researchers
Greeting!
I want to count the number of intermediate nodes the interest packet
passes before reaching the producer.
So, I declared the function *IncrementTSI *in *Interest.hpp* as follows
* void IncrementTSI() const;*
I defined this function in the *Interest.cpp* class to increment the
private variable *TSI* of *Interest* class (*TSI *is initialized as 0 from
the consumer application) .The definition of *IncrementTSI *in*
Interest.cpp*is as follows;
*void Interest:: IncrementTSI() const*
* {*
* TSI = TSI +1;*
* } *
In the *Forwarder::onIncomingInterest* function I simply called this
*IncrementTSI
() *to increment the value of *TSI * to record the number of nodes
travelled by the *Interest * packet before reaching the producer:-
*interest.IncrementTSI();*
It throws the following error:-
error: assignment of member 'ndn::Interest::TSI' in read-only object
399| TSI = TSI+1;
Please help me to remove this error
Thanks & Regards
Subodh Mishra
Research Scholar (Ph.D),
Department of Computer Science and Engineering,
PDPM-Indian Institute of Information Technology,
Design and Manufacturing, Jabalpur
Email: 1911602 [at] iiitdmj [dot] ac [dot] in ,
subodhkmishra [at] gmail [dot] com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20221127/d4eeae47/attachment.html>
More information about the ndnSIM
mailing list