DRCL J-Sim API

drcl.inet.protocol.aodv
Class UIUCInjector

java.lang.Object
  extended bydrcl.DrclObj
      extended bydrcl.comp.Component
          extended bydrcl.net.Module
              extended bydrcl.inet.protocol.aodv.UIUCInjector
All Implemented Interfaces:
java.lang.Cloneable, ObjectCloneable, ObjectDuplicable, java.io.Serializable

public class UIUCInjector
extends Module

UIUCInjector.java: The fault injection component for AODV packets. The code is ported from the ns-2 code written by Yury A. Perzov. This program accept three parameters, SINGLE|CONSTANT RREQ|RREP|RERR Bit. It can flip one bit in each AODV packets at each node. This componet is supposed to be placed below pktDispatcher and above LL. It should also be able to be placed in other positions but we haven't tested it yet.

Author:
Wei-peng Chen
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class drcl.comp.Component
Component.Locks
 
Field Summary
static int DEBUG_ALL
           
static int DEBUG_INJ
           
static int DEBUG_RERR
           
static int DEBUG_RREP
           
static int DEBUG_RREQ
           
 
Fields inherited from class drcl.net.Module
downPort, PortGroup_DOWN, PortGroup_UP, upPort
 
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, locks, name, parent, PortGroup_DEFAULT_GROUP, PortGroup_EVENT, PortGroup_SERVICE, Root, Trace_DATA, Trace_SEND
 
Constructor Summary
UIUCInjector()
           
 
Method Summary
 void dataArriveAtUpPort(java.lang.Object data_, Port upPort_)
          Handle data arriving at the upPort from the component PktDispatcher.
 java.lang.String[] getDebugLevelNames()
          Returns the names of defined debug levels; subclasses should override this method if debug levels are defined.
 java.lang.String getName()
          Returns the (informational) name of the component.
 void inject(java.lang.String inj_type_, java.lang.String pkt_type_, java.lang.String bit_)
          Inject a bit flip to the packet header of AODV packet.
 void injectAODVUU(AODV_Packet pkt_)
           
 java.lang.String toString()
          Returns the full path of the component.
 
Methods inherited from class drcl.net.Module
cancelTimeout, duplicate, setTimeout, setTimeoutAt
 
Methods inherited from class drcl.comp.Component
addComponent, addComponent, addEventPort, addEventPort, addForkPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addServerPort, addServerPort, cancelFork, connect, containsComponent, containsComponent, containsPort, debug, disconnectAll, disconnectAllPeers, disconnectAllPorts, drop, drop, error, error, expose, exposeEventPorts, exposePort, exposePort, exposePort, exposePort, exposePort, findAvailable, findAvailable, findAvailable, fork, forkAt, getAllComponents, getAllPorts, getAllPorts, getAllWiresInside, getAllWiresInsideOut, getAllWiresOut, getComponent, getComponentFlag, getComponentFlag, getContract, getContractHT, getContractHT, getDebugFlagsInBinary, getID, getParent, getPort, getPort, getRoot, getTime, iduplicate, info, isAncestorOf, isContainer, isDebugEnabled, isDebugEnabledAt, isDirectlyRelatedTo, isDirectOutputEnabled, isEnabled, isErrorNoticeEnabled, isEventExportEnabled, isGarbageDisplayEnabled, isGarbageEnabled, isPortRemovable, isStarted, isStopped, isTraceEnabled, lock, notify, notifyAll, operate, reboot, removeAll, removeAllComponents, removeAllPorts, removeAllPorts, removeComponent, removeComponent, removePort, removePort, removePort, reset, resume, run, sduplicate, send, sendAt, setComponentFlag, setComponentFlag, setDebugEnabled, setDebugEnabled, setDebugEnabledAt, setDebugEnabledAt, setDebugEnabledAt, setDirectOutputEnabled, setDirectOutputEnabled, setEnabled, setErrorNoticeEnabled, setErrorNoticeEnabled, setEventExportEnabled, setEventExportEnabled, setExecutionBoundary, setGarbageDisplayEnabled, setGarbageDisplayEnabled, setGarbageEnabled, setGarbageEnabled, setID, setID, setName, setPort, setPort, setTraceEnabled, setTraceEnabled, sleepFor, sleepUntil, stop, unexpose, unlock, useLocalForkManager, useLocalForkManager, wait
 
Methods inherited from class drcl.DrclObj
clone
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG_ALL

public static final int DEBUG_ALL
See Also:
Constant Field Values

DEBUG_INJ

public static final int DEBUG_INJ
See Also:
Constant Field Values

DEBUG_RREQ

public static final int DEBUG_RREQ
See Also:
Constant Field Values

DEBUG_RREP

public static final int DEBUG_RREP
See Also:
Constant Field Values

DEBUG_RERR

public static final int DEBUG_RERR
See Also:
Constant Field Values
Constructor Detail

UIUCInjector

public UIUCInjector()
Method Detail

getDebugLevelNames

public java.lang.String[] getDebugLevelNames()
Description copied from class: Component
Returns the names of defined debug levels; subclasses should override this method if debug levels are defined.

Overrides:
getDebugLevelNames in class Component

getName

public java.lang.String getName()
Description copied from class: Component
Returns the (informational) name of the component.

Overrides:
getName in class Component

toString

public java.lang.String toString()
Description copied from class: Component
Returns the full path of the component.

Overrides:
toString in class Component

inject

public void inject(java.lang.String inj_type_,
                   java.lang.String pkt_type_,
                   java.lang.String bit_)
Inject a bit flip to the packet header of AODV packet. It can be extented to other types of packets.


dataArriveAtUpPort

public void dataArriveAtUpPort(java.lang.Object data_,
                               Port upPort_)
Handle data arriving at the upPort from the component PktDispatcher. Note the data_ should be the type: InetPacket from PktDispatcher.

Parameters:
data_ - message body arriving at the down port.
upPort_ - up port at which messages arrive.

injectAODVUU

public void injectAODVUU(AODV_Packet pkt_)

DRCL J-Sim API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~