Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mil.navy.nps.dis.PduElement | +--mil.navy.nps.dis.EventID
Note that I've flattened the object, such that the site and application ID are in this object, rather than in an object/class of their own. This is a questionable move.
It inherits from PduElement, the abstract class that all non-PDUs inherit from. As usual, it knows how to serialize and deserialize itself, clone itself, etc.
The event ID is used to keep events straight. It is employed in the fire and detonation PDUs, for example.
This is extremely similar to the EventID class. It includes a hash function for the object, in case we want to use this as a key in a hash table.
Field Summary | |
mil.navy.nps.util.UnsignedShort | applicationID
Application Identifier Field - Each simulation application at a DIS site shall be assigned an application identifier unique within that site. |
mil.navy.nps.util.UnsignedShort | eventID
Event Indentifier Field - A general purpose Identifier used to uniquely identify up to 65535 items. |
mil.navy.nps.util.UnsignedShort | siteID
Site Identifier Field - Each DIS site shall be assigned a unique Site Identifier. |
static int | sizeOf
Constant value--size of an EventID as written out to the wire. |
Constructor Summary | |
EventID()
Default constructor--fills with zeros for all values. |
|
EventID(short pSiteID,
short pApplicationID,
short pEventID)
|
Method Summary | |
java.lang.Object | clone()
|
void | deSerialize(java.io.DataInputStream inputStream)
|
boolean | equals(java.lang.Object obj)
Makes a "numeric equality" test. |
mil.navy.nps.util.UnsignedShort | getApplicationID()
|
mil.navy.nps.util.UnsignedShort | getEventID()
|
mil.navy.nps.util.UnsignedShort | getSiteID()
|
int | hashCode()
This provides a hash code for the object. |
int | length()
|
void | printValues(int indentLevel,
java.io.PrintStream printStream)
|
void | serialize(java.io.DataOutputStream outputStream)
|
void | setApplicationID(mil.navy.nps.util.UnsignedShort pApplicationID)
|
void | setApplicationID(int pApplicationID)
|
void | setEventID(mil.navy.nps.util.UnsignedShort pEventID)
|
void | setEventID(int pEventID)
|
void | setSiteID(mil.navy.nps.util.UnsignedShort pSiteID)
|
void | setSiteID(int pSiteID)
|
Methods inherited from class mil.navy.nps.dis.PduElement | |
clone, deSerialize, length, printValues, serialize |
Methods inherited from class java.lang.Object | |
Field Detail |
protected mil.navy.nps.util.UnsignedShort siteID
protected mil.navy.nps.util.UnsignedShort applicationID
protected mil.navy.nps.util.UnsignedShort eventID
protected static final int sizeOf
sizeOf = 6 bytes
Constructor Detail |
public EventID()
public EventID(short pSiteID, short pApplicationID, short pEventID)
Method Detail |
public java.lang.Object clone()
public void serialize(java.io.DataOutputStream outputStream)
public void deSerialize(java.io.DataInputStream inputStream)
public int length()
public void printValues(int indentLevel, java.io.PrintStream printStream)
public int hashCode()
public boolean equals(java.lang.Object obj)
obj
- the object want to be compared with this object.public mil.navy.nps.util.UnsignedShort getSiteID()
public void setSiteID(mil.navy.nps.util.UnsignedShort pSiteID)
public void setSiteID(int pSiteID)
public mil.navy.nps.util.UnsignedShort getApplicationID()
public void setApplicationID(mil.navy.nps.util.UnsignedShort pApplicationID)
public void setApplicationID(int pApplicationID)
public mil.navy.nps.util.UnsignedShort getEventID()
public void setEventID(mil.navy.nps.util.UnsignedShort pEventID)
public void setEventID(int pEventID)
Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |