15 years, 2 months ago
(2010-02-16 15:38:54 UTC)
#2
Updated
http://codereview.appspot.com/207104/diff/1/3
File src/common/propagation-loss-model.cc (right):
http://codereview.appspot.com/207104/diff/1/3#newcode781
src/common/propagation-loss-model.cc:781: std::map<NodePair,
double>::const_iterator i = m_loss.find (std::make_pair (na, nb));
On 2010/02/16 15:15:14, Mathieu Lacage wrote:
> it would be easy to change the code in a single lookup if you made sure that
na
> < nb all the time. I don't know if it matters though
Well, extra lookup was actually a bug.
http://codereview.appspot.com/207104/diff/1/3#newcode783
src/common/propagation-loss-model.cc:783: if (i == m_loss.end ())
On 2010/02/16 15:15:14, Mathieu Lacage wrote:
> missing braces
Done.
http://codereview.appspot.com/207104/diff/1/3#newcode786
src/common/propagation-loss-model.cc:786: if (i != m_loss.end ())
On 2010/02/16 15:15:14, Mathieu Lacage wrote:
> same
Done.
http://codereview.appspot.com/207104/diff/1/4
File src/common/propagation-loss-model.h (right):
http://codereview.appspot.com/207104/diff/1/4#newcode487
src/common/propagation-loss-model.h:487: void SetLoss (Ptr<Node> a, Ptr<Node> b,
double loss, bool symmetric = true);
On 2010/02/16 15:15:14, Mathieu Lacage wrote:
> Is there a reason why don't you specify a and b as Ptr<MobilityModel> ?
I think user shouldn't care about mobility models in this case (since nothing
depends on mobility in fact). I have removed extra GetObject<MobilityModel>() in
the updated version.
I think this patch is ok. One minor comment below. Furthermore, it would be good ...
15 years, 2 months ago
(2010-02-16 16:16:35 UTC)
#4
I think this patch is ok. One minor comment below. Furthermore, it would be good
to have an example program to show how users are supposed to interact with this
model.
http://codereview.appspot.com/207104/diff/1/4
File src/common/propagation-loss-model.h (right):
http://codereview.appspot.com/207104/diff/1/4#newcode487
src/common/propagation-loss-model.h:487: void SetLoss (Ptr<Node> a, Ptr<Node> b,
double loss, bool symmetric = true);
On 2010/02/16 15:38:54, Pavel Boyko wrote:
> On 2010/02/16 15:15:14, Mathieu Lacage wrote:
> > Is there a reason why don't you specify a and b as Ptr<MobilityModel> ?
>
> I think user shouldn't care about mobility models in this case (since nothing
> depends on mobility in fact). I have removed extra GetObject<MobilityModel>()
in
> the updated version.
Good point, but the user is supposed to create mobility objects in any case,
right? If so, maybe it makes sense to use Ptr<Mobility>, so the user is enforced
to create them.
15 years, 2 months ago
(2010-02-16 16:24:44 UTC)
#5
http://codereview.appspot.com/207104/diff/1/4
File src/common/propagation-loss-model.h (right):
http://codereview.appspot.com/207104/diff/1/4#newcode487
src/common/propagation-loss-model.h:487: void SetLoss (Ptr<Node> a, Ptr<Node> b,
double loss, bool symmetric = true);
On 2010/02/16 16:16:35, Nicola Baldo wrote:
> Good point, but the user is supposed to create mobility objects in any case,
> right? If so, maybe it makes sense to use Ptr<Mobility>, so the user is
enforced
> to create them.
I find NS_ASSERT (senderMobility != 0) in YansWifiChannel::Send () enough to
enforce user to create mobility models :)
On Tue, Feb 16, 2010 at 5:24 PM, <pavel.boyko@gmail.com> wrote: > > I find NS_ASSERT ...
15 years, 2 months ago
(2010-02-22 10:56:02 UTC)
#6
On Tue, Feb 16, 2010 at 5:24 PM, <pavel.boyko@gmail.com> wrote:
>
> I find NS_ASSERT (senderMobility != 0) in YansWifiChannel::Send ()
> enough to enforce user to create mobility models :)
>
> http://codereview.appspot.com/207104/show
>
I am fine if you leave the code as is, but please put at least one
example program, so that it is clearly shown to the users that they
need to create mobility objects anyway.
Nicola
On 2010/03/05 12:29:48, Pavel Boyko wrote: > I have added simple example, please take a ...
15 years, 2 months ago
(2010-03-05 17:57:09 UTC)
#9
On 2010/03/05 12:29:48, Pavel Boyko wrote:
> I have added simple example, please take a look. Unfortunately there seems
to
> be a bug in flow monitor, so please consider applying patch from
> http://www.nsnam.org/bugzilla/show_bug.cgi?id=834 to make the example working.
>
Cool! I think it is a very interesting example!
+1 to merge after your patch for bug 834 has been committed.
Nicola
Issue 207104: Matrix propagation loss model
Created 15 years, 2 months ago by Pavel Boyko
Modified 15 years, 2 months ago
Reviewers: Mathieu Lacage, Nicola Baldo, Josh Pelkey
Base URL:
Comments: 10