On 6/4/22 08:44, bouchrit leila wrote:
> Hello,
> Please can someone help me to resolve this error, i spent many hours but
> I can't find a solution.
> I went to use config::connect to trace PDCP transmit and received
There are typically a few reasons why this might fail.
1) The path string is incorrect.
2) You specified a wildcard in the path name, but the object being
connected to does not exist on all nodes (or all devices on all nodes).
In the path you specified below,
/NodeList/*/DeviceList/*/$ns3::LteUeNetDevice/LteUeRrc/Srb1/LtePdcp/TxPDU
This path must exist on _all_ nodes and _all_devices in the simulation,
when Config::Connect() is used.
3) The path is correct but the object does not yet exist when the trace
connection is attempted. TCP sockets are a good example of this; they
typically are instantiated after the simulation starts.
I think in your case, it is probably 2), because I doubt that all nodes
are UEs in your scenario, and therefore I doubt that LteUeRrc exists on
all nodes.
You have two choices:
1) use Config::ConnectFailSafe() instead of Config::Connect(). The
first method will not raise an error if the path string does not match
everywhere.
2) Do not use wildcards in your path strings but instead explicitly
identify with node index and device index the exact paths you want to trace.
My first option would typically be to call ConnectFailSafe(), and if
nothing is traced, then I would suspect I had a path string problem.
In general, when I want to debug incorrect paths, I borrow some code
from the example program
`src/config-store/examples/config-store-save.cc`. Starting on line 103
of that program, you can see these statements:
Config::SetDefault ("ns3::ConfigStore::Filename", StringValue
("output-attributes.txt"));
Config::SetDefault ("ns3::ConfigStore::FileFormat", StringValue
("RawText"));
Config::SetDefault ("ns3::ConfigStore::Mode", StringValue ("Save"));
ConfigStore outputConfig2;
outputConfig2.ConfigureDefaults ();
outputConfig2.ConfigureAttributes ();
I paste these just before my call to Simulator::Run (). I also include
the header "#include "ns3/config-store-module.h". This will dump a text
file of all of the instantiated object paths in the config namespace
just before the simulation starts, into a text file
'output-attributes.txt'. I can then check my path strings against this
file.
In the case of 3) above, the objects may not exist yet just before
simulation time 0, so I would create a function including those
statements and schedule that function for some future simulation time.
- Tom
>
> when i compile my file lte.cc i got this error:
> msg="Could not connect callback to
> /NodeList/*/DeviceList/*/$ns3::LteUeNetDevice/LteUeRrc/Srb1/LtePdcp/TxPDU",
> +0.000000000s -1 file=../src/core/model/config.cc, line=925
> i use gdb i got this:
> Program received signal SIGABRT, Aborted.
> __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
> 50 ../sysdeps/unix/sysv/linux/raise.c: Aucun fichier ou dossier de ce type.
> (gdb) bt
> #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
> #1 0x00007ffff1e1b859 in __GI_abort () at abort.c:79
> #2 0x00007ffff2218911 in ?? () from
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> #3 0x00007ffff222438c in ?? () from
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> #4 0x00007ffff22243f7 in std::terminate() () from
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> #5 0x00007ffff2843e7f in ns3::Config::Connect (
>
> path="/NodeList/*/DeviceList/*/$ns3::LteUeNetDevice/LteUeRrc/Srb1/LtePdcp/TxPDU",
> cb=...)
> at ../src/core/model/config.cc:925
> #6 0x00005555555721fb in main (argc=1, argv=0x7fffffffd8e8) at
> ../scratch/lte.cc:433
> *Another question:* I want to get the sequenceNumber of the packet, can
> i use the trace RX of PDCP to recuperate the sequenceNumber?
> Can anybody help me?
>
> --
> Posting to this group should follow these guidelines
>
https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
> <
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
> <mailto:
ns-3-users+...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/ns-3-users/CAOuYX_5%2BTS_5sOwzbWvnY_Y%3DYnj7-mYCFUJaB%2BAWp5Ok0sC4sA%40mail.gmail.com
> <
https://groups.google.com/d/msgid/ns-3-users/CAOuYX_5%2BTS_5sOwzbWvnY_Y%3DYnj7-mYCFUJaB%2BAWp5Ok0sC4sA%40mail.gmail.com?utm_medium=email&utm_source=footer>.