|
J-Sim v1.2.1-p7 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.Protocol
drcl.inet.core.Hello
Component that resides in a node and exchanges information with neighboring
nodes.
The information collectd is stored in the data structure defined in
InterfaceInfo. Other components may query for the neighbor
information by sending null to one of its port; in return,
the component sends back array of InterfaceInfo.
The component may run in two modes: dynamic or static. When in dynamic mode,
the neighbor information is maintained with soft-state approach, so that it
adapts to topology change. When topology is fixed, it would be better to
run it in static mode where information is exchanged once and the neighbor
information is never timed out. One may change the mode back and forth
during simulation at any time.
IFQuery,
InterfaceInfo,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class drcl.comp.Component |
Component.Locks |
| Field Summary | |
protected long |
myself
|
protected InterfaceInfo[] |
neighbors
The vector which keeps track of all the available interfaces of a node. |
| Fields inherited from class drcl.net.Module |
address, downPort, PortGroup_DOWN, PortGroup_UP, timerPort, upPort |
| Fields inherited from interface drcl.inet.core.InetCoreConstants |
CONFIG_PORT_ID, PULL_PORT_ID |
| Constructor Summary | |
Hello()
|
|
Hello(java.lang.String id_)
|
|
| Method Summary | |
InterfaceInfo |
_getInterfaceInfo(int ifIndex_)
Returns the information of a specific interface. |
protected InterfaceInfo[] |
_queryAll()
Hookup for Hellov extension. |
void |
_setInterfaceInfo(int ifindex_,
InterfaceInfo if_)
Sets the information of a specific interface. |
void |
_setInterfaceInfo(int ifindex_,
NetAddress local_,
NetAddress peer_)
Sets the information of a specific interface. |
void |
_setMTUs(int mtu_)
Sets the default MTU value. |
protected void |
_start()
Implements the startup method of ActiveComponent. |
void |
clear()
Clears the neighbor database. |
protected void |
dataArriveAtDownPort(java.lang.Object data_,
Port downPort_)
The handler invoked when a packet arrives at a "down" port. |
void |
duplicate(java.lang.Object source_)
Duplicates the content of source_, including ID, name, child components and connections among them, to this component. |
protected void |
fireEvent(java.lang.String evtName_,
int ifindex_,
NetAddress neighbor_)
Hookup for Hellov extension. |
static double |
getHelloRemovalTimeout()
|
static double |
getHelloTimeout()
|
InterfaceInfo[] |
getInterfaceInfos()
Returns the information of all interfaces. |
java.lang.String |
getName()
Returns the (informational) name of the component. |
java.lang.String |
info()
Returns information regarding this component. |
boolean |
isStaticEnabled()
Returns true if the static mode is enabled. |
protected void |
processOther(java.lang.Object data_,
Port inPort_)
The handler invoked when a packet arrived at a port other than the "up", "down" and timer ports. |
void |
reset()
Resets the component for being used anew. |
static void |
setHelloRemovalTimeout(double timeout_)
|
void |
setInterfaceInfos(InterfaceInfo[] aa_)
Sets the interface information for all interfaces. |
void |
setStaticEnabled(boolean v_)
Enables/disables the static mode. |
protected void |
timeout(java.lang.Object data_)
The handler invoked when a timeout event occurs. |
| Methods inherited from class drcl.net.Module |
cancelTimeout, dataArriveAtUpPort, deliver, getAddress, process, removeDefaultDownPort, removeDefaultUpPort, removeTimerPort, setAddress, setTimeout, setTimeoutAt |
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected InterfaceInfo[] neighbors
protected long myself
| Constructor Detail |
public Hello()
public Hello(java.lang.String id_)
| Method Detail |
public java.lang.String getName()
Component
getName in class Componentpublic static final void setHelloRemovalTimeout(double timeout_)
public static final double getHelloRemovalTimeout()
public static final double getHelloTimeout()
public void reset()
Component
reset in class Componentpublic void clear()
public void duplicate(java.lang.Object source_)
Component
duplicate in interface ObjectDuplicableduplicate in class Protocolprotected void _start()
ActiveComponent.
Specifically, when a Hello starts, it broadcasts its identity to its
neighbors via all the available interfaces.
_start in class Component
protected void fireEvent(java.lang.String evtName_,
int ifindex_,
NetAddress neighbor_)
Hellov extension.
protected void timeout(java.lang.Object data_)
Module
timeout in class ModuleModule.setTimeout(Object, double),
Module.setTimeoutAt(Object, double)
protected void processOther(java.lang.Object data_,
Port inPort_)
Module
processOther in class Protocolprotected InterfaceInfo[] _queryAll()
Hellov extension.
protected void dataArriveAtDownPort(java.lang.Object data_,
Port downPort_)
Module
dataArriveAtDownPort in class Modulepublic void setStaticEnabled(boolean v_)
public boolean isStaticEnabled()
public java.lang.String info()
Component
info in class Component
public void _setInterfaceInfo(int ifindex_,
NetAddress local_,
NetAddress peer_)
public void _setInterfaceInfo(int ifindex_,
InterfaceInfo if_)
public InterfaceInfo _getInterfaceInfo(int ifIndex_)
public InterfaceInfo[] getInterfaceInfos()
public void setInterfaceInfos(InterfaceInfo[] aa_)
public void _setMTUs(int mtu_)
|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||