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

rename DISPDUType as DisPduType

parent 073081d0
No related branches found
No related tags found
No related merge requests found
...@@ -73,7 +73,7 @@ public class AllPduReceiver ...@@ -73,7 +73,7 @@ public class AllPduReceiver
for (Pdu nextPdu : pduBundle) // iterator loop through PDU bundle for (Pdu nextPdu : pduBundle) // iterator loop through PDU bundle
{ {
DISPDUType currentPduType = nextPdu.getPduType(); //short currentPduType = nextPdu.getPduType(); DisPduType currentPduType = nextPdu.getPduType(); //short currentPduType = nextPdu.getPduType();
String currentPduTypeName = nextPdu.getClass().getName(); String currentPduTypeName = nextPdu.getClass().getName();
String currentPduFamilyName = nextPdu.getClass().getSuperclass().getSimpleName(); String currentPduFamilyName = nextPdu.getClass().getSuperclass().getSimpleName();
DISProtocolFamily currentProtocolFamilyID = nextPdu.getProtocolFamily(); //short currentProtocolFamilyID = nextPdu.getProtocolFamily(); DISProtocolFamily currentProtocolFamilyID = nextPdu.getProtocolFamily(); //short currentProtocolFamilyID = nextPdu.getProtocolFamily();
...@@ -92,7 +92,7 @@ public class AllPduReceiver ...@@ -92,7 +92,7 @@ public class AllPduReceiver
System.out.println(message.toString()); // diagnostic information helps System.out.println(message.toString()); // diagnostic information helps
// additional message information of interest, if any // additional message information of interest, if any
switch (currentPduType) // using enumeration values from edu.​nps.​moves.​dis7.​enumerations.​DISPDUType switch (currentPduType) // using enumeration values from edu.​nps.​moves.​dis7.​enumerations.​DisPduType
{ {
case COMMENT: case COMMENT:
CommentPdu commentPdu = (CommentPdu)nextPdu; // cast to precise type CommentPdu commentPdu = (CommentPdu)nextPdu; // cast to precise type
......
...@@ -16,80 +16,81 @@ run-single: ...@@ -16,80 +16,81 @@ run-single:
Usage: AllPduReceiver <multicast group> <port> Usage: AllPduReceiver <multicast group> <port>
Default: AllPduReceiver 239.1.2.3 3000 Default: AllPduReceiver 239.1.2.3 3000
To quit: stop or kill this process To quit: stop or kill this process
16:00:00 received new DIS PDU DISPDUType 1 ENTITY_STATE (DISProtocolFamily 1 ENTITY_INFORMATION_INTERACTION) 16:00:00 received new DIS PDU DisPduType 01 ENTITY_STATE (DisPduType 1 ENTITY_INFORMATION_INTERACTION)
16:00:00 received new DIS PDU DISPDUType 2 FIRE (DISProtocolFamily 2 WARFARE) 16:00:00 received new DIS PDU DisPduType 02 FIRE (DisPduType 2 WARFARE)
16:00:00 received new DIS PDU DISPDUType 3 DETONATION (DISProtocolFamily 2 WARFARE) 16:00:00 received new DIS PDU DisPduType 03 DETONATION (DisPduType 2 WARFARE)
16:00:00 received new DIS PDU DISPDUType 4 COLLISION (DISProtocolFamily 1 ENTITY_INFORMATION_INTERACTION) 16:00:00 received new DIS PDU DisPduType 04 COLLISION (DisPduType 1 ENTITY_INFORMATION_INTERACTION)
16:00:00 received new DIS PDU DISPDUType 5 SERVICE_REQUEST (DISProtocolFamily 3 LOGISTICS) 16:00:00 received new DIS PDU DisPduType 05 SERVICE_REQUEST (DisPduType 3 LOGISTICS)
16:00:00 received new DIS PDU DISPDUType 6 RESUPPLY_OFFER (DISProtocolFamily 3 LOGISTICS) 16:00:00 received new DIS PDU DisPduType 06 RESUPPLY_OFFER (DisPduType 3 LOGISTICS)
16:00:00 received new DIS PDU DISPDUType 7 RESUPPLY_RECEIVED (DISProtocolFamily 3 LOGISTICS) 16:00:00 received new DIS PDU DisPduType 07 RESUPPLY_RECEIVED (DisPduType 3 LOGISTICS)
16:00:00 received new DIS PDU DISPDUType 8 RESUPPLY_CANCEL (DISProtocolFamily 3 LOGISTICS) 16:00:00 received new DIS PDU DisPduType 08 RESUPPLY_CANCEL (DisPduType 3 LOGISTICS)
16:00:00 received new DIS PDU DISPDUType 9 REPAIR_COMPLETE (DISProtocolFamily 3 LOGISTICS) 16:00:00 received new DIS PDU DisPduType 09 REPAIR_COMPLETE (DisPduType 3 LOGISTICS)
16:00:00 received new DIS PDU DISPDUType 10 REPAIR_RESPONSE (DISProtocolFamily 3 LOGISTICS) 16:00:00 received new DIS PDU DisPduType 10 REPAIR_RESPONSE (DisPduType 3 LOGISTICS)
16:00:00 received new DIS PDU DISPDUType 11 CREATE_ENTITY (DISProtocolFamily 5 SIMULATION_MANAGEMENT) 16:00:00 received new DIS PDU DisPduType 11 CREATE_ENTITY (DisPduType 5 SIMULATION_MANAGEMENT)
16:00:00 received new DIS PDU DISPDUType 12 REMOVE_ENTITY (DISProtocolFamily 5 SIMULATION_MANAGEMENT) 16:00:00 received new DIS PDU DisPduType 12 REMOVE_ENTITY (DisPduType 5 SIMULATION_MANAGEMENT)
16:00:00 received new DIS PDU DISPDUType 13 START_RESUME (DISProtocolFamily 5 SIMULATION_MANAGEMENT) 16:00:00 received new DIS PDU DisPduType 13 START_RESUME (DisPduType 5 SIMULATION_MANAGEMENT)
16:00:00 received new DIS PDU DISPDUType 14 STOP_FREEZE (DISProtocolFamily 5 SIMULATION_MANAGEMENT) 16:00:00 received new DIS PDU DisPduType 14 STOP_FREEZE (DisPduType 5 SIMULATION_MANAGEMENT)
16:00:00 received new DIS PDU DISPDUType 15 ACKNOWLEDGE (DISProtocolFamily 5 SIMULATION_MANAGEMENT) 16:00:00 received new DIS PDU DisPduType 15 ACKNOWLEDGE (DisPduType 5 SIMULATION_MANAGEMENT)
16:00:00 received new DIS PDU DISPDUType 16 ACTION_REQUEST (DISProtocolFamily 5 SIMULATION_MANAGEMENT) 16:00:00 received new DIS PDU DisPduType 16 ACTION_REQUEST (DisPduType 5 SIMULATION_MANAGEMENT)
16:00:00 received new DIS PDU DISPDUType 17 ACTION_RESPONSE (DISProtocolFamily 5 SIMULATION_MANAGEMENT) 16:00:00 received new DIS PDU DisPduType 17 ACTION_RESPONSE (DisPduType 5 SIMULATION_MANAGEMENT)
16:00:00 received new DIS PDU DISPDUType 18 DATA_QUERY (DISProtocolFamily 5 SIMULATION_MANAGEMENT) 16:00:00 received new DIS PDU DisPduType 18 DATA_QUERY (DisPduType 5 SIMULATION_MANAGEMENT)
16:00:00 received new DIS PDU DISPDUType 19 SET_DATA (DISProtocolFamily 5 SIMULATION_MANAGEMENT) 16:00:00 received new DIS PDU DisPduType 19 SET_DATA (DisPduType 5 SIMULATION_MANAGEMENT)
16:00:00 received new DIS PDU DISPDUType 20 DATA (DISProtocolFamily 5 SIMULATION_MANAGEMENT) 16:00:00 received new DIS PDU DisPduType 20 DATA (DisPduType 5 SIMULATION_MANAGEMENT)
16:00:00 received new DIS PDU DISPDUType 21 EVENT_REPORT (DISProtocolFamily 5 SIMULATION_MANAGEMENT) 16:00:00 received new DIS PDU DisPduType 21 EVENT_REPORT (DisPduType 5 SIMULATION_MANAGEMENT)
16:00:00 received new DIS PDU DISPDUType 22 COMMENT (DISProtocolFamily 5 SIMULATION_MANAGEMENT) 16:00:00 received new DIS PDU DisPduType 22 COMMENT (DisPduType 5 SIMULATION_MANAGEMENT)
messages: "Hello CommentPDU" "Here is a second line of text in this comment." messages: "Hello CommentPDU" "Here is a second line of text in this comment."
16:00:00 received new DIS PDU DISPDUType 23 ELECTROMAGNETIC_EMISSION (DISProtocolFamily 6 DISTRIBUTED_EMISSION_REGENERATION) 16:00:00 received new DIS PDU DisPduType 23 ELECTROMAGNETIC_EMISSION (DisPduType 6 DISTRIBUTED_EMISSION_REGENERATION)
Jul 17, 2021 5:04:29 PM edu.nps.moves.dis7.utilities.PduFactory createPdu 16:00:00 received new DIS PDU DisPduType 24 DESIGNATOR (DisPduType 6 DISTRIBUTED_EMISSION_REGENERATION)
SEVERE: unknown pduType=DISPDUType 0 OTHER, PduFactory fails 16:00:00 received new DIS PDU DisPduType 25 TRANSMITTER (DisPduType 4 RADIO_COMMUNICATIONS)
16:00:00 received new DIS PDU DISPDUType 24 DESIGNATOR (DISProtocolFamily 6 DISTRIBUTED_EMISSION_REGENERATION) Jul 18, 2021 10:34:06 PM edu.nps.moves.dis7.utilities.PduFactory createPdu
16:00:00 received new DIS PDU DISPDUType 25 TRANSMITTER (DISProtocolFamily 4 RADIO_COMMUNICATIONS) 16:00:00 received new DIS PDU DisPduType 26 SIGNAL (DisPduType 4 RADIO_COMMUNICATIONS)
16:00:00 received new DIS PDU DISPDUType 26 SIGNAL (DISProtocolFamily 4 RADIO_COMMUNICATIONS) SEVERE: unknown pduType=DisPduType 00 OTHER, PduFactory fails
Jul 17, 2021 5:04:29 PM edu.nps.moves.dis7.utilities.PduFactory createPdu 16:00:00 received new DIS PDU DisPduType 27 RECEIVER (DisPduType 4 RADIO_COMMUNICATIONS)
SEVERE: unknown pduType=DISPDUType 0 OTHER, PduFactory fails Jul 18, 2021 10:34:06 PM edu.nps.moves.dis7.utilities.PduFactory createPdu
16:00:00 received new DIS PDU DISPDUType 27 RECEIVER (DISProtocolFamily 4 RADIO_COMMUNICATIONS) SEVERE: unknown pduType=DisPduType 00 OTHER, PduFactory fails
16:00:00 received new DIS PDU DISPDUType 28 IDENTIFICATION_FRIEND_OR_FOE (DISProtocolFamily 6 DISTRIBUTED_EMISSION_REGENERATION) 16:00:00 received new DIS PDU DisPduType 28 IDENTIFICATION_FRIEND_OR_FOE (DisPduType 6 DISTRIBUTED_EMISSION_REGENERATION)
16:00:00 received new DIS PDU DISPDUType 29 UNDERWATER_ACOUSTIC (DISProtocolFamily 6 DISTRIBUTED_EMISSION_REGENERATION) 16:00:00 received new DIS PDU DisPduType 29 UNDERWATER_ACOUSTIC (DisPduType 6 DISTRIBUTED_EMISSION_REGENERATION)
16:00:00 received new DIS PDU DISPDUType 30 SUPPLEMENTAL_EMISSION_ENTITY_STATE (DISProtocolFamily 6 DISTRIBUTED_EMISSION_REGENERATION) 16:00:00 received new DIS PDU DisPduType 30 SUPPLEMENTAL_EMISSION_ENTITY_STATE (DisPduType 6 DISTRIBUTED_EMISSION_REGENERATION)
16:00:00 received new DIS PDU DISPDUType 31 INTERCOM_SIGNAL (DISProtocolFamily 4 RADIO_COMMUNICATIONS) 16:00:00 received new DIS PDU DisPduType 31 INTERCOM_SIGNAL (DisPduType 4 RADIO_COMMUNICATIONS)
16:00:00 received new DIS PDU DISPDUType 32 INTERCOM_CONTROL (DISProtocolFamily 4 RADIO_COMMUNICATIONS) 16:00:00 received new DIS PDU DisPduType 32 INTERCOM_CONTROL (DisPduType 4 RADIO_COMMUNICATIONS)
16:00:00 received new DIS PDU DISPDUType 33 AGGREGATE_STATE (DISProtocolFamily 7 ENTITY_MANAGEMENT) 16:00:00 received new DIS PDU DisPduType 33 AGGREGATE_STATE (DisPduType 7 ENTITY_MANAGEMENT)
16:00:00 received new DIS PDU DISPDUType 34 ISGROUPOF (DISProtocolFamily 7 ENTITY_MANAGEMENT) 16:00:00 received new DIS PDU DisPduType 34 ISGROUPOF (DisPduType 7 ENTITY_MANAGEMENT)
16:00:00 received new DIS PDU DISPDUType 35 TRANSFER_OWNERSHIP (DISProtocolFamily 7 ENTITY_MANAGEMENT) 16:00:00 received new DIS PDU DisPduType 35 TRANSFER_OWNERSHIP (DisPduType 7 ENTITY_MANAGEMENT)
16:00:00 received new DIS PDU DISPDUType 36 ISPARTOF (DISProtocolFamily 7 ENTITY_MANAGEMENT) 16:00:00 received new DIS PDU DisPduType 36 ISPARTOF (DisPduType 7 ENTITY_MANAGEMENT)
16:00:00 received new DIS PDU DISPDUType 37 MINEFIELD_STATE (DISProtocolFamily 8 MINEFIELD) 16:00:00 received new DIS PDU DisPduType 37 MINEFIELD_STATE (DisPduType 8 MINEFIELD)
16:00:00 received new DIS PDU DISPDUType 38 MINEFIELD_QUERY (DISProtocolFamily 8 MINEFIELD) 16:00:00 received new DIS PDU DisPduType 38 MINEFIELD_QUERY (DisPduType 8 MINEFIELD)
16:00:00 received new DIS PDU DISPDUType 39 MINEFIELD_DATA (DISProtocolFamily 8 MINEFIELD) 16:00:00 received new DIS PDU DisPduType 39 MINEFIELD_DATA (DisPduType 8 MINEFIELD)
16:00:00 received new DIS PDU DISPDUType 40 MINEFIELD_RESPONSE_NACK (DISProtocolFamily 8 MINEFIELD) 16:00:00 received new DIS PDU DisPduType 40 MINEFIELD_RESPONSE_NACK (DisPduType 8 MINEFIELD)
16:00:00 received new DIS PDU DISPDUType 41 ENVIRONMENTAL_PROCESS (DISProtocolFamily 9 SYNTHETIC_ENVIRONMENT) 16:00:00 received new DIS PDU DisPduType 41 ENVIRONMENTAL_PROCESS (DisPduType 9 SYNTHETIC_ENVIRONMENT)
16:00:00 received new DIS PDU DISPDUType 42 GRIDDED_DATA (DISProtocolFamily 9 SYNTHETIC_ENVIRONMENT) 16:00:00 received new DIS PDU DisPduType 42 GRIDDED_DATA (DisPduType 9 SYNTHETIC_ENVIRONMENT)
16:00:00 received new DIS PDU DISPDUType 43 POINT_OBJECT_STATE (DISProtocolFamily 9 SYNTHETIC_ENVIRONMENT) 16:00:00 received new DIS PDU DisPduType 43 POINT_OBJECT_STATE (DisPduType 9 SYNTHETIC_ENVIRONMENT)
16:00:00 received new DIS PDU DISPDUType 44 LINEAR_OBJECT_STATE (DISProtocolFamily 9 SYNTHETIC_ENVIRONMENT) 16:00:00 received new DIS PDU DisPduType 44 LINEAR_OBJECT_STATE (DisPduType 9 SYNTHETIC_ENVIRONMENT)
16:00:00 received new DIS PDU DISPDUType 45 AREAL_OBJECT_STATE (DISProtocolFamily 9 SYNTHETIC_ENVIRONMENT) 16:00:00 received new DIS PDU DisPduType 45 AREAL_OBJECT_STATE (DisPduType 9 SYNTHETIC_ENVIRONMENT)
16:00:00 received new DIS PDU DISPDUType 46 TIME_SPACE_POSITION_INFORMATION (DISProtocolFamily 11 LIVE_ENTITY_LE_INFORMATION_INTERACTION) 16:00:00 received new DIS PDU DisPduType 46 TIME_SPACE_POSITION_INFORMATION (DisPduType 11 LIVE_ENTITY_LE_INFORMATION_INTERACTION)
16:00:00 received new DIS PDU DISPDUType 47 APPEARANCE (DISProtocolFamily 11 LIVE_ENTITY_LE_INFORMATION_INTERACTION) 16:00:00 received new DIS PDU DisPduType 47 APPEARANCE (DisPduType 11 LIVE_ENTITY_LE_INFORMATION_INTERACTION)
16:00:00 received new DIS PDU DISPDUType 48 ARTICULATED_PARTS (DISProtocolFamily 11 LIVE_ENTITY_LE_INFORMATION_INTERACTION) 16:00:00 received new DIS PDU DisPduType 48 ARTICULATED_PARTS (DisPduType 11 LIVE_ENTITY_LE_INFORMATION_INTERACTION)
16:00:00 received new DIS PDU DISPDUType 49 LIVE_ENTITY_FIRE (DISProtocolFamily 11 LIVE_ENTITY_LE_INFORMATION_INTERACTION) 16:00:00 received new DIS PDU DisPduType 49 LIVE_ENTITY_FIRE (DisPduType 11 LIVE_ENTITY_LE_INFORMATION_INTERACTION)
16:00:00 received new DIS PDU DISPDUType 50 LIVE_ENTITY_DETONATION (DISProtocolFamily 11 LIVE_ENTITY_LE_INFORMATION_INTERACTION) 16:00:00 received new DIS PDU DisPduType 50 LIVE_ENTITY_DETONATION (DisPduType 11 LIVE_ENTITY_LE_INFORMATION_INTERACTION)
16:00:00 received new DIS PDU DISPDUType 51 CREATE_ENTITY_RELIABLE (DISProtocolFamily 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY) 16:00:00 received new DIS PDU DisPduType 51 CREATE_ENTITY_RELIABLE (DisPduType 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY)
16:00:00 received new DIS PDU DISPDUType 52 REMOVE_ENTITY_RELIABLE (DISProtocolFamily 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY) 16:00:00 received new DIS PDU DisPduType 52 REMOVE_ENTITY_RELIABLE (DisPduType 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY)
16:00:00 received new DIS PDU DISPDUType 53 START_RESUME_RELIABLE (DISProtocolFamily 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY) 16:00:00 received new DIS PDU DisPduType 53 START_RESUME_RELIABLE (DisPduType 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY)
16:00:00 received new DIS PDU DISPDUType 54 STOP_FREEZE_RELIABLE (DISProtocolFamily 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY) 16:00:00 received new DIS PDU DisPduType 54 STOP_FREEZE_RELIABLE (DisPduType 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY)
16:00:00 received new DIS PDU DISPDUType 55 ACKNOWLEDGE_RELIABLE (DISProtocolFamily 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY) 16:00:00 received new DIS PDU DisPduType 55 ACKNOWLEDGE_RELIABLE (DisPduType 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY)
16:00:00 received new DIS PDU DISPDUType 56 ACTION_REQUEST_RELIABLE (DISProtocolFamily 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY) 16:00:00 received new DIS PDU DisPduType 56 ACTION_REQUEST_RELIABLE (DisPduType 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY)
16:00:00 received new DIS PDU DISPDUType 57 ACTION_RESPONSE_RELIABLE (DISProtocolFamily 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY) 16:00:00 received new DIS PDU DisPduType 57 ACTION_RESPONSE_RELIABLE (DisPduType 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY)
16:00:00 received new DIS PDU DISPDUType 58 DATA_QUERY_RELIABLE (DISProtocolFamily 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY) 16:00:00 received new DIS PDU DisPduType 58 DATA_QUERY_RELIABLE (DisPduType 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY)
16:00:00 received new DIS PDU DISPDUType 59 SET_DATA_RELIABLE (DISProtocolFamily 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY) 16:00:00 received new DIS PDU DisPduType 59 SET_DATA_RELIABLE (DisPduType 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY)
16:00:00 received new DIS PDU DISPDUType 60 DATA_RELIABLE (DISProtocolFamily 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY) 16:00:00 received new DIS PDU DisPduType 60 DATA_RELIABLE (DisPduType 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY)
16:00:00 received new DIS PDU DISPDUType 61 EVENT_REPORT_RELIABLE (DISProtocolFamily 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY) 16:00:00 received new DIS PDU DisPduType 61 EVENT_REPORT_RELIABLE (DisPduType 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY)
16:00:00 received new DIS PDU DISPDUType 62 COMMENT_RELIABLE (DISProtocolFamily 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY) 16:00:00 received new DIS PDU DisPduType 62 COMMENT_RELIABLE (DisPduType 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY)
16:00:00 received new DIS PDU DISPDUType 63 RECORD_RELIABLE (DISProtocolFamily 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY) 16:00:00 received new DIS PDU DisPduType 63 RECORD_RELIABLE (DisPduType 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY)
16:00:00 received new DIS PDU DISPDUType 64 SET_RECORD_RELIABLE (DISProtocolFamily 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY) 16:00:00 received new DIS PDU DisPduType 64 SET_RECORD_RELIABLE (DisPduType 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY)
16:00:00 received new DIS PDU DISPDUType 65 RECORD_QUERY_RELIABLE (DISProtocolFamily 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY) 16:00:00 received new DIS PDU DisPduType 65 RECORD_QUERY_RELIABLE (DisPduType 10 SIMULATION_MANAGEMENT_WITH_RELIABILITY)
16:00:00 received new DIS PDU DISPDUType 66 COLLISION_ELASTIC (DISProtocolFamily 1 ENTITY_INFORMATION_INTERACTION) 16:00:00 received new DIS PDU DisPduType 66 COLLISION_ELASTIC (DisPduType 1 ENTITY_INFORMATION_INTERACTION)
16:00:00 received new DIS PDU DISPDUType 67 ENTITY_STATE_UPDATE (DISProtocolFamily 1 ENTITY_INFORMATION_INTERACTION) 16:00:00 received new DIS PDU DisPduType 67 ENTITY_STATE_UPDATE (DisPduType 1 ENTITY_INFORMATION_INTERACTION)
16:00:00 received new DIS PDU DISPDUType 68 DIRECTED_ENERGY_FIRE (DISProtocolFamily 2 WARFARE) 16:00:00 received new DIS PDU DisPduType 68 DIRECTED_ENERGY_FIRE (DisPduType 2 WARFARE)
16:00:00 received new DIS PDU DISPDUType 69 ENTITY_DAMAGE_STATUS (DISProtocolFamily 2 WARFARE) 16:00:00 received new DIS PDU DisPduType 69 ENTITY_DAMAGE_STATUS (DisPduType 2 WARFARE)
16:00:00 received new DIS PDU DISPDUType 70 INFORMATION_OPERATIONS_ACTION (DISProtocolFamily 13 INFORMATION_OPERATIONS) 16:00:00 received new DIS PDU DisPduType 70 INFORMATION_OPERATIONS_ACTION (DisPduType 13 INFORMATION_OPERATIONS)
16:00:00 received new DIS PDU DISPDUType 71 INFORMATION_OPERATIONS_REPORT (DISProtocolFamily 13 INFORMATION_OPERATIONS) 16:00:00 received new DIS PDU DisPduType 71 INFORMATION_OPERATIONS_REPORT (DisPduType 13 INFORMATION_OPERATIONS)
16:00:00 received new DIS PDU DISPDUType 72 ATTRIBUTE (DISProtocolFamily 1 ENTITY_INFORMATION_INTERACTION) 16:00:00 received new DIS PDU DisPduType 72 ATTRIBUTE (DisPduType 1 ENTITY_INFORMATION_INTERACTION)
BUILD STOPPED (total time: 36 seconds)
...@@ -84,18 +84,18 @@ public class AllPduSender ...@@ -84,18 +84,18 @@ public class AllPduSender
// Loop through all the enumerated PDU types, create a PDU for each type, // Loop through all the enumerated PDU types, create a PDU for each type,
// add that PDU to generatedPdusList, then send each one // add that PDU to generatedPdusList, then send each one
for (DISPDUType pdu : DISPDUType.values()) for (DisPduType pduTypeValue : DisPduType.values())
{ {
// System.out.println("PDU " + pdu.getValue() + " " + pdu.name() + " " + pdu.getDescription()); // diagnostic // System.out.println("PDU " + pdu.getValue() + " " + pdu.name() + " " + pdu.getDescription()); // diagnostic
Pdu aPdu = null; // edu.​nps.​moves7.​dis.PDU superclass for all PDUs, in preparation for custom assignment Pdu aPdu = null; // edu.​nps.​moves7.​dis.PDU superclass for all PDUs, in preparation for custom assignment
try { try {
switch (pdu) // using enumeration values from edu.​nps.​moves.​dis7.​enumerations.​DISPDUType switch (pduTypeValue) // using enumeration values from edu.​nps.​moves.​dis7.​enumerations.​DisPduType
{ {
// each case value is DISPDUType // each case value is DisPduType
case OTHER: // 0 case OTHER: // 0
System.out.println ("*** Note: DISPDUType." + pdu.name() + "=" + pdu.getValue() + " not supported"); // TODO why was this received? System.out.println ("*** Note: DisPduType." + pduTypeValue.name() + "=" + pduTypeValue.getValue() + " not supported"); // TODO why was this received?
break; // nothing to send break; // nothing to send
case ENTITY_STATE: // 1 case ENTITY_STATE: // 1
...@@ -425,7 +425,7 @@ public class AllPduSender ...@@ -425,7 +425,7 @@ public class AllPduSender
break; break;
default: default:
System.out.println("*** Warning: PDU " + pdu.getValue() + " " + pdu + " not supported, created or sent "); System.out.println("*** Warning: PDU " + pduTypeValue.getValue() + " " + pduTypeValue + " not supported, created or sent ");
// code generation block for this class follows: // code generation block for this class follows:
// System.out.println(" case " + pdu + ": // " + pdu.getValue()); // System.out.println(" case " + pdu + ": // " + pdu.getValue());
...@@ -441,7 +441,7 @@ public class AllPduSender ...@@ -441,7 +441,7 @@ public class AllPduSender
} }
catch (Exception e) catch (Exception e)
{ {
System.out.print("Exception thrown for PDU " + pdu.getValue() + " " + pdu); System.out.print("Exception thrown for PDU " + pduTypeValue.getValue() + " " + pduTypeValue);
System.out.print(Arrays.toString(e.getStackTrace())); System.out.print(Arrays.toString(e.getStackTrace()));
// continue looping // continue looping
} }
...@@ -478,12 +478,19 @@ public class AllPduSender ...@@ -478,12 +478,19 @@ public class AllPduSender
buffer = baos.toByteArray(); buffer = baos.toByteArray();
packet = new DatagramPacket(buffer, buffer.length, localMulticastAddress, DEFAULT_MULTICAST_PORT); packet = new DatagramPacket(buffer, buffer.length, localMulticastAddress, DEFAULT_MULTICAST_PORT);
multicastSocket.send(packet); multicastSocket.send(packet);
String currentPduTypeValuePadded = String.format("%2s", aPdu.getPduType().getValue());
String currentPduTypePadded = String.format("%-50s", aPdu.getPduType().toString()); // - indicates right padding of whitespace DisPduType disPduType= aPdu.getPduType();
// disPduType.setTRACE(true);
String currentIndexPadded = String.format("%2s", (idx + 1));
String currentPduTypeValuePadded = String.format("%2s", disPduType.getValue());
String currentPduTypePadded = String.format("%-49s", aPdu.getPduType().toString()); // - indicates right padding of whitespace
String packetLengthPadded = String.format("%3s", packet.getLength()); String packetLengthPadded = String.format("%3s", packet.getLength());
System.out.print ("Sent DIS PDU " + currentPduTypeValuePadded + " " + currentPduTypePadded );
System.out.print ("(packet.getLength()=" + packetLengthPadded + ")"); // diagnostic, beware of ever-growing packet size! System.out.println ("Sent packet #" + currentIndexPadded + ", " +
System.out.println(" of type " + aPdu.getClass().getName()); // currentPduTypeValuePadded + " " +
currentPduTypePadded +
"(packet.getLength()=" + packetLengthPadded + ")" + // diagnostic, beware of ever-growing packet size!
" of type " + aPdu.getClass().getName());
Thread.sleep(THREAD_SLEEP_INTERVAL); // pause for debugging, if zero this process still yields Thread.sleep(THREAD_SLEEP_INTERVAL); // pause for debugging, if zero this process still yields
} }
......
This diff is collapsed.
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