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

comments, whitespace

parent 793db795
No related branches found
No related tags found
No related merge requests found
......@@ -42,11 +42,10 @@ public class EspduReceiver
socket = new MulticastSocket(DEFAULT_MULTICAST_PORT);
socket.setBroadcast(true);
//address = InetAddress.getByName(EspduSender.DEFAULT_MULTICAST_GROUP);
//socket.joinGroup(address);
// address = InetAddress.getByName(EspduSender.DEFAULT_MULTICAST_GROUP);
// socket.joinGroup(address);
// Loop infinitely, receiving datagrams
while (true)
while (true) // Loop infinitely, receiving datagrams
{
byte buffer[] = new byte[MAX_PDU_SIZE];
packet = new DatagramPacket(buffer, buffer.length);
......@@ -72,12 +71,11 @@ public class EspduReceiver
}
System.out.println();
} // end trop through PDU bundle
} // end while
} // End try
catch (IOException e)
{
System.out.println("Problem with DisExamples.EspduReceiver, see exception trace:");
System.out.println(e);
}
} // end main
......
......@@ -260,7 +260,8 @@ public class EspduSender {
double lla[] = CoordinateConversions.xyzToLatLonDegrees(c);
// debug: System.out.println(" Location (lat/lon/alt): [" + lla[0] + ", " + lla[1] + ", " + lla[2] + "]");
}
} catch (IOException | InterruptedException e)
}
catch (IOException | InterruptedException e)
{
System.out.println("Problem with DisExamples.EspduSender, see exception trace:");
System.out.println(e);
......
......@@ -28,10 +28,12 @@ public class PduSender
InetAddress multicastAddress;
public PduSender(int port, String multicast) {
try {
try
{
this.port = port;
multicastAddress = InetAddress.getByName(multicast);
if (!multicastAddress.isMulticastAddress()) {
if (!multicastAddress.isMulticastAddress())
{
System.out.println("Not a multicast address: " + multicast);
}
}
......@@ -125,8 +127,8 @@ public class PduSender
System.out.print("PDU of type " + pdu + " not supported, created or sent ");
System.out.println();
}
if (aPdu != null) {
if (aPdu != null)
{
generatedPdus.add(aPdu);
}
}
......@@ -153,12 +155,12 @@ public class PduSender
socket.send(packet);
System.out.println("Sent PDU of type " + aPdu.getClass().getName());
}
// write the PDUs out to an XML file.
//PduContainer container = new PduContainer();
//container.setPdus(generatedPdus);
//container.marshallToXml("examplePdus.xml");
} catch (IOException e) {
} catch (IOException e)
{
System.out.println(e);
}
}
......
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