Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class mil.navy.nps.awt.AwtEspduSender

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--mil.navy.nps.awt.AwtEspduSender

public class AwtEspduSender
extends java.applet.Applet
implements java.awt.event.ActionListener, java.awt.event.ItemListener
See Also:
Serialized Form

Field Summary
static java.lang.String DATA_LAYOUT
           
static boolean DEBUG
           
static java.lang.String DEFAULT_ENTITY_ID
           
static java.lang.String DEFAULT_EX_ID
           
static java.lang.String DEFAULT_FREQUENCY
           
static java.lang.String DEFAULT_MARKING
           
static java.lang.String DEFAULT_MCAST
           
static java.lang.String DEFAULT_PORT
           
static java.lang.String DEFAULT_TIMELIMIT
           
static java.lang.String DEFAULT_UNICAST_DEST_ADDR
           
static java.lang.String DEFAULT_UNICAST_DEST_PORT
           
static java.lang.String DEFUALT_SITE_APP_ID
           
java.awt.TextField entityID
           
java.awt.TextArea espduData
           
java.awt.TextField exerciseID
           
java.awt.TextField frequency
           
static short HIGH_BYTE_MASK
           
static short LOW_BYTE_MASK
           
boolean m_fStandAlone
           
java.awt.TextField marking
           
static int MAX_TRANSMIT_TIME
           
java.awt.TextField mcastAddress
           
java.awt.Checkbox multicastCheckbox
           
java.awt.TextField packetsSent
           
java.awt.TextField port
           
static java.lang.String RETURN_STRING
           
boolean sendingPDUs
           
java.awt.TextField siteApplicationID
           
java.awt.CheckboxGroup socketTypeRadio
           
java.awt.Button startButton
           
java.awt.Button stopButton
           
java.awt.TextField timeLimit
           
java.awt.Choice ttl
           
java.awt.Checkbox unicastCheckbox
           
java.awt.TextField unicastDestAddress
           
java.awt.TextField unicastDestPort
           
 
Fields inherited from class java.awt.Panel
panelLayout
 
Fields inherited from class java.awt.Container
component, containerListener, layoutMgr, ncomponents
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, hasFocus, height, incRate, inputMethodListener, inputMethodListenerK, isInc, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, newEventsOnly, parent, peer, popups, prefSize, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
Constructor Summary
AwtEspduSender()
           
 
Method Summary
void actionPerformed(java.awt.event.ActionEvent ae)
          ActionListener for the start and stop buttons.
static void debug(java.lang.String pDebugMessage)
           
void destroy()
           
short[] fieldValue(java.lang.String pFieldString)
          Pure chrome.
java.lang.String getAppletInfo()
           
int[] getBytesInIPAddress(java.net.InetAddress pAddress)
          This is a utility that really should be in another class.
void init()
           
void itemStateChanged(java.awt.event.ItemEvent e)
          itemStateChanged is the implementation of the interface ItemListener, which is used by checkboxes.
static void main(java.lang.String[] args)
           
void paint(java.awt.Graphics g)
           
void sendPDUs()
           
void start()
           
void stop()
           
 
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
, addNotify, constructComponentName
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addNotify, applyOrientation, countComponents, deliverEvent, dispatchEventImpl, doLayout, eventEnabled, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponentAt, getComponentAt, getComponent, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, nextFocus, paintComponents, paint, paramString, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, printComponents, print, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, removeAll, remove, remove, removeContainerListener, removeNotify, setFocusOwner, setLayout, transferFocus, update, validate, validateTree
 
Methods inherited from class java.awt.Component
, action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, constructComponentName, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, dispatchEventImpl, doLayout, enable, enable, enableEvents, enableInputMethods, eventEnabled, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getNativeContainer, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paint, paramString, postEvent, postsOldMouseEvents, preferredSize, prepareImage, prepareImage, printAll, print, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Field Detail

m_fStandAlone

boolean m_fStandAlone

DEBUG

public static final boolean DEBUG

DEFAULT_MCAST

public static final java.lang.String DEFAULT_MCAST

DEFAULT_PORT

public static final java.lang.String DEFAULT_PORT

