Skip to content
Snippets Groups Projects
Commit e6446a3e authored by snapp's avatar snapp
Browse files

Updated KineticFirewallSimulationProgramAllenReynolds.java in projects folder....

Updated KineticFirewallSimulationProgramAllenReynolds.java in projects folder. Committed 12 September 2021 with updates to Netbeans outputs.
parent 768097d5
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
* and tracing its source before destroying it - updated September 12, 2021 to ensure
* correct file pushed to Gitlab.
*
* @author snapp
* @author snapp and runem aka jallen and kreynolds
*/
package MV3500Cohort2021JulySeptember.projects.AllenReynolds;
......@@ -215,18 +215,22 @@ public class KineticFirewallSimulationProgramAllenReynolds {
entityStatePdu_3.getEntityLocation().setX(entityStatePdu_3.getEntityLocation().getX() - 1.0); // 1m per timestep
// decide whether to fire, and then update the firePdu. Hmmm, you might want a target to shoot at!
Double range = entityStatePdu_2.getEntityLocation().getX();
System.out.println("range: " + range + " hops from our Network DMZ!");
Double range2 = entityStatePdu_2.getEntityLocation().getX();
Double range3 = entityStatePdu_3.getEntityLocation().getX();
System.out.println(entityStatePdu_2.getForceId() + " range: " + range2 + " hops from our Network DMZ!");
System.out.println(entityStatePdu_3.getForceId() + " range: " + range3 + " hops from our Network DMZ!");
if (range <= 5) { // Range 5
if (range2 <= 5) { // Range 5
if (!fireBool) {
sendSinglePdu(MalPacketDetectedComment);
sendSinglePdu(FriendPacketDetectedComment);
System.out.println("Firewall Detects Malware from "
+ entityStatePdu_2.getEntityType().getCountry()
+ "... Engage Traceroute");
}
fireBool = true;
System.out.println("Entity#"
+ firePdu.getFiringEntityID().getEntityID()
+ " is firing "
+ " is firing traceroute type "
+ firePdu.getDescriptor().getMunitionType().getDomain()
+ "."
+ firePdu.getDescriptor().getMunitionType().getCountry()
......@@ -237,7 +241,8 @@ public class KineticFirewallSimulationProgramAllenReynolds {
+ "."
+ firePdu.getDescriptor().getMunitionType().getSpecific()
+ "."
+ " at Entity#" + firePdu.getTargetEntityID().getEntityID());
+ " at Entity#" + firePdu.getTargetEntityID().getEntityID()
+ " from " + entityStatePdu_2.getEntityType().getCountry());
if (firePdu.getTargetEntityID().getEntityID() == 6666) {
MalPacketPingsReceived += 1;
......@@ -256,6 +261,13 @@ public class KineticFirewallSimulationProgramAllenReynolds {
}
}
}
if (range3 <= 5) { // Range 5
sendSinglePdu(FriendPacketDetectedComment);
System.out.println("Firewall Detects Friendly Packet from "
+ entityStatePdu_3.getEntityType().getCountry()
+ "... Allowing safe passage through the Firewall");
}
// etc. etc. your code goes here for your simulation of interest
// something happens between my simulation entities, la de da de da...
......
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