Skip to content
Snippets Groups Projects
Commit 72e86f48 authored by UnityGrunt03's avatar UnityGrunt03
Browse files

Merge origin/master

parents 3a3682bd 317b3165
No related branches found
No related tags found
No related merge requests found
!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.
...@@ -382,7 +382,9 @@ public class AllPduSender ...@@ -382,7 +382,9 @@ public class AllPduSender
{ {
VariableDatum newVariableDatum = new VariableDatum(); VariableDatum newVariableDatum = new VariableDatum();
newVariableDatum.setVariableDatumValue (comment.getBytes()); // conversion 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); payloadList.add(newVariableDatum);
System.out.println(" \"" + comment + "\""); System.out.println(" \"" + comment + "\"");
} }
...@@ -427,19 +429,25 @@ public class AllPduSender ...@@ -427,19 +429,25 @@ public class AllPduSender
byte[] buffer; byte[] buffer;
Pdu aPdu = generatedPdusList.get(idx); Pdu aPdu = generatedPdusList.get(idx);
aPdu.marshal(dos); try
{
buffer = baos.toByteArray(); aPdu.marshal(dos);
DatagramPacket packet = new DatagramPacket(buffer, buffer.length, localMulticastAddress, DEFAULT_MULTICAST_PORT);
socket.send(packet); buffer = baos.toByteArray();
try { DatagramPacket packet = new DatagramPacket(buffer, buffer.length, localMulticastAddress, DEFAULT_MULTICAST_PORT);
Thread.sleep(100L); socket.send(packet);
} catch (InterruptedException ex) { 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. // write the PDUs out to an XML file.
//PduContainer container = new PduContainer(); //PduContainer container = new PduContainer();
......
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
real-time platform-level wargaming across multiple host computers and is used worldwide, 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 especially by military organizations but also by other agencies such as those involved in
space exploration and medicine.* 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. Manual download links follow. IEEE standards must be downloaded manually while within NPS campus or firewall.
......
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