DEFUALT_SITE_APP_ID

public static final java.lang.String DEFUALT_SITE_APP_ID

DEFAULT_ENTITY_ID

public static final java.lang.String DEFAULT_ENTITY_ID

DEFAULT_FREQUENCY

public static final java.lang.String DEFAULT_FREQUENCY

DEFAULT_MARKING

public static final java.lang.String DEFAULT_MARKING

DEFAULT_UNICAST_DEST_PORT

public static final java.lang.String DEFAULT_UNICAST_DEST_PORT

DEFAULT_UNICAST_DEST_ADDR

public static final java.lang.String DEFAULT_UNICAST_DEST_ADDR

DEFAULT_TIMELIMIT

public static final java.lang.String DEFAULT_TIMELIMIT

DEFAULT_EX_ID

public static final java.lang.String DEFAULT_EX_ID

DATA_LAYOUT

public static final java.lang.String DATA_LAYOUT

RETURN_STRING

public static final java.lang.String RETURN_STRING

MAX_TRANSMIT_TIME

public static final int MAX_TRANSMIT_TIME

HIGH_BYTE_MASK

public static final short HIGH_BYTE_MASK

LOW_BYTE_MASK

public static final short LOW_BYTE_MASK

sendingPDUs

boolean sendingPDUs

espduData

java.awt.TextArea espduData

socketTypeRadio

java.awt.CheckboxGroup socketTypeRadio

multicastCheckbox

java.awt.Checkbox multicastCheckbox

unicastCheckbox

java.awt.Checkbox unicastCheckbox

mcastAddress

java.awt.TextField mcastAddress

port

java.awt.TextField port

unicastDestAddress

java.awt.TextField unicastDestAddress

unicastDestPort

java.awt.TextField unicastDestPort

ttl

java.awt.Choice ttl

siteApplicationID

java.awt.TextField siteApplicationID

entityID

java.awt.TextField entityID

marking

java.awt.TextField marking

exerciseID

java.awt.TextField exerciseID

frequency

java.awt.TextField frequency

packetsSent

java.awt.TextField packetsSent

timeLimit

java.awt.TextField timeLimit

startButton

java.awt.Button startButton

stopButton

java.awt.Button stopButton
Constructor Detail

AwtEspduSender

public AwtEspduSender()
Method Detail

debug

public static void debug(java.lang.String pDebugMessage)

getBytesInIPAddress

public int[] getBytesInIPAddress(java.net.InetAddress pAddress)
This is a utility that really should be in another class. In an ideal world, this would have been added as a category to InetAddress, if we were using Objective-C. It returns a byte array corresponding to the string "131.120.7.205", or whatever, with byte 0 = 131, byte 1 = 120, etc.

Need to use an array of ints rather than bytes here, since bytes are unsigned, and something like 131 will wrap around, or cause a number format error when converting from a string. A short will also wrap to negative numbers when we bit mask a couple bytes together.


main

public static void main(java.lang.String[] args)

getAppletInfo

public java.lang.String getAppletInfo()
Overrides:
getAppletInfo in class java.applet.Applet

init

public void init()
Overrides:
init in class java.applet.Applet

destroy

public void destroy()
Overrides:
destroy in class java.applet.Applet

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class java.awt.Container

start

public void start()
Overrides:
start in class java.applet.Applet

stop

public void stop()
Overrides:
stop in class java.applet.Applet

fieldValue

public short[] fieldValue(java.lang.String pFieldString)
Pure chrome. Let the user enter a field in the form of "131.120" and automatically translate it to an integer. Of course, if the field is already in the form of an integer, leave it alone.

sendPDUs

public void sendPDUs()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ae)
ActionListener for the start and stop buttons. This uses the AWT 1.1 event model, and implemens the ActionListener interface.
Specified by:
actionPerformed(java.awt.event.ActionEvent) in interface java.awt.event.ActionListener

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged is the implementation of the interface ItemListener, which is used by checkboxes. The checkboxes add us as a listener, and we get their events. This is based on the Java 1.1 event model.
Specified by:
itemStateChanged(java.awt.event.ItemEvent) in interface java.awt.event.ItemListener

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD