diff --git a/assignments/src/MV3500Cohort2019JulySeptember/homework4/Boron/BoronPdusave.dislog b/assignments/src/MV3500Cohort2019JulySeptember/homework4/Boron/BoronPdusave.dislog new file mode 100644 index 0000000000000000000000000000000000000000..cefa1bd575e0d896e5e3cea60b59383a1c5aeba9 --- /dev/null +++ b/assignments/src/MV3500Cohort2019JulySeptember/homework4/Boron/BoronPdusave.dislog @@ -0,0 +1,5 @@ +!Begin!Beginning of DIS capture file, Pdusave1.dislog. +AAAAAAAAAAA=,BwABAQAAAAAAAAAACTwAAAAAAQAAAAAAAAAAAAAAAAAAAAAAP029GT0ORpA+skXmQBXw+8TlchFAIoD9mp0sCEAiePPdoztqP2ds/D5gSzQ+u+pmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAABjhFLkM=,BwABAQAAAAAAAAAAFegAAAAAAQAAAAAAAAAAAAAAAAAAAAAAPO+GAD9l1KA+CSoEQB+LsFxy9mI/5R0h/2XI40AZm58PmyVfPzhRVT9apB4/G+hCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAACdElIW8=,BwABAQAAAAAAAAAAHLoAAAAAAQAAAAAAAAAAAAAAAAAAAAAAPtT6zD57N7Q/dIZXP+NUHTLCB8FAFCAzjscCIkASvFW0+p0qP2Aa1jwC1EA/TSOpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +!End!End of DIS capture file, Pdusave1.dislog. diff --git a/examples/src/OpenDis7Examples/AllPduSender.java b/examples/src/OpenDis7Examples/AllPduSender.java index ff6ed2397e87a03aaab311c9c2392a98b04e3e5a..130aeb917ab4aa27b23e74bf7706c5d8286dd559 100755 --- a/examples/src/OpenDis7Examples/AllPduSender.java +++ b/examples/src/OpenDis7Examples/AllPduSender.java @@ -382,7 +382,9 @@ public class AllPduSender { VariableDatum newVariableDatum = new VariableDatum(); newVariableDatum.setVariableDatumValue (comment.getBytes()); // conversion - newVariableDatum.setVariableDatumLength(comment.getBytes().length); // housekeeping + newVariableDatum.setVariableDatumLength(comment.getBytes().length * 8); // bits, not bytes, see spec and javadoc + // alternatively, you do not need to set this and the marshaller will figure it out from the byte array + // (see javadoc for VariableDatum.setVariableDatumLength()) payloadList.add(newVariableDatum); System.out.println(" \"" + comment + "\""); } @@ -427,19 +429,25 @@ public class AllPduSender byte[] buffer; Pdu aPdu = generatedPdusList.get(idx); - aPdu.marshal(dos); - - buffer = baos.toByteArray(); - DatagramPacket packet = new DatagramPacket(buffer, buffer.length, localMulticastAddress, DEFAULT_MULTICAST_PORT); - socket.send(packet); - try { - Thread.sleep(100L); - } catch (InterruptedException ex) { + try + { + aPdu.marshal(dos); + + buffer = baos.toByteArray(); + DatagramPacket packet = new DatagramPacket(buffer, buffer.length, localMulticastAddress, DEFAULT_MULTICAST_PORT); + socket.send(packet); + try { + Thread.sleep(100L); + } catch (InterruptedException ex) { + } + String currentPduTypeValuePadded = String.format("%2s", aPdu.getPduType().getValue()); + String currentPduTypePadded = String.format("%-34s", aPdu.getPduType()); // - indicates right padding of whitespace + System.out.print ("Sent DIS PDU " + currentPduTypeValuePadded + " " + currentPduTypePadded ); + System.out.println(" of type " + aPdu.getClass().getName()); + } + catch (Exception ex) { + System.out.println("Marshaling error" + ex); } - String currentPduTypeValuePadded = String.format("%2s", aPdu.getPduType().getValue()); - String currentPduTypePadded = String.format("%-34s", aPdu.getPduType()); // - indicates right padding of whitespace - System.out.print ("Sent DIS PDU " + currentPduTypeValuePadded + " " + currentPduTypePadded ); - System.out.println(" of type " + aPdu.getClass().getName()); } // write the PDUs out to an XML file. //PduContainer container = new PduContainer(); diff --git a/lib/open-dis7-java.jar b/lib/open-dis7-java.jar index 309c3e05ad8bc8d80f3507c5f4fcc2454e16d45c..4c8a6dbbb8bb3f4022d98a1ca27fd10637c82883 100644 Binary files a/lib/open-dis7-java.jar and b/lib/open-dis7-java.jar differ diff --git a/lib/open-dis7-javadoc.jar b/lib/open-dis7-javadoc.jar index 3d07ea8d481e5be6b333fa1f4e9403596a6ef803..69ebf09d0b1d1377b369ab1e6e22c1cfdcfc546b 100644 Binary files a/lib/open-dis7-javadoc.jar and b/lib/open-dis7-javadoc.jar differ diff --git a/lib/open-dis7-source.jar b/lib/open-dis7-source.jar index d506c26477c9f11f7b1ec99e65533566c45282f8..22c5fde380a80dc1414474b2d667a380aacff268 100644 Binary files a/lib/open-dis7-source.jar and b/lib/open-dis7-source.jar differ diff --git a/specifications/README.md b/specifications/README.md index d05560495cdb7ca026522c0f0ca10c97b13cf224..de9980f4ecdf920900b6d3c5ade667ac76d9362c 100644 --- a/specifications/README.md +++ b/specifications/README.md @@ -4,7 +4,9 @@ real-time platform-level wargaming across multiple host computers and is used worldwide, especially by military organizations but also by other agencies such as those involved in space exploration and medicine.* -* Wikipedia: [Distributed Interactive Simulation](https://en.wikipedia.org/wiki/Distributed_Interactive_Simulation) +* Wikipedia: [Distributed Interactive Simulation (DIS)](https://en.wikipedia.org/wiki/Distributed_Interactive_Simulation) IEEE Standard +* [Simulation Interoperabilty Standards Organization (SISO)](https://www.sisostds.org): "Simulation Interoperability and Reuse through Standards" +* SISO Product Support Group (PSG): [DIS / RPR FOM PSG - Distributed Interactive Simulation / Real-time Platform Reference Federation Object Model](https://www.sisostds.org/StandardsActivities/SupportGroups/DISRPRFOMPSG.aspx) Manual download links follow. IEEE standards must be downloaded manually while within NPS campus or firewall.