Discussion:
Object names seem not to work properly
Yuxiang
2018-11-26 08:20:00 UTC
Permalink
Hello everyone,

I met a question as I tried running examples/naming/object-names.cc. I find
that Config::Set ("/Names/client/eth0/Mtu", UIntegerValue (1234)) does not
have any effect on attributes mtu, but Config::Set ("/NodeList/1/eth0/Mtu",
UIntegerValue (1234)) could indeed alter the attribute value. I really
appreciate it if someone could tell me why the object name does not work.
Many thanks.

Best,
Yuxiang
--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+***@googlegroups.com.
To post to this group, send email to ns-3-***@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
j***@gmail.com
2018-11-27 21:41:00 UTC
Permalink
Did you actually create the named object via something like

Ptr<Node> nodeObject = 
;
Names::Add("client", nodeObject);
Names::Add("client", "eth0", nodeObject->GetDevice(0));

Named objects don't exist by default, you have to explicitly create that
name / object association.

Good luck,
Jared.
Post by Yuxiang
Hello everyone,
I met a question as I tried running examples/naming/object-names.cc. I
find that Config::Set ("/Names/client/eth0/Mtu", UIntegerValue (1234)) does
not have any effect on attributes mtu, but Config::Set
("/NodeList/1/eth0/Mtu", UIntegerValue (1234)) could indeed alter the
attribute value. I really appreciate it if someone could tell me why the
object name does not work. Many thanks.
Best,
Yuxiang
--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+***@googlegroups.com.
To post to this group, send email to ns-3-***@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
Yuxiang
2018-11-28 00:49:07 UTC
Permalink
Hi Jared,

Thanks for the reply. Actually the script I use do associate the name with
the corresponding object. You could find the example script I use under
examples/naming/object-names.cc without any modification.

Best regards,
Yuxiang
Post by j***@gmail.com
Did you actually create the named object via something like
Ptr<Node> nodeObject = 
;
Names::Add("client", nodeObject);
Names::Add("client", "eth0", nodeObject->GetDevice(0));
Named objects don't exist by default, you have to explicitly create that
name / object association.
Good luck,
Jared.
Post by Yuxiang
Hello everyone,
I met a question as I tried running examples/naming/object-names.cc. I
find that Config::Set ("/Names/client/eth0/Mtu", UIntegerValue (1234)) does
not have any effect on attributes mtu, but Config::Set
("/NodeList/1/eth0/Mtu", UIntegerValue (1234)) could indeed alter the
attribute value. I really appreciate it if someone could tell me why the
object name does not work. Many thanks.
Best,
Yuxiang
--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+***@googlegroups.com.
To post to this group, send email to ns-3-***@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
Yuxiang
2018-12-04 11:56:13 UTC
Permalink
hi everyone,

After several tries, I find if I do not install internet stack on the node,
the aforementioned problem disappears, i.e., the attribute can be properly
configured by Config::Set ("/Names/client/eth0/Mtu", UIntegerValue (1234)).
This phenomenon really confuses. Could anyone give me some help? Many
thanks.
Post by Yuxiang
Hi Jared,
Thanks for the reply. Actually the script I use do associate the name with
the corresponding object. You could find the example script I use under
examples/naming/object-names.cc without any modification.
Best regards,
Yuxiang
Post by j***@gmail.com
Did you actually create the named object via something like
Ptr<Node> nodeObject = 
;
Names::Add("client", nodeObject);
Names::Add("client", "eth0", nodeObject->GetDevice(0));
Named objects don't exist by default, you have to explicitly create that
name / object association.
Good luck,
Jared.
Post by Yuxiang
Hello everyone,
I met a question as I tried running examples/naming/object-names.cc. I
find that Config::Set ("/Names/client/eth0/Mtu", UIntegerValue (1234)) does
not have any effect on attributes mtu, but Config::Set
("/NodeList/1/eth0/Mtu", UIntegerValue (1234)) could indeed alter the
attribute value. I really appreciate it if someone could tell me why the
object name does not work. Many thanks.
Best,
Yuxiang
--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+***@googlegroups.com.
To post to this group, send email to ns-3-***@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
Yuxiang
2018-12-05 05:27:29 UTC
Permalink
Hi,

I find [Bug 2765 <https://www.nsnam.org/bugzilla/show_bug.cgi?id=2765> Config::Set
may fail to set the attribute by using Names::Add] describes exactly the
same problem I met. Has this bug already been fixed or is there any
solution (The link therein seems no more valid)? Many thanks.
https://www.nsnam.org/bugzilla/show_bug.cgi?id=2765#c0

Best,
Yuxiang
Post by Yuxiang
hi everyone,
After several tries, I find if I do not install internet stack on the
node, the aforementioned problem disappears, i.e., the attribute can be
properly configured by Config::Set ("/Names/client/eth0/Mtu", UIntegerValue
(1234)). This phenomenon really confuses. Could anyone give me some help?
Many thanks.
Post by Yuxiang
Hi Jared,
Thanks for the reply. Actually the script I use do associate the name
with the corresponding object. You could find the example script I use
under examples/naming/object-names.cc without any modification.
Best regards,
Yuxiang
Post by j***@gmail.com
Did you actually create the named object via something like
Ptr<Node> nodeObject = 
;
Names::Add("client", nodeObject);
Names::Add("client", "eth0", nodeObject->GetDevice(0));
Named objects don't exist by default, you have to explicitly create that
name / object association.
Good luck,
Jared.
Post by Yuxiang
Hello everyone,
I met a question as I tried running examples/naming/object-names.cc. I
find that Config::Set ("/Names/client/eth0/Mtu", UIntegerValue (1234)) does
not have any effect on attributes mtu, but Config::Set
("/NodeList/1/eth0/Mtu", UIntegerValue (1234)) could indeed alter the
attribute value. I really appreciate it if someone could tell me why the
object name does not work. Many thanks.
Best,
Yuxiang
--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+***@googlegroups.com.
To post to this group, send email to ns-3-***@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
Yuxiang
2018-12-07 01:18:43 UTC
Permalink
Hi all,

the developer who reported Bug 2765 actually proposed a possible solution,
which at least works in my case.

Best,
Yuxiang
Post by Yuxiang
Hi,
I find [Bug 2765 <https://www.nsnam.org/bugzilla/show_bug.cgi?id=2765> Config::Set
may fail to set the attribute by using Names::Add] describes exactly the
same problem I met. Has this bug already been fixed or is there any
solution (The link therein seems no more valid)? Many thanks.
https://www.nsnam.org/bugzilla/show_bug.cgi?id=2765#c0
Best,
Yuxiang
Post by Yuxiang
hi everyone,
After several tries, I find if I do not install internet stack on the
node, the aforementioned problem disappears, i.e., the attribute can be
properly configured by Config::Set ("/Names/client/eth0/Mtu", UIntegerValue
(1234)). This phenomenon really confuses. Could anyone give me some help?
Many thanks.
Post by Yuxiang
Hi Jared,
Thanks for the reply. Actually the script I use do associate the name
with the corresponding object. You could find the example script I use
under examples/naming/object-names.cc without any modification.
Best regards,
Yuxiang
Post by j***@gmail.com
Did you actually create the named object via something like
Ptr<Node> nodeObject = 
;
Names::Add("client", nodeObject);
Names::Add("client", "eth0", nodeObject->GetDevice(0));
Named objects don't exist by default, you have to explicitly create
that name / object association.
Good luck,
Jared.
Post by Yuxiang
Hello everyone,
I met a question as I tried running examples/naming/object-names.cc. I
find that Config::Set ("/Names/client/eth0/Mtu", UIntegerValue (1234)) does
not have any effect on attributes mtu, but Config::Set
("/NodeList/1/eth0/Mtu", UIntegerValue (1234)) could indeed alter the
attribute value. I really appreciate it if someone could tell me why the
object name does not work. Many thanks.
Best,
Yuxiang
--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+***@googlegroups.com.
To post to this group, send email to ns-3-***@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
Loading...