Hi,
I'm trying to run 'laa-wifi-indoor.cc' example with a short Txop period, saying 160 millisecond, for some reasons.
Could anyone help me to set it correctly? My best try couldn't reach to the right way.
To change both Txop value and its range to be checked, I modified related (global and default) variables in the example files,
and then I am facing a SIGABORT from the line setting the default value;
Config::SetDefault ("ns3::LbtAccessManager::Txop", TimeValue (MicroSeconds (lbtTxop*1000))).
And the error message is
---
msg="Could not set default value for ns3::LbtAccessManager::Txop", file=../src/core/model/config.cc, line=682
terminate called without an active exception
Program received signal SIGABRT, Aborted.
---
by debugging, I found out in Config::SetDefaultFailSafe() that the attribute value wasn't set properly.
---
701 for (uint32_t j = 0; j < tid.GetAttributeN (); j++)
(gdb)
703 struct TypeId::AttributeInformation tmp = tid.GetAttribute(j);
(gdb)
(gdb)
706 Ptr<AttributeValue> v = tmp.checker->CreateValidValue (value);
(gdb) n
707 if (v == 0)
(gdb) p v
$6 = {m_ptr = 0x0}
(gdb) p value
$7 = (const ns3::AttributeValue &) @0x7fffffffd730: {<ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >> = {<ns3::empty> = {<No data fields>}, m_count = 1}, _vptr.AttributeValue = 0x615330 <vtable for ns3::TimeValue+16>}
(gdb) p tmp
$8 = {name = "Txop", help = "Duration of channel access grant.", flags = 7, originalInitialValue = {m_ptr = 0x719690}, initialValue = {
m_ptr = 0x719690}, accessor = {m_ptr = 0x718cd0}, checker = {m_ptr = 0x718c40}}
(gdb) bt
#0 ns3::Config::SetDefaultFailSafe (fullName="ns3::LbtAccessManager::Txop", value=...) at ../src/core/model/config.cc:707
#1 0x00007fffefefa072 in ns3::Config::SetDefault (name="ns3::LbtAccessManager::Txop", value=...) at ../src/core/model/config.cc:680
#2 0x0000000000406699 in main (argc=2, argv=0x7fffffffdc88) at ../scratch/laa-wifi-indoor.cc:339
(gdb) n
709 return false;
(gdb)
---
In the further debugging, I encountered one weired operation in Time class;
Although g_markingTimes is a null pointer, the program went into the if-clause in line 202, as you can see in the following debugging log.
----
(gdb) n
339 Config::SetDefault ("ns3::LbtAccessManager::Txop", TimeValue (MicroSeconds (lbtTxop*1000)));
(gdb) s
ns3::MicroSeconds (value=160) at ./ns3/nstime.h:877
877 return Time::FromInteger (value, Time::US);
(gdb) s
ns3::Time::FromInteger (value=160, unit=ns3::Time::US) at ./ns3/nstime.h:406
406 struct Information *info = PeekInformation (unit);
(gdb) n
407 if (info->fromMul)
(gdb)
409 value *= info->factor;
(gdb)
415 return Time (value);
(gdb) s
ns3::Time::Time (this=0x7fffffffcda0, v=160000) at ./ns3/nstime.h:200
200 : m_data (v)
(gdb) list
195 {
196 Mark (this);
197 }
198 }
199 explicit inline Time (unsigned long int v)
200 : m_data (v)
201 {
202 if (g_markingTimes)
203 {
204 Mark (this);
(gdb) n
202 if (g_markingTimes)
(gdb) n
204 Mark (this);
(gdb) p g_markingTimes
$1 = (ns3::Time::MarkedTimes *) 0x0
(gdb) s
ns3::Time::Mark (time=0x7fffffffcda0) at ../src/core/model/time.cc:282
282 CriticalSection critical (GetMarkingMutex ());
(gdb) bt
#0 ns3::Time::Mark (time=0x7fffffffcda0) at ../src/core/model/time.cc:282
#1 0x000000000040fd21 in ns3::Time::Time (this=0x7fffffffcda0, v=160000) at ./ns3/nstime.h:204
#2 0x000000000040fdf9 in ns3::Time::FromInteger (value=160000, unit=ns3::Time::US) at ./ns3/nstime.h:415
#3 0x000000000040fff3 in ns3::MicroSeconds (value=160) at ./ns3/nstime.h:877
#4 0x000000000040663d in main (argc=2, argv=0x7fffffffdc88) at ../scratch/laa-wifi-indoor.cc:339
---
My best understanding so far is that this marking procedure caused to set the attribute value for Txop improperly, but I am not sure.
Thank you for your time and consideration in advance.
- John