Skip to content
Snippets Groups Projects
Commit 11ffe8fa authored by ctsfi's avatar ctsfi
Browse files

WORK YOU ANIMAL!

parent 1b4e7f91
No related branches found
No related tags found
No related merge requests found
......@@ -64,8 +64,8 @@ public class PDUReciever {
packet = new DatagramPacket(buffer, buffer.length);
socket1.receive(packet);
List<Pdu> pduBundle = pduFactory.getPdusFromBundle(packet.getData(), packet.getLength());
if (pduBundle.size() > 1) { // should be 1 for this project
......
[MV3500Cohort2020JulySeptember.homework4.White.working.PDUReciever] started...
[MV3500Cohort2020JulySeptember.homework4.White.working.PDUReciever] listening for PDU packets on port 2317
====================================================
1. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
1. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.11
entityID triplet: [1, 13, 26]
New Entity: EntityKind 1 PLATFORM Land Country 225 UNITED_STATES_OF_AMERICA_USA 7 39 3
Location in DIS coordinates: [-2707501.7340396782, -4353408.810297934, 3781834.0645668795]
2. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.11
entityID triplet: [1, 13, 26]
Location in DIS coordinates: [-2707521.7340396782, -4353483.810297934, 3781834.0645668795]
3. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.11
entityID triplet: [1, 13, 25]
New Entity: EntityKind 1 PLATFORM Land Country 225 UNITED_STATES_OF_AMERICA_USA 2 41 3
Location in DIS coordinates: [-2707501.7340396782, -4353408.810297934, 3781834.0645668795]
2. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
Location in DIS coordinates: [-2707576.630668249, -4353720.04383471, 3781324.902449432]
4. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.11
entityID triplet: [1, 13, 26]
Location in DIS coordinates: [-2707541.7340396782, -4353558.810297934, 3781834.0645668795]
5. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.11
entityID triplet: [1, 13, 25]
Location in DIS coordinates: [-2707521.7340396782, -4353483.810297934, 3781834.0645668795]
3. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
Location in DIS coordinates: [-2707576.630668249, -4353720.04383471, 3781324.902449432]
6. received PDU type 62=COMMENT_RELIABLE edu.nps.moves.dis7.pdus.CommentReliablePdu from /10.1.105.11
messages: "LAV25-A2 IS WITHIN DISTANCE OF RESUPPLY"
7. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.11
entityID triplet: [1, 13, 26]
Location in DIS coordinates: [-2707561.7340396782, -4353633.810297934, 3781834.0645668795]
8. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.11
entityID triplet: [1, 13, 25]
Location in DIS coordinates: [-2707576.630668249, -4353720.04383471, 3781324.902449432]
9. received PDU type 6=RESUPPLY_OFFER edu.nps.moves.dis7.pdus.ResupplyOfferPdu from /10.1.105.11
Resupply Offer from Entity [1, 13, 26] to resupply Entity [1, 13, 25]
Supplies Offered: [Quantity: 500.0, Type: EntityKind 2 MUNITION Air Country 225 UNITED_STATES_OF_AMERICA_USA 2 2 1 ]
10. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.11
entityID triplet: [1, 13, 26]
Location in DIS coordinates: [-2707581.7340396782, -4353708.810297934, 3781834.0645668795]
11. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.11
entityID triplet: [1, 13, 25]
Location in DIS coordinates: [-2707576.630668249, -4353720.04383471, 3781324.902449432]
12. received PDU type 6=RESUPPLY_OFFER edu.nps.moves.dis7.pdus.ResupplyOfferPdu from /10.1.105.11
Resupply Offer from Entity [1, 13, 26] to resupply Entity [1, 13, 25]
Supplies Offered: [Quantity: 500.0, Type: EntityKind 2 MUNITION Air Country 225 UNITED_STATES_OF_AMERICA_USA 2 2 1 ]
13. received PDU type 62=COMMENT_RELIABLE edu.nps.moves.dis7.pdus.CommentReliablePdu from /10.1.105.11
messages: "Britt Simulation Completed"
14. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
entityID triplet: [2, 10, 3]
New Entity: EntityKind 1 PLATFORM Land Country 225 UNITED_STATES_OF_AMERICA_USA 4 3 7
Location in DIS coordinates: [-2709702.5301454174, -4349384.2159421, 3784766.9772485564]
15. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
entityID triplet: [1, 13, 2]
New Entity: EntityKind 1 PLATFORM Land Country 260 RUSSIA 2 41 3
Location in DIS coordinates: [-2707576.630668249, -4353720.04383471, 3781324.902449432]
4. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
entityID triplet: [1, 13, 25]
Location in DIS coordinates: [-2707541.7340396782, -4353558.810297934, 3781834.0645668795]
5. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
16. received PDU type 2=FIRE edu.nps.moves.dis7.pdus.FirePdu from /10.1.105.8
firingEntityID triplet: [2, 10, 3]
targetEntityID triplet: [1, 13, 2]
Munition Information: [Air.Country 225 UNITED_STATES_OF_AMERICA_USA.2.14.1]
17. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
entityID triplet: [2, 10, 3]
Location in DIS coordinates: [-2709702.5301454174, -4349384.2159421, 3784766.9772485564]
18. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
entityID triplet: [1, 13, 2]
Location in DIS coordinates: [-2707576.630668249, -4353720.04383471, 3781324.902449432]
6. received PDU type 62=COMMENT_RELIABLE edu.nps.moves.dis7.pdus.CommentReliablePdu from /10.1.105.8
messages: "LAV25-A2 ACQUIRES TARGET BMP2 WITHIN FIRING DISTANCE"
7. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
entityID triplet: [1, 13, 25]
Location in DIS coordinates: [-2707561.7340396782, -4353633.810297934, 3781834.0645668795]
8. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
19. received PDU type 2=FIRE edu.nps.moves.dis7.pdus.FirePdu from /10.1.105.8
firingEntityID triplet: [2, 10, 3]
targetEntityID triplet: [1, 13, 2]
Munition Information: [Air.Country 225 UNITED_STATES_OF_AMERICA_USA.2.14.1]
20. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
entityID triplet: [2, 10, 3]
Location in DIS coordinates: [-2709702.5301454174, -4349384.2159421, 3784766.9772485564]
21. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
entityID triplet: [1, 13, 2]
Location in DIS coordinates: [-2707576.630668249, -4353720.04383471, 3781324.902449432]
9. received PDU type 2=FIRE edu.nps.moves.dis7.pdus.FirePdu from /10.1.105.8
firingEntityID triplet: [1, 13, 25]
22. received PDU type 2=FIRE edu.nps.moves.dis7.pdus.FirePdu from /10.1.105.8
firingEntityID triplet: [2, 10, 3]
targetEntityID triplet: [1, 13, 2]
Munition Information: [Air.Country 225 UNITED_STATES_OF_AMERICA_USA.2.2.1]
10. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
entityID triplet: [1, 13, 25]
Location in DIS coordinates: [-2707581.7340396782, -4353708.810297934, 3781834.0645668795]
11. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
Munition Information: [Air.Country 225 UNITED_STATES_OF_AMERICA_USA.2.14.1]
23. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
entityID triplet: [2, 10, 3]
Location in DIS coordinates: [-2709702.5301454174, -4349384.2159421, 3784766.9772485564]
24. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
entityID triplet: [1, 13, 2]
Location in DIS coordinates: [-2707576.630668249, -4353720.04383471, 3781324.902449432]
12. received PDU type 2=FIRE edu.nps.moves.dis7.pdus.FirePdu from /10.1.105.8
firingEntityID triplet: [1, 13, 25]
25. received PDU type 2=FIRE edu.nps.moves.dis7.pdus.FirePdu from /10.1.105.8
firingEntityID triplet: [2, 10, 3]
targetEntityID triplet: [1, 13, 2]
Munition Information: [Air.Country 225 UNITED_STATES_OF_AMERICA_USA.2.2.1]
13. received PDU type 62=COMMENT_RELIABLE edu.nps.moves.dis7.pdus.CommentReliablePdu from /10.1.105.8
messages: "BMP2 DESTROYED BY LAV25-A2 AFTER TWO BURSTS OF 25mm HEI-T ON TARGET"
14. received PDU type 62=COMMENT_RELIABLE edu.nps.moves.dis7.pdus.CommentReliablePdu from /10.1.105.8
messages: "White Simulation Completed"
15. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.7
Munition Information: [Air.Country 225 UNITED_STATES_OF_AMERICA_USA.2.14.1]
26. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
entityID triplet: [2, 10, 3]
Location in DIS coordinates: [-2709702.5301454174, -4349384.2159421, 3784766.9772485564]
27. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
entityID triplet: [1, 13, 2]
Location in DIS coordinates: [-2707576.630668249, -4353720.04383471, 3781324.902449432]
28. received PDU type 2=FIRE edu.nps.moves.dis7.pdus.FirePdu from /10.1.105.8
firingEntityID triplet: [2, 10, 3]
targetEntityID triplet: [1, 13, 2]
Munition Information: [Air.Country 225 UNITED_STATES_OF_AMERICA_USA.2.14.1]
29. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
entityID triplet: [2, 10, 3]
Location in DIS coordinates: [-2709702.5301454174, -4349384.2159421, 3784766.9772485564]
30. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.8
entityID triplet: [1, 13, 2]
Location in DIS coordinates: [-2707576.630668249, -4353720.04383471, 3781324.902449432]
31. received PDU type 2=FIRE edu.nps.moves.dis7.pdus.FirePdu from /10.1.105.8
firingEntityID triplet: [2, 10, 3]
targetEntityID triplet: [1, 13, 2]
Munition Information: [Air.Country 225 UNITED_STATES_OF_AMERICA_USA.2.14.1]
32. received PDU type 62=COMMENT_RELIABLE edu.nps.moves.dis7.pdus.CommentReliablePdu from /10.1.105.8
messages: "BMP2 DESTROYED BY M109A6 AFTER SIX VOLLEYS OF HE/PD ON TARGET"
33. received PDU type 62=COMMENT_RELIABLE edu.nps.moves.dis7.pdus.CommentReliablePdu from /10.1.105.8
messages: "Cannon Simulation Completed"
34. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.7
entityID triplet: [1, 13, 25]
Location in DIS coordinates: [-2707501.7340396782, -4353408.810297934, 3781834.0645668795]
16. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.7
35. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.7
entityID triplet: [1, 13, 25]
Location in DIS coordinates: [-2707521.7340396782, -4353483.810297934, 3781834.0645668795]
17. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.7
36. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.7
entityID triplet: [1, 13, 2]
Location in DIS coordinates: [-2707576.630668249, -4353720.04383471, 3781324.902449432]
18. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.7
37. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.7
entityID triplet: [1, 13, 25]
Location in DIS coordinates: [-2707541.7340396782, -4353558.810297934, 3781834.0645668795]
19. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.7
38. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.7
entityID triplet: [1, 13, 2]
Location in DIS coordinates: [-2707576.630668249, -4353720.04383471, 3781324.902449432]
20. received PDU type 62=COMMENT_RELIABLE edu.nps.moves.dis7.pdus.CommentReliablePdu from /10.1.105.7
39. received PDU type 62=COMMENT_RELIABLE edu.nps.moves.dis7.pdus.CommentReliablePdu from /10.1.105.7
messages: "LAV25-A2 ACQUIRES TARGET BMP2 WITHIN FIRING DISTANCE"
21. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.7
40. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.7
entityID triplet: [1, 13, 25]
Location in DIS coordinates: [-2707561.7340396782, -4353633.810297934, 3781834.0645668795]
22. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.7
41. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.7
entityID triplet: [1, 13, 2]
Location in DIS coordinates: [-2707576.630668249, -4353720.04383471, 3781324.902449432]
23. received PDU type 2=FIRE edu.nps.moves.dis7.pdus.FirePdu from /10.1.105.7
42. received PDU type 2=FIRE edu.nps.moves.dis7.pdus.FirePdu from /10.1.105.7
firingEntityID triplet: [1, 13, 25]
targetEntityID triplet: [1, 13, 2]
Munition Information: [Air.Country 225 UNITED_STATES_OF_AMERICA_USA.2.2.1]
24. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.7
43. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.7
entityID triplet: [1, 13, 25]
Location in DIS coordinates: [-2707581.7340396782, -4353708.810297934, 3781834.0645668795]
25. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.7
44. received PDU type 1=ENTITY_STATE edu.nps.moves.dis7.pdus.EntityStatePdu from /10.1.105.7
entityID triplet: [1, 13, 2]
Location in DIS coordinates: [-2707576.630668249, -4353720.04383471, 3781324.902449432]
26. received PDU type 2=FIRE edu.nps.moves.dis7.pdus.FirePdu from /10.1.105.7
45. received PDU type 2=FIRE edu.nps.moves.dis7.pdus.FirePdu from /10.1.105.7
firingEntityID triplet: [1, 13, 25]
targetEntityID triplet: [1, 13, 2]
Munition Information: [Air.Country 225 UNITED_STATES_OF_AMERICA_USA.2.2.1]
27. received PDU type 62=COMMENT_RELIABLE edu.nps.moves.dis7.pdus.CommentReliablePdu from /10.1.105.7
46. received PDU type 62=COMMENT_RELIABLE edu.nps.moves.dis7.pdus.CommentReliablePdu from /10.1.105.7
messages: "BMP2 DESTROYED BY LAV25-A2 AFTER TWO BURSTS OF 25mm HEI-T ON TARGET"
28. received PDU type 62=COMMENT_RELIABLE edu.nps.moves.dis7.pdus.CommentReliablePdu from /10.1.105.7
47. received PDU type 6=RESUPPLY_OFFER edu.nps.moves.dis7.pdus.ResupplyOfferPdu from /10.1.105.7
Resupply Offer from Entity [1, 13, 2] to resupply Entity [1, 13, 25]
Supplies Offered: [Quantity: 500.0, Type: EntityKind 2 MUNITION Air Country 225 UNITED_STATES_OF_AMERICA_USA 2 2 1 ]
48. received PDU type 62=COMMENT_RELIABLE edu.nps.moves.dis7.pdus.CommentReliablePdu from /10.1.105.7
messages: "White Simulation Completed"
\ No newline at end of file
......@@ -336,15 +336,6 @@ public class WhiteSimulation
//if(eloc1.getX())
ResupplyOfferPdu resupplyOfferPdu = pduFactory.makeResupplyOfferPdu();
ArrayList<SupplyQuantity> pSupplies = new ArrayList<SupplyQuantity>();
SupplyQuantity ammoSupplyQ = new SupplyQuantity();
ammoSupplyQ.setSupplyType(HEType);
ammoSupplyQ.setQuantity(500);
pSupplies.add(ammoSupplyQ);
resupplyOfferPdu.setSupplies(pSupplies);
resupplyOfferPdu.setReceivingEntityID(lavID);
resupplyOfferPdu.setSupplyingEntityID(bmpID);
// should we customize this munition? what is it for your simulation?
......@@ -415,7 +406,6 @@ public class WhiteSimulation
sendPDU(firePdu);
if (destBool){
sendPDU(bmpDestroyedComment);
sendPDU(resupplyOfferPdu);
}
System.out.println ("... PDUs successfully sent");
......
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