Bug 2130 - Allow SimpleChannel to simulate hidden terminals.
Allow SimpleChannel to simulate hidden terminals.
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: network
ns-3-dev
All All
: P5 enhancement
Assigned To: ns-bugs
:
Depends on:
Blocks: 1941
  Show dependency treegraph
 
Reported: 2015-05-30 17:39 EDT by Tommaso Pecorella
Modified: 2015-06-11 14:22 EDT (History)
2 users (show)

See Also:


Attachments
Ban / Un-Ban (3.62 KB, text/plain)
2015-05-30 17:39 EDT, Tommaso Pecorella
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tommaso Pecorella 2015-05-30 17:39:24 EDT
Created attachment 2054 [details]
Ban / Un-Ban

In tests it is often necessary to mimic a wireless system where one node can "see" two other nodes, but these nodes can not communicate.
This happens if, for example, the three nodes are in a line topology.

This patch adds to functions: Ban and UnBan. The first blocks all the communications between A and B (unidirectional), the second restores them.
Comment 1 Tom Henderson 2015-06-11 12:53:09 EDT
+1
Comment 2 Tommaso Pecorella 2015-06-11 13:18:35 EDT
changeset:   11438:dfbb52d8fd44
Comment 3 John Abraham 2015-06-11 13:39:52 EDT
Hi,

Can we clarify what was the original intention of SimpleChannel?

Can we model, hidden-terminals through a combination of Error models and loss models?

Can SimpleChannel be sub-classed to provide hidden-terminal?

Just trying to think out loud here.
john
Comment 4 Tommaso Pecorella 2015-06-11 13:50:00 EDT
Hi,

it could have been done using error models. However, the error models are MAC address-agnostic. I.e., it's hard to build an error model saying "trash all the packets from X to Y". It's possible, but I didn't like it. The same goes for loss models.

The MatrixPropagatinLossModel can do a similar thing, but it is based on a Mobility object pairs, which is more general than a MAC address.

That's why I added it to the SimpleChannel: it's more general.

About what the SimpleChannel is for... easy: it's there for the tests, much like SimpleNetDevice, PacketSocketClient and PacketSocketServer.
It's ok to use it for other purposes, but it's really tailored for the tests.

Cheers,

T.

(In reply to John Abraham from comment #3)
> Hi,
> 
> Can we clarify what was the original intention of SimpleChannel?
> 
> Can we model, hidden-terminals through a combination of Error models and
> loss models?
> 
> Can SimpleChannel be sub-classed to provide hidden-terminal?
> 
> Just trying to think out loud here.
> john
Comment 5 John Abraham 2015-06-11 14:22:59 EDT
(In reply to Tommaso Pecorella from comment #4)
> Hi,
> 
> it could have been done using error models. However, the error models are
> MAC address-agnostic. I.e., it's hard to build an error model saying "trash
> all the packets from X to Y". It's possible, but I didn't like it. The same
> goes for loss models.
> 
> The MatrixPropagatinLossModel can do a similar thing, but it is based on a
> Mobility object pairs, which is more general than a MAC address.
> 
> That's why I added it to the SimpleChannel: it's more general.
> 
> About what the SimpleChannel is for... easy: it's there for the tests, much
> like SimpleNetDevice, PacketSocketClient and PacketSocketServer.
> It's ok to use it for other purposes, but it's really tailored for the tests.
> 
> Cheers,
> 
> T.
> 
> (In reply to John Abraham from comment #3)
> > Hi,
> > 
> > Can we clarify what was the original intention of SimpleChannel?
> > 
> > Can we model, hidden-terminals through a combination of Error models and
> > loss models?
> > 
> > Can SimpleChannel be sub-classed to provide hidden-terminal?
> > 
> > Just trying to think out loud here.
> > john


I was actually referring to Custom Error/Loss models, which keep track of receiver nodes that should be blocked for a given sender.

At what point do we decide we want to add/stop adding channel properties to SimpleChannel?
If we don't define the role of SimpleChannel/NetDevice clearly there will be no limit of properties users want.