LteEnbPhy: m_nrFrames check in StartSubFrames

29 views
Skip to first unread message

Michele Polese

unread,
Apr 7, 2016, 12:02:07 PM4/7/16
to ns-3-users
Hi all,
in lte-enb-phy.cc, at line 622, there is this instruction:
   622       NS_ASSERT_MSG (m_nrFrames > 1, "the SRS index check code assumes that frameNo starts at 1");

My question is: why > and not >= ? The same condition is checked in the next line for the subFrameIndex:
   623       NS_ASSERT_MSG (m_nrSubFrames > 0 && m_nrSubFrames <= 10, "the SRS index check code assumes that subframeNo starts at 1");
Here the comment is the same but the check is for m_nrSubFrames > 0 (i.e. >= 1).

Thank you for your attention,
Michele Polese

Michele Polese

unread,
Apr 13, 2016, 3:59:06 AM4/13/16
to ns-3-users
Hi,
just to understand, is this a pointless question and there is something I am not seeing?
Michele

Tommaso Pecorella

unread,
Apr 13, 2016, 4:21:42 AM4/13/16
to ns-3-users
Hi,

no, it's not a pointless question.
I guess that the error message is a copy-paste problem. The grater instead of greater or equal to is... boh ?
If we trust the error message, then you're right. However I never trust the error messages.
The only people able to give a definitive answer are the LTE maintainer, I'd poke them (and I'd also ask for a code fix).

Cheers,

T.

Michele Polese

unread,
Apr 13, 2016, 4:24:43 AM4/13/16
to ns-3-users
Thank you Tommaso for your reply, I'll wait the answer of LTE mantainers!
Michele

Marco Miozzo

unread,
Apr 13, 2016, 5:04:21 AM4/13/16
to ns-3-...@googlegroups.com
Hi Michele,

sorry for the late reply, we have been discussing internally in CTTC in the last days. This code has been committed a few years ago when RRC has been finalized and the programmer is not anymore working with us, so we had the same problem. Honestly speaking it is not 100% clear to me the reason behind these asserts. However, following LTE specs, I would say that the first one is probably a typo, I agree with you that it should be "m_nrFrames >= 1". While for the second one it seems fine to me, since subframe has to be in the range [1..10].
The first assert does not generate any error before since RRC takes minimum 20 ms for the attaching.

Best,
marco.


--
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.

Michele Polese

unread,
Apr 13, 2016, 5:11:05 AM4/13/16
to ns-3-...@googlegroups.com
Thank you very much for the reply!
Michele

You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/0pxFn8nV8as/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages