DRCL JavaSim API

drcl.inet.core
Class CoreServiceLayer

java.lang.Object
  |
  +--drcl.DrclObj
        |
        +--drcl.comp.Component
              |
              +--drcl.inet.CoreServiceLayer
                    |
                    +--drcl.inet.core.CoreServiceLayer
All Implemented Interfaces:
java.lang.Cloneable, InetConstants, ObjectDuplicable, java.io.Serializable

public class CoreServiceLayer
extends CoreServiceLayer

The container class for constructing a network node.

See Also:
Serialized Form

Inner classes inherited from class drcl.comp.Component
Component.LockPack
 
Fields inherited from class drcl.comp.Component
FLAG_COMPONENT_NOTIFICATION, FLAG_DEBUG_ENABLED, FLAG_DIRECT_OUTPUT_ENABLED, FLAG_ENABLED, FLAG_ERROR_ENABLED, FLAG_EVENT_ENABLED, FLAG_GARBAGE_DISPLAY_ENABLED, FLAG_GARBAGE_ENABLED, FLAG_PORT_NOTIFICATION, FLAG_STARTED, FLAG_STOPPED, FLAG_TRACE_ENABLED, FLAG_UNDEFINED_START, id, infoPort, lockHead, name, parent, PortGroup_DEFAULT_GROUP, PortGroup_EVENT, PortGroup_SERVICE, Root, Trace_DATA, Trace_SEND
 
Fields inherited from interface drcl.inet.InetConstants
BYTE_MODE, DEFAULT_BANDWIDTH, DEFAULT_BUFFER_SIZE, DEFAULT_MTU, EVENT_ID_CHANGED_PORT_ID, EVENT_IDENTITY_ADDED, EVENT_IDENTITY_REMOVED, EVENT_IF_NEIGHBOR_DOWN, EVENT_IF_NEIGHBOR_UP, EVENT_IF_PORT_ID, EVENT_MCAST_HOST_PORT_ID, EVENT_PKT_ARRIVAL, EVENT_PKT_ARRIVAL_PORT_ID, EVENT_RT_ENTRY_ADDED, EVENT_RT_ENTRY_MODIFIED, EVENT_RT_ENTRY_REMOVED, EVENT_RT_MCAST_CHANGED_PORT_ID, EVENT_RT_UCAST_CHANGED_PORT_ID, EVENT_VIF_NEIGHBOR_DOWN, EVENT_VIF_NEIGHBOR_UP, EVENT_VIF_PORT_ID, HOST_ENTRY_EXT, ID_CSL, MCAST_QUERY_PORT_ID, PACKET_MODE, PID_DV, PID_DVMRP, PID_HELLO, PID_IGMP, PID_OSPF, PID_RSVP, PID_TCP, PID_UDP, SERVICE_CONFIGSW_PORT_ID, SERVICE_ID_PORT_ID, SERVICE_IF_PORT_ID, SERVICE_MCAST_PORT_ID, SERVICE_RT_PORT_ID, UCAST_QUERY_PORT_ID
 
Constructor Summary
CoreServiceLayer()
           
CoreServiceLayer(java.lang.String id_)
           
 
Method Summary
 void addAddress(long addr_)
          Adds an identity to this core service layer.
 void addRTEntry(RTKey key_, RTEntry entry_, double timeout_)
          Adds a routing entry to this core service layer.
 double getBandwidth(int ifindex_)
          Returns the bandwidth of the specified interface.
 java.lang.String getBufferMode(int ifindex_)
           
 int getBufferSize(int ifindex_)
          Returns the buffer size of the specified interface.
 long getDefaultAddress()
          Returns the default identity in this core service layer.
 InterfaceInfo getInterfaceInfo(int ifindex_)
          Returns the interface information of the specified interface.
 InterfaceInfo[] getInterfaceInfos()
          Returns all the interface information in an array.
 double getLinkPropDelay(int ifindex_)
          Returns the emulated link propagation delay.
 int getMTU(int ifindex_)
          Returns the MTU of the specified interface.
protected  Port[][] getNAMPacketEventPorts()
          Returns the ports that output packets that are to be enqueued in and dequeued/dropped from the buffer.
 int getNumOfInterfaces()
          Returns the number of interfaces including virtual ones.
 int getNumOfPhysicalInterfaces()
          Returns the number of physical interfaces
 boolean hasRoutingCapability()
           
 java.lang.String info()
          Returns information regarding this component.
 boolean isLinkEmulationEnabled(int ifindex_)
           
protected  void portAdded(Port p_)
          Subclasses must implement this to adapt to ports being added at run-time.
 void removeAddress(long addr_)
          Removes an identity from this core service layer.
 void removeRTEntry(RTKey key_)
          Removes a routing entry from this core service layer.
 void setBandwidth(double bw_)
          Sets the bandwidth of all the interfaces.
 void setBandwidth(int ifindex_, double bw_)
          Sets the bandwidth of the specified interface.
 void setBuffer(int ifindex_, int bs_, java.lang.String mode_)
          Sets the buffer size of the specified interface.
 void setBuffer(int bs_, java.lang.String mode_)
          Sets the buffer size of all the interfaces.
 void setBufferMode(int ifindex_, java.lang.String mode_)
          Sets the buffer mode of the specified interface.
 void setBufferMode(java.lang.String mode_)
          Sets the buffer mode of all the interfaces.
 void setBufferSize(int bs_)
          Sets the buffer size of all the interfaces.
 void setBufferSize(int ifindex_, int bs_)
          Sets the buffer size of the specified interface.
 void setInterfaceInfo(int ifindex_, InterfaceInfo if_)
          Sets the interface information at the specified interface.
 void setInterfaceInfos(InterfaceInfo[] aa_)
          Sets the interface information of all the interfaces.
 void setLinkEmulationEnabled(int ifindex_, boolean enabled_)
           
 void setLinkPropDelay(int ifindex_, double delay_)
          Sets the emulated link propagation delay.
 void setMTU(int ifindex_, int mtu_)
          Sets the MTU of the specified interface.
 void setMTUs(int mtu_)
          Sets the MTUs of all interfaces.
 void setupVIF(int vifindex_, long peer_, int mtu_)
           
 void setupVIF(int vifindex_, long src_, long peer_, int mtu_)
           
 
Methods inherited from class drcl.inet.CoreServiceLayer
retrieveRTEntry
 
Methods inherited from class drcl.comp.Component
_resume, _start, _stop, addComponent, addComponent, addEventPort, addEventPort, addForkPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addServerPort, addServerPort, cancelFork, componentAdded, componentRemoved, connect, containsComponent, containsComponent, containsPort, debug, disconnectAll, disconnectAllPeers, disconnectAllPorts, drop, drop, duplicate, error, error, expose, exposeEventPorts, exposePort, exposePort, exposePort, exposePort, exposePort, findAvailable, findAvailable, findAvailable, finishing, fork, forkAt, getAllComponents, getAllPorts, getAllPorts, getAllWiresInside, getAllWiresInsideOut, getAllWiresOut, getComponent, getComponentFlag, getComponentFlag, getContract, getContractHT, getContractHT, getDebugFlagsInBinary, getDebugLevelNames, getForkManager, getID, getName, getParent, getPort, getPort, getRoot, getRuntime, getTime, iduplicate, isAncestorOf, isComponentNotificationEnabled, isContainer, isDebugEnabled, isDebugEnabledAt, isDirectOutputEnabled, isEnabled, isErrorNoticeEnabled, isEventExportEnabled, isGarbageDisplayEnabled, isGarbageEnabled, isPortNotificationEnabled, isPortRemovable, isStarted, isStopped, isTraceEnabled, lock, notify, notifyAll, operate, portRemoved, process, reboot, removeAll, removeAllComponents, removeAllPorts, removeAllPorts, removeComponent, removeComponent, removePort, removePort, removePort, reset, resume, run, sduplicate, send, sendAt, setComponentFlag, setComponentFlag, setComponentNotificationEnabled, setContract, setDebugEnabled, setDebugEnabled, setDebugEnabledAt, setDebugEnabledAt, setDebugEnabledAt, setDirectOutputEnabled, setDirectOutputEnabled, setEnabled, setErrorNoticeEnabled, setErrorNoticeEnabled, setEventExportEnabled, setEventExportEnabled, setExecutionBoundary, setGarbageDisplayEnabled, setGarbageDisplayEnabled, setGarbageEnabled, setGarbageEnabled, setID, setID, setName, setPort, setPort, setPortNotificationEnabled, setPortRemovable, setRuntime, setTraceEnabled, setTraceEnabled, sleepFor, sleepUntil, stop, toString, unexpose, unlock, useLocalForkManager, useLocalForkManager, wait
 
Methods inherited from class drcl.DrclObj
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoreServiceLayer

public CoreServiceLayer()

CoreServiceLayer

public CoreServiceLayer(java.lang.String id_)
Method Detail

info

public java.lang.String info()
Description copied from class: Component
Returns information regarding this component. Subclasses should override this method to provide useful information at run-time.
Overrides:
info in class CoreServiceLayer

hasRoutingCapability

public boolean hasRoutingCapability()
Overrides:
hasRoutingCapability in class CoreServiceLayer

addAddress

public void addAddress(long addr_)
Description copied from class: CoreServiceLayer
Adds an identity to this core service layer.
Overrides:
addAddress in class CoreServiceLayer

getDefaultAddress

public long getDefaultAddress()
Description copied from class: CoreServiceLayer
Returns the default identity in this core service layer.
Overrides:
getDefaultAddress in class CoreServiceLayer

removeAddress

public void removeAddress(long addr_)
Description copied from class: CoreServiceLayer
Removes an identity from this core service layer.
Overrides:
removeAddress in class CoreServiceLayer

setBandwidth

public void setBandwidth(int ifindex_,
                         double bw_)
Description copied from class: CoreServiceLayer
Sets the bandwidth of the specified interface.
Overrides:
setBandwidth in class CoreServiceLayer

setBandwidth

public void setBandwidth(double bw_)
Description copied from class: CoreServiceLayer
Sets the bandwidth of all the interfaces.
Overrides:
setBandwidth in class CoreServiceLayer

getBandwidth

public double getBandwidth(int ifindex_)
Description copied from class: CoreServiceLayer
Returns the bandwidth of the specified interface.
Overrides:
getBandwidth in class CoreServiceLayer

setBufferSize

public void setBufferSize(int bs_)
Description copied from class: CoreServiceLayer
Sets the buffer size of all the interfaces.
Overrides:
setBufferSize in class CoreServiceLayer
Following copied from class: drcl.inet.CoreServiceLayer
Parameters:
bs_ - buffer size in bytes or packets depending on the mode.

setBuffer

public void setBuffer(int bs_,
                      java.lang.String mode_)
Description copied from class: CoreServiceLayer
Sets the buffer size of all the interfaces.
Overrides:
setBuffer in class CoreServiceLayer
Following copied from class: drcl.inet.CoreServiceLayer
Parameters:
bs_ - buffer size in bytes or packets depending on the mode.
mode_ - can be either "packet" or "byte"

setBufferSize

public void setBufferSize(int ifindex_,
                          int bs_)
Description copied from class: CoreServiceLayer
Sets the buffer size of the specified interface.
Overrides:
setBufferSize in class CoreServiceLayer
Following copied from class: drcl.inet.CoreServiceLayer
Parameters:
bs_ - buffer size in bytes or packets depending on the mode.

setBuffer

public void setBuffer(int ifindex_,
                      int bs_,
                      java.lang.String mode_)
Description copied from class: CoreServiceLayer
Sets the buffer size of the specified interface.
Overrides:
setBuffer in class CoreServiceLayer
Following copied from class: drcl.inet.CoreServiceLayer
Parameters:
bs_ - buffer size in bytes or packets depending on the mode.
mode_ - can be either "packet" or "byte"

setBufferMode

public void setBufferMode(java.lang.String mode_)
Description copied from class: CoreServiceLayer
Sets the buffer mode of all the interfaces.
Overrides:
setBufferMode in class CoreServiceLayer
Following copied from class: drcl.inet.CoreServiceLayer
Parameters:
mode_ - can be either "packet" or "byte".

setBufferMode

public void setBufferMode(int ifindex_,
                          java.lang.String mode_)
Description copied from class: CoreServiceLayer
Sets the buffer mode of the specified interface.
Overrides:
setBufferMode in class CoreServiceLayer
Following copied from class: drcl.inet.CoreServiceLayer
Parameters:
mode_ - can be either "packet" or "byte".

getBufferMode

public java.lang.String getBufferMode(int ifindex_)
Overrides:
getBufferMode in class CoreServiceLayer

getBufferSize

public int getBufferSize(int ifindex_)
Description copied from class: CoreServiceLayer
Returns the buffer size of the specified interface.
Overrides:
getBufferSize in class CoreServiceLayer
Following copied from class: drcl.inet.CoreServiceLayer
Returns:
the buffer size in bytes or packets depending on the mode.
See Also:
CoreServiceLayer.getBufferMode(int)

setLinkEmulationEnabled

public void setLinkEmulationEnabled(int ifindex_,
                                    boolean enabled_)
Overrides:
setLinkEmulationEnabled in class CoreServiceLayer

isLinkEmulationEnabled

public boolean isLinkEmulationEnabled(int ifindex_)
Overrides:
isLinkEmulationEnabled in class CoreServiceLayer

setLinkPropDelay

public void setLinkPropDelay(int ifindex_,
                             double delay_)
Sets the emulated link propagation delay. Used with link emulation enabled at that interface.
Overrides:
setLinkPropDelay in class CoreServiceLayer

getLinkPropDelay

public double getLinkPropDelay(int ifindex_)
Returns the emulated link propagation delay. Used with link emulation enabled at that interface.
Overrides:
getLinkPropDelay in class CoreServiceLayer

setMTU

public void setMTU(int ifindex_,
                   int mtu_)
Description copied from class: CoreServiceLayer
Sets the MTU of the specified interface.
Overrides:
setMTU in class CoreServiceLayer

setMTUs

public void setMTUs(int mtu_)
Description copied from class: CoreServiceLayer
Sets the MTUs of all interfaces.
Overrides:
setMTUs in class CoreServiceLayer

getMTU

public int getMTU(int ifindex_)
Description copied from class: CoreServiceLayer
Returns the MTU of the specified interface.
Overrides:
getMTU in class CoreServiceLayer

setInterfaceInfo

public void setInterfaceInfo(int ifindex_,
                             InterfaceInfo if_)
Description copied from class: CoreServiceLayer
Sets the interface information at the specified interface.
Overrides:
setInterfaceInfo in class CoreServiceLayer

setInterfaceInfos

public void setInterfaceInfos(InterfaceInfo[] aa_)
Description copied from class: CoreServiceLayer
Sets the interface information of all the interfaces.
Overrides:
setInterfaceInfos in class CoreServiceLayer

getInterfaceInfo

public InterfaceInfo getInterfaceInfo(int ifindex_)
Description copied from class: CoreServiceLayer
Returns the interface information of the specified interface.
Overrides:
getInterfaceInfo in class CoreServiceLayer

getInterfaceInfos

public InterfaceInfo[] getInterfaceInfos()
Description copied from class: CoreServiceLayer
Returns all the interface information in an array.
Overrides:
getInterfaceInfos in class CoreServiceLayer

getNumOfInterfaces

public int getNumOfInterfaces()
Description copied from class: CoreServiceLayer
Returns the number of interfaces including virtual ones.
Overrides:
getNumOfInterfaces in class CoreServiceLayer

getNumOfPhysicalInterfaces

public int getNumOfPhysicalInterfaces()
Description copied from class: CoreServiceLayer
Returns the number of physical interfaces
Overrides:
getNumOfPhysicalInterfaces in class CoreServiceLayer

addRTEntry

public void addRTEntry(RTKey key_,
                       RTEntry entry_,
                       double timeout_)
Description copied from class: CoreServiceLayer
Adds a routing entry to this core service layer.
Overrides:
addRTEntry in class CoreServiceLayer

removeRTEntry

public void removeRTEntry(RTKey key_)
Description copied from class: CoreServiceLayer
Removes a routing entry from this core service layer.
Overrides:
removeRTEntry in class CoreServiceLayer

portAdded

protected void portAdded(Port p_)
Description copied from class: CoreServiceLayer
Subclasses must implement this to adapt to ports being added at run-time.
Overrides:
portAdded in class CoreServiceLayer

setupVIF

public void setupVIF(int vifindex_,
                     long peer_,
                     int mtu_)
Overrides:
setupVIF in class CoreServiceLayer

setupVIF

public void setupVIF(int vifindex_,
                     long src_,
                     long peer_,
                     int mtu_)
Overrides:
setupVIF in class CoreServiceLayer

getNAMPacketEventPorts

protected Port[][] getNAMPacketEventPorts()
Description copied from class: CoreServiceLayer
Returns the ports that output packets that are to be enqueued in and dequeued/dropped from the buffer. Returned is a 2-dimensional port array. The first dimension is outgoing interface. The second dimension consists of three ports: enqueue-event port, dequeue-event port, and drop-event port.
Overrides:
getNAMPacketEventPorts in class CoreServiceLayer

DRCL JavaSim API

Copyright © 2001 - DRCL, OSU     ~ Back to JavaSim Home ~