|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.clackrouter.component.base.ClackComponent net.clackrouter.component.extension.UDPSource
public class UDPSource
Generates uniform user-specified UDP traffic at a given rate.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.clackrouter.component.base.ClackComponent |
---|
ClackComponent.Waiter |
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_PAYLOAD
|
static int |
DEFAULT_PORT
|
static int |
DEFAULT_SENDING_RATE
|
static int |
NUM_PORTS
|
static int |
PORT_OUT
|
Fields inherited from class net.clackrouter.component.base.ClackComponent |
---|
componentCell, m_has_error, m_log, m_name, m_num_ports, m_packetcount_in, m_packetcount_out, m_ports, mListeners, mRouter, pendingError, SIGNAL_ERROR_LEN_MSEC, UNIQUE_COUNT, view |
Constructor Summary | |
---|---|
UDPSource(Router r,
java.lang.String name)
|
Method Summary | |
---|---|
void |
poll()
override poll() to send UDP packets at a regular rate |
void |
setDestinationAddress(java.net.InetAddress dst)
|
void |
setDestinationPort(int dPort)
Set destination port for this UDP traffic |
void |
setSendingRate(int r)
Sets the rate (as a percentage of full router speed) at which the UDP source sends packets |
void |
setSourceAddress(java.net.InetAddress src)
|
void |
setSourcePort(int sPort)
Set source port for this UDP traffic |
void |
setUDPPayload(java.lang.String load)
Set the contents of the UDP packets to be sent. |
protected void |
setupPorts(int numports)
Allocates an array of ClackPort objects to be used by this component |
Methods inherited from class net.clackrouter.component.base.ClackComponent |
---|
acceptPacket, createCopy, createInputPullPort, createInputPushPort, createOutputPullPort, createOutputPushPort, error, fireListeners, getColor, getComponentCell, getHierarchicalView, getLog, getName, getNumPorts, getPacketCountIn, getPacketCountOut, getPendingError, getPort, getPropertiesView, getRouter, getSerializableProperties, getTime, getTypeName, getUniqueCount, getView, handlePullRequest, hasError, initializeProperties, isHierarchical, isModifying, log, notifyAlarm, registerListener, sendOutPort, setAlarm, setComponentCell, setName, setPendingError, setView, showErrorDialog, signalError, try_repaint, unregisterListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int PORT_OUT
public static int NUM_PORTS
public static java.lang.String DEFAULT_PAYLOAD
public static int DEFAULT_PORT
public static int DEFAULT_SENDING_RATE
Constructor Detail |
---|
public UDPSource(Router r, java.lang.String name)
Method Detail |
---|
protected void setupPorts(int numports)
ClackComponent
setupPorts
in class ClackComponent
numports
- the number of ports to createpublic void poll()
poll
in class ClackComponent
public void setSourceAddress(java.net.InetAddress src)
public void setDestinationAddress(java.net.InetAddress dst)
public void setUDPPayload(java.lang.String load)
public void setSourcePort(int sPort)
public void setDestinationPort(int dPort)
public void setSendingRate(int r)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |