|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.DrclObj
drcl.comp.Component
drcl.net.Module
drcl.inet.mac.Channel
This class simulates a shared wireless channel. A Channel component contains
a vector of Ports as well as an array of boolean flags.
If a mobile node's wireless interface card is working on a given channel, the downPort
of the WirelessPhy component is connected to the corresponding port of the Channel component
and the flag is set correspondingly.
The Channel component also contains a trackerPort which should be connected to the channelPort
of a NodePositionTracker component.
When a data packet is sent from a wireless interface card to the Channel component, the Channel
component consults the NodePositionTracker to decide to which others nodes
that data packet should be sent. How the neighbouring nodes are decided can be find in
NodePositionTracker. Whether that data packet should be really
received(decoded) by the receivers shall be further determined at each WirelessPhy component respectively.
In this way, a shared medium is simulated without unnecessarily passing each data packet to all nodes listenning to that channel.
NodePositionTracker,
NodeChannelContract,
WirelessPhy,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class drcl.comp.Component |
Component.Locks |
| Field Summary | |
int |
nGrids
A variable indicating what is the maximum distance if an subarea is considered as the neightbouring grid to the current position of the sender node. |
| Fields inherited from class drcl.net.Module |
downPort, PortGroup_DOWN, PortGroup_UP, upPort |
| Constructor Summary | |
Channel()
Constructor. |
|
| Method Summary | |
void |
attachPort(int nid,
Port port_)
Attaches the nid-th element in the port vector to the Port port_. |
void |
duplicate(java.lang.Object source_)
Duplicates the content of source_, including ID, name, child components and connections among them, to this component. |
java.lang.String |
getName()
Returns the (informational) name of the component. |
void |
setCapacity(int n)
Sets the capacity (the maximal number of wireless interface cards to communicate on this channel). |
void |
setnGrids(int n)
Set nGrids variable. |
| Methods inherited from class drcl.net.Module |
cancelTimeout, setTimeout, setTimeoutAt |
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public int nGrids
| Constructor Detail |
public Channel()
| Method Detail |
public void setnGrids(int n)
n - - grid sizepublic void setCapacity(int n)
public void attachPort(int nid,
Port port_)
port_.
nid - the node id of the node whose wireless interface card (WirelessPhy) is working on this channel.port_ - the downport of the WirelessPhy component which is working on this channel.public java.lang.String getName()
Component
getName in class Componentpublic void duplicate(java.lang.Object source_)
Component
duplicate in interface ObjectDuplicableduplicate in class Module
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||