Skip to content
Snippets Groups Projects
Commit cb87dcf2 authored by Brutzman, Don's avatar Brutzman, Don
Browse files

javadoc

parent ee19934c
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,8 @@ public class NetworkComms implements Runnable
/** people we notify when we receive a PDU */
private List<PduListener> listeners;
/** provide reference to this object
* @return reference to this object */
public static NetworkComms getInstance()
{
synchronized(NetworkComms.class)
......@@ -110,7 +112,8 @@ public class NetworkComms implements Runnable
socket.close();
}
}
/** Send a PDU
* @param aPdu to send */
public void sendPdu(Pdu aPdu)
{
aPdu.setTimestamp(time.getDisAbsoluteTimestamp());
......@@ -125,11 +128,15 @@ public class NetworkComms implements Runnable
}
}
/** add a PduListener, if not already present
* @param aListener PduListener reference to add */
public void addListener(PduListener aListener)
{
listeners.add(aListener);
}
/** remove a PduListener, if present
* @param aListener PduListener reference to remove */
public void removeListener(PduListener aListener)
{
listeners.remove(aListener);
......
......@@ -16,6 +16,7 @@ import edu.nps.moves.dis7.pdus.*;
*/
public class SimulationRunner
{
/** three strikes you're out! */
public final static int FIRING_ATTEMPTS = 3;
private static NetworkComms networkComms = null;
......@@ -226,7 +227,8 @@ public class SimulationRunner
PduListenerImpl.ENTITIES.clear();
}
}
/** wait before next activity
* @param ms duration in milliseconds */
public static void sleep(long ms) {
try
{
......
......@@ -17,6 +17,8 @@ public class Sniper implements Runnable
Vector3Double disCoordinates;
EntityID eId;
/** provide reference to this object
* @return reference to this object */
public static Sniper getInstance() {
if (sniper == null) {
sniper = new Sniper();
......
......@@ -19,6 +19,8 @@ public class Target implements Runnable {
private static Target target = null;
private EntityID eId;
/** provide reference to this object
* @return reference to this object */
public static Target getInstance() {
if (target == null) {
target = new Target();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment