DRCL J-Sim API

drcl.net.tool
Class TrafficMonitor2

java.lang.Object
  extended bydrcl.DrclObj
      extended bydrcl.comp.Component
          extended bydrcl.comp.Extension
              extended bydrcl.comp.tool.CountMonitor2
                  extended bydrcl.net.tool.TrafficMonitor2
All Implemented Interfaces:
java.lang.Cloneable, ObjectCloneable, ObjectDuplicable, java.io.Serializable

public class TrafficMonitor2
extends CountMonitor2

This component monitors the incoming traffic and outputs its throughput and packet loss rate. The implementation is moved to CountMonitor2 for general applications. This component remains for backward compatibility.

This component works the same as TrafficMonitor except that it also calculates packet loss rate in the current window, provided that the packets contain correct ordering information. It calculates the loss rate by summing up the "gaps" found between the ordering information in the packets in the current window. The calculation may not be correct if packets may arrive out of order in different windows.

Same as TrafficMonitor, this component is configured by two parameters: the window size (default one second) and the output interval (default 0.5 second). It can operate in the "byte" mode, the "packet" mode, or both. The throughput events are exported at either the bytecount@ port or the pktcount@ port, and the loss rate exported at either the byteloss@ port or the pktloss@ port, both in percentage(%).

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class drcl.comp.Component
Component.Locks
 
Field Summary
static java.lang.String BYTE_COUNT_EVENT
          Name of the byte-mode throughput events.
static java.lang.String BYTE_COUNT_PORT_ID
          ID of the port to export the byte-mode throughput events.
static java.lang.String BYTE_LOSS_EVENT
          Name of the byte-mode packet-loss-rate events.
static java.lang.String BYTE_LOSS_PORT_ID
          ID of the port to export the byte-mode packet-loss-rate events.
static java.lang.String PKT_COUNT_EVENT
          Name of the packet-mode throughput events.
static java.lang.String PKT_COUNT_PORT_ID
          ID of the port to export the packet-mode throughput events.
static java.lang.String PKT_LOSS_EVENT
          Name of the packet-mode packet-loss-rate events.
static java.lang.String PKT_LOSS_PORT_ID
          ID of the port to export the packet-mode packet-loss-rate events.
 
Fields inherited from class drcl.comp.tool.CountMonitor2
OBJ_COUNT_PORT_ID, OBJ_LOSS_PORT_ID, SIZE_COUNT_PORT_ID, SIZE_LOSS_PORT_ID
 
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
TrafficMonitor2()
           
TrafficMonitor2(java.lang.String id_)
           
 
Methods inherited from class drcl.comp.tool.CountMonitor2
configure, duplicate, getOutputInterval, getWindowSize, info, isObjModeEnabled, isSizeModeEnabled, reset, setEventNames, setObjectEventNames, setObjModeEnabled, setOutputInterval, setSizeEventNames, setSizeModeEnabled, setWindowSize
 
Methods inherited from class drcl.comp.Extension
isExtensionEnabled, setExtensionEnabled
 
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, getDebugLevelNames, getID, getName, getParent, getPort, getPort, getRoot, getTime, iduplicate, 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, 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, toString, 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

PKT_COUNT_PORT_ID

public static final java.lang.String PKT_COUNT_PORT_ID
ID of the port to export the packet-mode throughput events.

See Also:
Constant Field Values

PKT_LOSS_PORT_ID

public static final java.lang.String PKT_LOSS_PORT_ID
ID of the port to export the packet-mode packet-loss-rate events.

See Also:
Constant Field Values

BYTE_COUNT_PORT_ID

public static final java.lang.String BYTE_COUNT_PORT_ID
ID of the port to export the byte-mode throughput events.

See Also:
Constant Field Values

BYTE_LOSS_PORT_ID

public static final java.lang.String BYTE_LOSS_PORT_ID
ID of the port to export the byte-mode packet-loss-rate events.

See Also:
Constant Field Values

PKT_COUNT_EVENT

public static final java.lang.String PKT_COUNT_EVENT
Name of the packet-mode throughput events.

See Also:
Constant Field Values

PKT_LOSS_EVENT

public static final java.lang.String PKT_LOSS_EVENT
Name of the packet-mode packet-loss-rate events.

See Also:
Constant Field Values

BYTE_COUNT_EVENT

public static final java.lang.String BYTE_COUNT_EVENT
Name of the byte-mode throughput events.

See Also:
Constant Field Values

BYTE_LOSS_EVENT

public static final java.lang.String BYTE_LOSS_EVENT
Name of the byte-mode packet-loss-rate events.

See Also:
Constant Field Values
Constructor Detail

TrafficMonitor2

public TrafficMonitor2()

TrafficMonitor2

public TrafficMonitor2(java.lang.String id_)

DRCL J-Sim API

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