diff --git a/build.all.out.txt b/build.all.out.txt index 155b145cee06b13177f6b52a710bf67582f3af37..d17873b9d447ffd98eed07f0b4201ee8d53e1e49 100644 --- a/build.all.out.txt +++ b/build.all.out.txt @@ -1,6 +1,6 @@ ant -f C:\\x3d-github\\open-dis7-java all all: -timestamp 30 August 2020 20:43:49 +timestamp 31 August 2020 16:28:12 clean: ================ compile: @@ -16,90 +16,89 @@ compile src, src-generated Deleting: C:\x3d-github\open-dis7-java\build\built-jar.properties deps-jar: Updating property file: C:\x3d-github\open-dis7-java\build\built-jar.properties -Compiling 15 source files to C:\x3d-github\open-dis7-java\build\test\classes +Deleted 23 out of date files in 0 seconds +Compiling 16 source files to C:\x3d-github\open-dis7-java\build\test\classes warning: [options] bootstrap class path not set in conjunction with -source 8 1 warning -Copying 1 file to C:\x3d-github\open-dis7-java\build\test\classes compile-test: -Created dir: C:\x3d-github\open-dis7-java\build\test\results test: AllPduRoundTripTest Recorder log file open: C:\x3d-github\open-dis7-java\pduLog\PduCaptureLog.dislog [edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] Using network interface Intel(R) Dual Band Wireless-AC 8260 class edu.nps.moves.dis7.utilities.stream.PduRecorder listening to IP address 225.4.5.6 on port 3000 Recorder log at C:\x3d-github\open-dis7-java\.\pduLog\PduCaptureLog.dislog -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 1. received DISPDUType 15 ACKNOWLEDGE (timestamp 05:15:37, size 32 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 2. received DISPDUType 55 ACKNOWLEDGE_RELIABLE (timestamp 05:15:38, size 32 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 3. received DISPDUType 16 ACTION_REQUEST (timestamp 05:15:38, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 4. received DISPDUType 56 ACTION_REQUEST_RELIABLE (timestamp 05:15:38, size 44 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 5. received DISPDUType 17 ACTION_RESPONSE (timestamp 05:15:40, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 6. received DISPDUType 57 ACTION_RESPONSE_RELIABLE (timestamp 05:15:40, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 7. received DISPDUType 33 AGGREGATE_STATE (timestamp 05:15:43, size 136 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 8. received DISPDUType 47 APPEARANCE (timestamp 05:15:48, size 69 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 9. received DISPDUType 45 AREAL_OBJECT_STATE (timestamp 05:15:50, size 49 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 10. received DISPDUType 48 ARTICULATED_PARTS (timestamp 05:15:50, size 19 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 11. received DISPDUType 72 ATTRIBUTE (timestamp 05:16:08, size 32 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 12. received DISPDUType 66 COLLISION_ELASTIC (timestamp 05:16:10, size 100 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 13. received DISPDUType 4 COLLISION (timestamp 05:16:11, size 60 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 14. received DISPDUType 22 COMMENT (timestamp 05:16:11, size 32 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 15. received DISPDUType 62 COMMENT_RELIABLE (timestamp 05:16:11, size 32 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 16. received DISPDUType 11 CREATE_ENTITY (timestamp 05:16:12, size 28 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 17. received DISPDUType 51 CREATE_ENTITY_RELIABLE (timestamp 05:16:12, size 32 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 18. received DISPDUType 20 DATA (timestamp 05:16:12, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 19. received DISPDUType 18 DATA_QUERY (timestamp 05:16:12, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 20. received DISPDUType 58 DATA_QUERY_RELIABLE (timestamp 05:16:12, size 44 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 21. received DISPDUType 60 DATA_RELIABLE (timestamp 05:16:13, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 22. received DISPDUType 24 DESIGNATOR (timestamp 05:16:13, size 88 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 23. received DISPDUType 3 DETONATION (timestamp 05:16:15, size 104 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 24. received DISPDUType 68 DIRECTED_ENERGY_FIRE (timestamp 05:16:17, size 88 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 25. received DISPDUType 23 ELECTROMAGNETIC_EMISSION (timestamp 05:16:18, size 28 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 26. received DISPDUType 69 ENTITY_DAMAGE_STATUS (timestamp 05:16:18, size 24 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 27. received DISPDUType 1 ENTITY_STATE (timestamp 05:16:19, size 144 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 28. received DISPDUType 67 ENTITY_STATE_UPDATE (timestamp 05:16:19, size 72 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 29. received DISPDUType 41 ENVIRONMENTAL_PROCESS (timestamp 05:16:20, size 32 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 30. received DISPDUType 21 EVENT_REPORT (timestamp 05:16:20, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 31. received DISPDUType 61 EVENT_REPORT_RELIABLE (timestamp 05:16:20, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 32. received DISPDUType 2 FIRE (timestamp 05:16:21, size 96 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 33. received DISPDUType 42 GRIDDED_DATA (timestamp 05:16:21, size 64 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 34. received DISPDUType 28 IDENTIFICATION_FRIEND_OR_FOE (timestamp 05:16:24, size 60 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 35. received DISPDUType 71 INFORMATION_OPERATIONS_REPORT (timestamp 05:16:25, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 36. received DISPDUType 70 INFORMATION_OPERATIONS_ACTION (timestamp 05:16:25, size 56 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 37. received DISPDUType 32 INTERCOM_CONTROL (timestamp 05:16:26, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 38. received DISPDUType 31 INTERCOM_SIGNAL (timestamp 05:16:27, size 33 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 39. received DISPDUType 34 ISGROUPOF (timestamp 05:16:27, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 40. received DISPDUType 36 ISPARTOF (timestamp 05:16:30, size 52 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 41. received DISPDUType 50 LIVE_ENTITY_DETONATION (timestamp 05:16:32, size 81 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 42. received DISPDUType 49 LIVE_ENTITY_FIRE (timestamp 05:16:32, size 69 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 43. received DISPDUType 44 LINEAR_OBJECT_STATE (timestamp 05:16:32, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 44. received DISPDUType 39 MINEFIELD_DATA (timestamp 05:16:35, size 44 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 45. received DISPDUType 38 MINEFIELD_QUERY (timestamp 05:16:35, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 46. received DISPDUType 40 MINEFIELD_RESPONSE_NACK (timestamp 05:16:36, size 26 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 47. received DISPDUType 37 MINEFIELD_STATE (timestamp 05:16:37, size 72 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 48. received DISPDUType 43 POINT_OBJECT_STATE (timestamp 05:16:39, size 91 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 49. received DISPDUType 27 RECEIVER (timestamp 05:16:39, size 36 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 50. received DISPDUType 65 RECORD_QUERY_RELIABLE (timestamp 05:16:41, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 51. received DISPDUType 63 RECORD_RELIABLE (timestamp 05:16:41, size 36 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 52. received DISPDUType 12 REMOVE_ENTITY (timestamp 05:16:41, size 28 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 53. received DISPDUType 52 REMOVE_ENTITY_RELIABLE (timestamp 05:16:41, size 32 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 54. received DISPDUType 9 REPAIR_COMPLETE (timestamp 05:16:41, size 28 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 55. received DISPDUType 10 REPAIR_RESPONSE (timestamp 05:16:42, size 28 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 56. received DISPDUType 8 RESUPPLY_CANCEL (timestamp 05:16:42, size 24 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 57. received DISPDUType 6 RESUPPLY_OFFER (timestamp 05:16:42, size 28 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 58. received DISPDUType 7 RESUPPLY_RECEIVED (timestamp 05:16:42, size 28 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 59. received DISPDUType 30 SUPPLEMENTAL_EMISSION_ENTITY_STATE (timestamp 05:16:42, size 28 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 60. received DISPDUType 5 SERVICE_REQUEST (timestamp 05:16:42, size 28 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 61. received DISPDUType 19 SET_DATA (timestamp 05:16:42, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 62. received DISPDUType 59 SET_DATA_RELIABLE (timestamp 05:16:43, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 63. received DISPDUType 64 SET_RECORD_RELIABLE (timestamp 05:16:43, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 64. received DISPDUType 26 SIGNAL (timestamp 05:16:43, size 33 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 65. received DISPDUType 13 START_RESUME (timestamp 05:16:43, size 44 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 66. received DISPDUType 53 START_RESUME_RELIABLE (timestamp 05:16:43, size 48 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 67. received DISPDUType 14 STOP_FREEZE (timestamp 05:16:44, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 68. received DISPDUType 54 STOP_FREEZE_RELIABLE (timestamp 05:16:44, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 69. received DISPDUType 35 TRANSFER_OWNERSHIP (timestamp 05:16:45, size 40 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 70. received DISPDUType 25 TRANSMITTER (timestamp 05:16:49, size 107 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 71. received DISPDUType 46 TIME_SPACE_POSITION_INFORMATION (timestamp 05:16:52, size 56 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 72. received DISPDUType 29 UNDERWATER_ACOUSTIC (timestamp 05:16:52, size 32 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 1. received DISPDUType 15 ACKNOWLEDGE (timestamp 12:03:56, size 32 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 2. received DISPDUType 55 ACKNOWLEDGE_RELIABLE (timestamp 12:03:57, size 32 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 3. received DISPDUType 16 ACTION_REQUEST (timestamp 12:03:58, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 4. received DISPDUType 56 ACTION_REQUEST_RELIABLE (timestamp 12:03:58, size 44 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 5. received DISPDUType 17 ACTION_RESPONSE (timestamp 12:03:59, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 6. received DISPDUType 57 ACTION_RESPONSE_RELIABLE (timestamp 12:03:59, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 7. received DISPDUType 33 AGGREGATE_STATE (timestamp 12:04:05, size 136 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 8. received DISPDUType 47 APPEARANCE (timestamp 12:04:10, size 69 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 9. received DISPDUType 45 AREAL_OBJECT_STATE (timestamp 12:04:11, size 49 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 10. received DISPDUType 48 ARTICULATED_PARTS (timestamp 12:04:11, size 19 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 11. received DISPDUType 72 ATTRIBUTE (timestamp 12:04:30, size 32 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 12. received DISPDUType 66 COLLISION_ELASTIC (timestamp 12:04:31, size 100 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 13. received DISPDUType 4 COLLISION (timestamp 12:04:31, size 60 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 14. received DISPDUType 22 COMMENT (timestamp 12:04:31, size 32 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 15. received DISPDUType 62 COMMENT_RELIABLE (timestamp 12:04:33, size 32 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 16. received DISPDUType 11 CREATE_ENTITY (timestamp 12:04:33, size 28 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 17. received DISPDUType 51 CREATE_ENTITY_RELIABLE (timestamp 12:04:33, size 32 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 18. received DISPDUType 20 DATA (timestamp 12:04:34, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 19. received DISPDUType 18 DATA_QUERY (timestamp 12:04:34, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 20. received DISPDUType 58 DATA_QUERY_RELIABLE (timestamp 12:04:34, size 44 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 21. received DISPDUType 60 DATA_RELIABLE (timestamp 12:04:34, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 22. received DISPDUType 24 DESIGNATOR (timestamp 12:04:35, size 88 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 23. received DISPDUType 3 DETONATION (timestamp 12:04:37, size 104 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 24. received DISPDUType 68 DIRECTED_ENERGY_FIRE (timestamp 12:04:38, size 88 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 25. received DISPDUType 23 ELECTROMAGNETIC_EMISSION (timestamp 12:04:40, size 28 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 26. received DISPDUType 69 ENTITY_DAMAGE_STATUS (timestamp 12:04:40, size 24 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 27. received DISPDUType 1 ENTITY_STATE (timestamp 12:04:41, size 144 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 28. received DISPDUType 67 ENTITY_STATE_UPDATE (timestamp 12:04:41, size 72 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 29. received DISPDUType 41 ENVIRONMENTAL_PROCESS (timestamp 12:04:42, size 32 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 30. received DISPDUType 21 EVENT_REPORT (timestamp 12:04:42, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 31. received DISPDUType 61 EVENT_REPORT_RELIABLE (timestamp 12:04:43, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 32. received DISPDUType 2 FIRE (timestamp 12:04:43, size 96 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 33. received DISPDUType 42 GRIDDED_DATA (timestamp 12:04:43, size 64 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 34. received DISPDUType 28 IDENTIFICATION_FRIEND_OR_FOE (timestamp 12:04:47, size 60 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 35. received DISPDUType 71 INFORMATION_OPERATIONS_REPORT (timestamp 12:04:47, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 36. received DISPDUType 70 INFORMATION_OPERATIONS_ACTION (timestamp 12:04:48, size 56 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 37. received DISPDUType 32 INTERCOM_CONTROL (timestamp 12:04:48, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 38. received DISPDUType 31 INTERCOM_SIGNAL (timestamp 12:04:49, size 33 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 39. received DISPDUType 34 ISGROUPOF (timestamp 12:04:49, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 40. received DISPDUType 36 ISPARTOF (timestamp 12:04:52, size 52 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 41. received DISPDUType 50 LIVE_ENTITY_DETONATION (timestamp 12:04:54, size 81 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 42. received DISPDUType 49 LIVE_ENTITY_FIRE (timestamp 12:04:54, size 69 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 43. received DISPDUType 44 LINEAR_OBJECT_STATE (timestamp 12:04:54, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 44. received DISPDUType 39 MINEFIELD_DATA (timestamp 12:04:58, size 44 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 45. received DISPDUType 38 MINEFIELD_QUERY (timestamp 12:04:58, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 46. received DISPDUType 40 MINEFIELD_RESPONSE_NACK (timestamp 12:04:59, size 26 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 47. received DISPDUType 37 MINEFIELD_STATE (timestamp 12:05:01, size 72 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 48. received DISPDUType 43 POINT_OBJECT_STATE (timestamp 12:05:07, size 91 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 49. received DISPDUType 27 RECEIVER (timestamp 12:05:08, size 36 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 50. received DISPDUType 65 RECORD_QUERY_RELIABLE (timestamp 12:05:10, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 51. received DISPDUType 63 RECORD_RELIABLE (timestamp 12:05:10, size 36 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 52. received DISPDUType 12 REMOVE_ENTITY (timestamp 12:05:10, size 28 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 53. received DISPDUType 52 REMOVE_ENTITY_RELIABLE (timestamp 12:05:10, size 32 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 54. received DISPDUType 9 REPAIR_COMPLETE (timestamp 12:05:11, size 28 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 55. received DISPDUType 10 REPAIR_RESPONSE (timestamp 12:05:11, size 28 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 56. received DISPDUType 8 RESUPPLY_CANCEL (timestamp 12:05:12, size 24 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 57. received DISPDUType 6 RESUPPLY_OFFER (timestamp 12:05:12, size 28 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 58. received DISPDUType 7 RESUPPLY_RECEIVED (timestamp 12:05:12, size 28 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 59. received DISPDUType 30 SUPPLEMENTAL_EMISSION_ENTITY_STATE (timestamp 12:05:12, size 28 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 60. received DISPDUType 5 SERVICE_REQUEST (timestamp 12:05:13, size 28 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 61. received DISPDUType 19 SET_DATA (timestamp 12:05:13, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 62. received DISPDUType 59 SET_DATA_RELIABLE (timestamp 12:05:13, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 63. received DISPDUType 64 SET_RECORD_RELIABLE (timestamp 12:05:13, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 64. received DISPDUType 26 SIGNAL (timestamp 12:05:14, size 33 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 65. received DISPDUType 13 START_RESUME (timestamp 12:05:14, size 44 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 66. received DISPDUType 53 START_RESUME_RELIABLE (timestamp 12:05:14, size 48 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 67. received DISPDUType 14 STOP_FREEZE (timestamp 12:05:15, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 68. received DISPDUType 54 STOP_FREEZE_RELIABLE (timestamp 12:05:15, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 69. received DISPDUType 35 TRANSFER_OWNERSHIP (timestamp 12:05:18, size 40 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 70. received DISPDUType 25 TRANSMITTER (timestamp 12:05:21, size 107 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 71. received DISPDUType 46 TIME_SPACE_POSITION_INFORMATION (timestamp 12:05:25, size 56 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 72. received DISPDUType 29 UNDERWATER_ACOUSTIC (timestamp 12:05:25, size 32 bytes) Closing recorder log file: C:\x3d-github\open-dis7-java\pduLog\PduCaptureLog.dislog pduReceivedMap.size()=72, pduSentMap.size()=72, match=true @@ -110,8 +109,8 @@ Total PDUs: 72 End of replay from PduCaptureLog.dislog BitFieldRoundTripTest [edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] Using network interface Intel(R) Dual Band Wireless-AC 8260 -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 73. received DISPDUType 1 ENTITY_STATE (timestamp 05:28:08, size 144 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 1. received DISPDUType 1 ENTITY_STATE (timestamp 05:28:08, size 144 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 73. received DISPDUType 1 ENTITY_STATE (timestamp 12:16:37, size 144 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 1. received DISPDUType 1 ENTITY_STATE (timestamp 12:16:37, size 144 bytes) Sent pdu: Alternative EntityType: EntityType: entityKind: EntityKind 0 OTHER @@ -180,7 +179,7 @@ Pdu Status: PduStatus: 00101000 Pdu Type: DISPDUType 1 ENTITY_STATE Protocol Family: DISProtocolFamily 1 ENTITY_INFORMATION_INTERACTION Protocol Version: DISProtocolVersion 7 IEEE_12781_2012 -Timestamp: -1074711773 +Timestamp: 2146597213 Variable Parameters: [] Rcvd pdu: @@ -251,19 +250,19 @@ Pdu Status: PduStatus: 00101000 Pdu Type: DISPDUType 1 ENTITY_STATE Protocol Family: DISProtocolFamily 1 ENTITY_INFORMATION_INTERACTION Protocol Version: DISProtocolVersion 7 IEEE_12781_2012 -Timestamp: -1074711773 +Timestamp: 2146597213 Variable Parameters: [] EntityStatePduTest [edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] Using network interface Intel(R) Dual Band Wireless-AC 8260 -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 2. received DISPDUType 1 ENTITY_STATE (timestamp 05:31:58, size 144 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 1. received DISPDUType 1 ENTITY_STATE (timestamp 05:31:58, size 144 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 2. received DISPDUType 1 ENTITY_STATE (timestamp 05:31:58, size 144 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 2. received DISPDUType 1 ENTITY_STATE (timestamp 12:20:10, size 144 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 1. received DISPDUType 1 ENTITY_STATE (timestamp 12:20:10, size 144 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 2. received DISPDUType 1 ENTITY_STATE (timestamp 12:20:10, size 144 bytes) CreateAllPduTypesTest FixedAndVariableDatumRoundTripTest [edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] Using network interface Intel(R) Dual Band Wireless-AC 8260 -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 1. received DISPDUType 17 ACTION_RESPONSE (timestamp 05:37:20, size 128 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 3. received DISPDUType 17 ACTION_RESPONSE (timestamp 05:37:20, size 128 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 1. received DISPDUType 17 ACTION_RESPONSE (timestamp 12:25:54, size 128 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 3. received DISPDUType 17 ACTION_RESPONSE (timestamp 12:25:54, size 128 bytes) X3dInterpolatorsTest testInterpolators Replaying DIS logs. @@ -370,7 +369,7 @@ Sent PDU: DISPDUType 41 ENVIRONMENTAL_PROCESS Sent PDU: DISPDUType 41 ENVIRONMENTAL_PROCESS Sent PDU: DISPDUType 1 ENTITY_STATE Sent PDU: DISPDUType 20 DATA -100Sent PDU: DISPDUType 41 ENVIRONMENTAL_PROCESS +Sent PDU: DISPDUType 41 ENVIRONMENTAL_PROCESS Sent PDU: DISPDUType 1 ENTITY_STATE Sent PDU: DISPDUType 1 ENTITY_STATE Sent PDU: DISPDUType 25 TRANSMITTER @@ -522,36 +521,36 @@ Writing X3D LineSet CommentPdusTest [edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] Using network interface Intel(R) Dual Band Wireless-AC 8260 -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 1. received DISPDUType 22 COMMENT (timestamp 06:39:27, size 32 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 2. received DISPDUType 22 COMMENT (timestamp 06:41:28, size 56 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 3. received DISPDUType 22 COMMENT (timestamp 06:43:28, size 72 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 4. received DISPDUType 22 COMMENT (timestamp 06:45:27, size 128 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 5. received DISPDUType 62 COMMENT_RELIABLE (timestamp 06:47:28, size 32 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 6. received DISPDUType 62 COMMENT_RELIABLE (timestamp 06:49:28, size 56 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 7. received DISPDUType 62 COMMENT_RELIABLE (timestamp 06:51:29, size 88 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 8. received DISPDUType 62 COMMENT_RELIABLE (timestamp 06:53:29, size 128 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 1. received DISPDUType 22 COMMENT (timestamp 19:49:51, size 32 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 2. received DISPDUType 22 COMMENT (timestamp 19:51:54, size 56 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 3. received DISPDUType 22 COMMENT (timestamp 19:53:57, size 72 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 4. received DISPDUType 22 COMMENT (timestamp 19:55:57, size 128 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 5. received DISPDUType 62 COMMENT_RELIABLE (timestamp 19:57:57, size 32 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 6. received DISPDUType 62 COMMENT_RELIABLE (timestamp 19:59:57, size 56 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 7. received DISPDUType 62 COMMENT_RELIABLE (timestamp 20:01:58, size 88 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 8. received DISPDUType 62 COMMENT_RELIABLE (timestamp 20:03:57, size 128 bytes) PduFactoryTest MarshalEnumsTest DataQueryPduRoundTripTest [edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] Using network interface Intel(R) Dual Band Wireless-AC 8260 -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 1. received DISPDUType 18 DATA_QUERY (timestamp 06:58:48, size 128 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 9. received DISPDUType 18 DATA_QUERY (timestamp 06:58:48, size 128 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 1. received DISPDUType 18 DATA_QUERY (timestamp 20:09:59, size 128 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 9. received DISPDUType 18 DATA_QUERY (timestamp 20:09:59, size 128 bytes) CreateAllObjectTypesTest SignalPdusTest Recorder log file open: C:\x3d-github\open-dis7-java\pduLog\PduCaptureLog.dislog [edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] Using network interface Intel(R) Dual Band Wireless-AC 8260 class edu.nps.moves.dis7.utilities.stream.PduRecorder listening to IP address 225.4.5.6 on port 3000 -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 2. received DISPDUType 26 SIGNAL (timestamp 07:02:06, size 33 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 1. received DISPDUType 26 SIGNAL (timestamp 07:02:06, size 33 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 2. received DISPDUType 26 SIGNAL (timestamp 07:02:06, size 50 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 3. received DISPDUType 31 INTERCOM_SIGNAL (timestamp 07:02:06, size 33 bytes) -[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 4. received DISPDUType 31 INTERCOM_SIGNAL (timestamp 07:02:06, size 58 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 2. received DISPDUType 26 SIGNAL (timestamp 20:13:27, size 33 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 1. received DISPDUType 26 SIGNAL (timestamp 20:13:27, size 33 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 2. received DISPDUType 26 SIGNAL (timestamp 20:13:27, size 50 bytes) +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 3. received DISPDUType 31 INTERCOM_SIGNAL (timestamp 20:13:29, size 33 bytes) +ENCODING_PLAINTEXT +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] 4. received DISPDUType 31 INTERCOM_SIGNAL (timestamp 20:13:29, size 58 bytes) testRoundTripNet Closing recorder log file: C:\x3d-github\open-dis7-java\pduLog\PduCaptureLog.dislog testRoundTripLog Replaying DIS logs. -ENCODING_PLAINTEXT Replaying C:\x3d-github\open-dis7-java\.\pduLog\PduCaptureLog.dislog Total PDUs: 4 End of replay from PduCaptureLog.dislog @@ -562,6 +561,9 @@ Name: edu.nps.moves.dis7.objectTypes.LinearObject.Obstacle.ConcertinaWire._2Roll 01 01 02 01 Name: edu.nps.moves.dis7.objectTypes.LinearObject.Culturalfeature.TracksTire.TracksTire Domain: PlatformDomain 1 LAND Kind: ObjectKind 3 CULTURAL_FEATURE Category: 2 Subcategory: 0 01 03 02 00 +EntityStatePduTest +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] Using network interface Intel(R) Dual Band Wireless-AC 8260 +[edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface] Exception in DisThreadedNetIF send thread: null NullFieldsEntityMarshallTest . '-- JUnit Jupiter [OK] @@ -593,28 +595,47 @@ NullFieldsEntityMarshallTest +-- Object Type Marshal Test [OK] | +-- testGoodMarshall() [OK] | '-- testNoSubCategory() [OK] + +-- Fire Pdu Test [OK] + | '-- testRoundTrip() [X] No response from network receive after 100 msec ==> expected: <true> but was: <false> '-- Null Fields Entity Marshall Test [OK] +-- testGoodMarshall() [OK] '-- testNoSpecificNoExtraMarshal() [OK] -Test run finished after 5687 ms -[ 15 containers found ] +Failures (1): + JUnit Jupiter:Fire Pdu Test:testRoundTrip() + MethodSource [className = 'edu.nps.moves.dis7.FirePduTest', methodName = 'testRoundTrip', methodParameterTypes = ''] + => org.opentest4j.AssertionFailedError: No response from network receive after 100 msec ==> expected: <true> but was: <false> + org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55) + org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:40) + org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:193) + edu.nps.moves.dis7.FirePduTest.testOnePdu(FirePduTest.java:47) + edu.nps.moves.dis7.FirePduTest.testRoundTrip(FirePduTest.java:36) + java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + java.base/java.lang.reflect.Method.invoke(Method.java:564) + org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686) + [...] + +Test run finished after 4167 ms +[ 16 containers found ] [ 0 containers skipped ] -[ 15 containers started ] +[ 16 containers started ] [ 0 containers aborted ] -[ 15 containers successful ] +[ 16 containers successful ] [ 0 containers failed ] -[ 17 tests found ] +[ 18 tests found ] [ 0 tests skipped ] -[ 17 tests started ] +[ 18 tests started ] [ 0 tests aborted ] [ 17 tests successful ] -[ 0 tests failed ] +[ 1 tests failed ] -Processing C:\x3d-github\open-dis7-java\build\test\results\TESTS-TestSuites.xml to C:\Users\brutzman\AppData\Local\Temp\null576637417 +Java Result: 1 +Processing C:\x3d-github\open-dis7-java\build\test\results\TESTS-TestSuites.xml to C:\Users\brutzman\AppData\Local\Temp\null450115148 Loading stylesheet jar:file:/C:/apache-ant-1.10.8/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl -Transform time: 311ms -Deleting: C:\Users\brutzman\AppData\Local\Temp\null576637417 +Transform time: 580ms +Deleting: C:\Users\brutzman\AppData\Local\Temp\null450115148 ================ javadoc: Generating Javadoc @@ -22412,8 +22433,6 @@ Constructing Javadoc information... Creating destination directory: "C:\x3d-github\open-dis7-java\javadoc\" Standard Doclet version 14.0.2 Building tree for all the packages and classes... -C:\x3d-github\open-dis7-java\src\edu\nps\moves\dis7\examples\EntityStateEntityIdExampleUse.java:75: warning: no description for @throws - * @throws IOException C:\x3d-github\open-dis7-java\src-generated\edu\nps\moves\dis7\pdus\Domain.java:39: warning: no description for @param * @param d C:\x3d-github\open-dis7-java\src-generated\edu\nps\moves\dis7\pdus\Domain.java:40: warning: no description for @return @@ -22426,15 +22445,10 @@ C:\x3d-github\open-dis7-java\src-generated\edu\nps\moves\dis7\pdus\Domain.java:5 * @param d C:\x3d-github\open-dis7-java\src-generated\edu\nps\moves\dis7\pdus\Domain.java:60: warning: no description for @return * @return -C:\x3d-github\open-dis7-java\src\edu\nps\moves\dis7\utilities\PduFactory.java:62: error: reference not found - * @see edu.nps.moves.dis7.EntityType -C:\x3d-github\open-dis7-java\src\edu\nps\moves\dis7\utilities\PduFactory.java:63: error: reference not found - * @see edu.nps.moves.dis7.RadioType Building index for all the packages and classes... Building index for all classes... Generating C:\x3d-github\open-dis7-java\javadoc\help-doc.html... -2 errors -7 warnings +6 warnings ================ jar: manifest.name = OpenDIS7 Protocol Data Units (PDUs) @@ -22443,7 +22457,7 @@ Specification-Title = IEEE Distributed Interactive Simulation (DIS) Protocol Specification-Version = 7 Specification-Vendor = Institute of Electrical and Electronics Engineers (IEEE) Implementation-Title = edu.nps.moves.dis7 -Implementation-Version = 30 August 2020 20:43:49 +Implementation-Version = 31 August 2020 16:28:12 Implementation-Vendor = Naval Postgraduate School (NPS) jar-classes: Building jar: C:\x3d-github\open-dis7-java\dist\open-dis7-pdus-classes.jar @@ -22452,4 +22466,4 @@ Building jar: C:\x3d-github\open-dis7-java\dist\open-dis7-pdus-source.jar jar-javadoc: Building jar: C:\x3d-github\open-dis7-java\dist\open-dis7-pdus-javadoc.jar build all complete -BUILD SUCCESSFUL (total time: 4 minutes 11 seconds) +BUILD SUCCESSFUL (total time: 4 minutes 57 seconds) diff --git a/src/edu/nps/moves/dis7/examples/EntityStateEntityIdExampleUse.java b/src/edu/nps/moves/dis7/examples/EntityStateEntityIdExampleUse.java index dea7082411276f4ae38145fc3de485977540e203..6cab74715cadd681273efc4459d11ec460dfce06 100644 --- a/src/edu/nps/moves/dis7/examples/EntityStateEntityIdExampleUse.java +++ b/src/edu/nps/moves/dis7/examples/EntityStateEntityIdExampleUse.java @@ -72,7 +72,7 @@ public class EntityStateEntityIdExampleUse { /** * Using two methods, create and send an EntityStatePDU, describing an AD44 Shenandoah destroyer tender, uid 11963. - * @throws IOException + * @throws IOException report if problem occurs */ public static void exampleUse() throws Exception { diff --git a/src/edu/nps/moves/dis7/utilities/DisThreadedNetworkInterface.java b/src/edu/nps/moves/dis7/utilities/DisThreadedNetworkInterface.java index 5b1e25e74058cf44406fe1208d018d9639a166e8..44af68aeea968b1839cf95153197f6296315ec13 100644 --- a/src/edu/nps/moves/dis7/utilities/DisThreadedNetworkInterface.java +++ b/src/edu/nps/moves/dis7/utilities/DisThreadedNetworkInterface.java @@ -38,25 +38,25 @@ public class DisThreadedNetworkInterface /** Raw pdu listener class and interface */ public interface RawPduListener { - void incomingPdu(BuffAndLength bAndL); + void incomingPdu(ByteArrayBufferAndLength bAndL); } /** * Stores data for further processing */ - public class BuffAndLength + public class ByteArrayBufferAndLength { - public byte[] buff; + public byte[] bufferByteArray; public int length; /** * Default constructor for data storage - * @param buff the data buffer to store + * @param bufferByteArray the data buffer to store * @param length the length of the data buffer */ - public BuffAndLength(byte[] buff, int length) + public ByteArrayBufferAndLength(byte[] bufferByteArray, int length) { - this.buff = buff; + this.bufferByteArray = bufferByteArray; this.length = length; } } @@ -220,8 +220,8 @@ public class DisThreadedNetworkInterface // The capacity could go up to MAX_DIS_PDU_SIZE, but this should be good for now // The raw listeners will strip off any extra padding and process what is // required - ByteBuffer buffer = ByteBuffer.allocate(MAX_TRANSMISSION_UNIT_SIZE); - DatagramPacket packet = new DatagramPacket(buffer.array(), buffer.capacity()); + ByteBuffer byteBuffer = ByteBuffer.allocate(MAX_TRANSMISSION_UNIT_SIZE); + DatagramPacket packet = new DatagramPacket(byteBuffer.array(), byteBuffer.capacity()); Pdu pdu; while (!killed) { // keep trying on error @@ -239,7 +239,7 @@ public class DisThreadedNetworkInterface socket.receive(packet); // blocks here waiting for next DIS pdu to be received on multicast IP and specified port toRawListeners(packet.getData(), packet.getLength()); - pdu = pduFactory.createPdu(buffer); + pdu = pduFactory.createPdu(byteBuffer); if (pdu != null) { @@ -253,7 +253,7 @@ public class DisThreadedNetworkInterface } toListeners(pdu); } - buffer.clear(); + byteBuffer.clear(); } } catch (IOException ex) { @@ -332,7 +332,7 @@ public class DisThreadedNetworkInterface if(rawListeners.isEmpty()) return; - BuffAndLength bl = new BuffAndLength(data, len); + ByteArrayBufferAndLength bl = new ByteArrayBufferAndLength(data, len); rawListeners.forEach(lis->lis.incomingPdu(bl)); } diff --git a/src/edu/nps/moves/dis7/utilities/TrialDisMulticastNetworkingDeprecated.java b/src/edu/nps/moves/dis7/utilities/TrialDisMulticastNetworkingDeprecated.java index 18d7f408252827d9957c15aecb4d77b934c26697..ecb816665696ce25b245b2f3ceffc9f58a2ea71f 100644 --- a/src/edu/nps/moves/dis7/utilities/TrialDisMulticastNetworkingDeprecated.java +++ b/src/edu/nps/moves/dis7/utilities/TrialDisMulticastNetworkingDeprecated.java @@ -24,14 +24,14 @@ import java.util.logging.Logger; @Deprecated(since="dis7") public class TrialDisMulticastNetworkingDeprecated { - public class BuffAndLength + public class ByteArrayBufferAndLength { - public byte[] buff; + public byte[] bufferByteArray; public int length; - public BuffAndLength(byte[] buff, int length) + public ByteArrayBufferAndLength(byte[] bufferByteArray, int length) { - this.buff = buff; + this.bufferByteArray = bufferByteArray; this.length = length; } } @@ -92,14 +92,14 @@ public class TrialDisMulticastNetworkingDeprecated public Pdu receivePdu() throws IOException { PduFactory pduFactory = new PduFactory(); - BuffAndLength blen = receiveRawPdu(); - return pduFactory.createPdu(blen.buff); + ByteArrayBufferAndLength blen = receiveRawPdu(); + return pduFactory.createPdu(blen.bufferByteArray); } private MulticastSocket rsocket; byte buffer[]; DatagramPacket packet; - public BuffAndLength receiveRawPdu() throws IOException + public ByteArrayBufferAndLength receiveRawPdu() throws IOException { rsocket = new MulticastSocket(DIS_PORT); rsocket.joinGroup(group, ni); @@ -113,7 +113,7 @@ public class TrialDisMulticastNetworkingDeprecated rsocket.leaveGroup(group, ni); rsocket.close(); rsocket = null; - return new BuffAndLength(packet.getData(), packet.getLength()); + return new ByteArrayBufferAndLength(packet.getData(), packet.getLength()); } public void sendPdu(Pdu pdu) throws Exception diff --git a/src/edu/nps/moves/dis7/utilities/stream/PduReceiver.java b/src/edu/nps/moves/dis7/utilities/stream/PduReceiver.java index 6ea3a2fcb616f1ea5c83f7e79cfe52eeb0f20033..bebef36f1b3fefa5c9b50ea1dbc2f9d23ea1d87d 100644 --- a/src/edu/nps/moves/dis7/utilities/stream/PduReceiver.java +++ b/src/edu/nps/moves/dis7/utilities/stream/PduReceiver.java @@ -13,8 +13,8 @@ public interface PduReceiver /** Receives a PDU and writes its raw contents to an output file for later * playback and inspection. * - * @param buff the array containing raw PDU data + * @param bufferByteArray the array containing raw PDU data * @param len the length of the buffer */ - void receivePdu(byte[] buff, int len); + void receivePdu(byte[] bufferByteArray, int len); } diff --git a/src/edu/nps/moves/dis7/utilities/stream/PduRecorder.java b/src/edu/nps/moves/dis7/utilities/stream/PduRecorder.java index a208d25d0b611799e02289415b66e87dde39f0c3..6bd4a577cd49d51644974e9108bee5d4f9d2756a 100644 --- a/src/edu/nps/moves/dis7/utilities/stream/PduRecorder.java +++ b/src/edu/nps/moves/dis7/utilities/stream/PduRecorder.java @@ -101,8 +101,8 @@ public class PduRecorder implements PduReceiver disRawPduListener = new DisThreadedNetworkInterface.RawPduListener() { @Override - public void incomingPdu(DisThreadedNetworkInterface.BuffAndLength bAndL) { - receivePdu(bAndL.buff, bAndL.length); + public void incomingPdu(DisThreadedNetworkInterface.ByteArrayBufferAndLength bAndL) { + receivePdu(bAndL.bufferByteArray, bAndL.length); } }; diff --git a/src/edu/nps/moves/dis7/utilities/stream/X3dCreateInterpolators.java b/src/edu/nps/moves/dis7/utilities/stream/X3dCreateInterpolators.java index 82e42815db745ea7fbd74cf6b1860bf77a6ae04b..dc308f24123b4c7e4b1f4750ac8a4e594b307d04 100644 --- a/src/edu/nps/moves/dis7/utilities/stream/X3dCreateInterpolators.java +++ b/src/edu/nps/moves/dis7/utilities/stream/X3dCreateInterpolators.java @@ -55,9 +55,9 @@ public class X3dCreateInterpolators { // ToDO figure out how to do this! makeEntityStatePDU EntityStatePdu localEspdu = pduFactory.makeEntityStatePdu(); //Put all the data we need into the localEspdu - ByteBuffer espduBuffer = ByteBuffer.wrap(bufferShort); + ByteBuffer espduByteBuffer = ByteBuffer.wrap(bufferShort); try { - localEspdu.unmarshal(espduBuffer); + localEspdu.unmarshal(espduByteBuffer); } catch (Exception ex) { Logger.getLogger(X3dCreateInterpolators.class.getName()).log(Level.SEVERE, null, ex); } diff --git a/src/edu/nps/moves/dis7/utilities/stream/X3dCreateLineSet.java b/src/edu/nps/moves/dis7/utilities/stream/X3dCreateLineSet.java index be34f521831c5ef823a4eff8534d933ee6bc7522..8e68160be2ae70f83ea4c0324fda9d8b0530c81a 100644 --- a/src/edu/nps/moves/dis7/utilities/stream/X3dCreateLineSet.java +++ b/src/edu/nps/moves/dis7/utilities/stream/X3dCreateLineSet.java @@ -55,9 +55,9 @@ public class X3dCreateLineSet { // ToDO figure out how to do this! makeEntityStatePDU EntityStatePdu localEspdu = pduFactory.makeEntityStatePdu(); //Put all the data we need into the localEspdu - ByteBuffer espduBuffer = ByteBuffer.wrap(bufferShort); + ByteBuffer espduByteBuffer = ByteBuffer.wrap(bufferShort); try { - localEspdu.unmarshal(espduBuffer); + localEspdu.unmarshal(espduByteBuffer); } catch (Exception ex) { Logger.getLogger(X3dCreateLineSet.class.getName()).log(Level.SEVERE, null, ex); } diff --git a/test/edu/nps/moves/dis7/CommentPdusTest.java b/test/edu/nps/moves/dis7/CommentPdusTest.java index 1c680b5d7ecde60b61a49dc02f4a47600c0c2d94..193b7610995acd2824da3747ffeae74bf07ba7c3 100644 --- a/test/edu/nps/moves/dis7/CommentPdusTest.java +++ b/test/edu/nps/moves/dis7/CommentPdusTest.java @@ -73,6 +73,7 @@ public class CommentPdusTest { sendPdu(newPdu); // will wait a while assertTrue(receivedPdu != null, "No response from network receiver"); + String marshallMismatchMessage = "Marshalled size mismatch," + "sent (" + newPdu.getMarshalledSize() + " bytes) and " + diff --git a/test/edu/nps/moves/dis7/EntityStatePduTest.java b/test/edu/nps/moves/dis7/EntityStatePduTest.java index 5451a7b9cdc4adaf2db260d87f36797ab7e39245..c448c5996cb332c4bedb3c7c77dd3286fabd1e75 100644 --- a/test/edu/nps/moves/dis7/EntityStatePduTest.java +++ b/test/edu/nps/moves/dis7/EntityStatePduTest.java @@ -49,15 +49,18 @@ public class EntityStatePduTest extends PduTest testOnePdu(espdu.setEntityID(entityID).setEntityType(entityType)); } - /** Test single PDU for correctness according to all contained fields in this PDU type - * @param newPdu PDU of interest*/ + /** + * Test single PDU for correctness according to all contained fields in this PDU type + * See <a href="https://en.wikipedia.org/wiki/Marshalling_(computer_science)" target="_blank">https://en.wikipedia.org/wiki/Marshalling_(computer_science)</a> + * @param newPdu separate PDU for comparison + */ @Override protected void testOnePdu(Pdu newPdu) { sendPdu(newPdu); // will wait a while - assertTrue(receivedPdu != null, "No response from network receive"); + assertTrue(receivedPdu != null, "No response from network receive after " + getThreadSleepInterval() + " msec"); - testPduHeader(newPdu); + testPduHeaderMatch(newPdu); // can cast PDUs at this point since PduType matched EntityStatePdu newEspdu = (EntityStatePdu) newPdu; diff --git a/test/edu/nps/moves/dis7/FirePduTest.java b/test/edu/nps/moves/dis7/FirePduTest.java index b576ee84d06b8904ddbf40cba69f09bbab90fe8b..9b0492c1ad55c4d0b72d400bf6589aa89a417b75 100644 --- a/test/edu/nps/moves/dis7/FirePduTest.java +++ b/test/edu/nps/moves/dis7/FirePduTest.java @@ -30,36 +30,23 @@ public class FirePduTest extends PduTest FirePdu firePdu = pduFactory.makeFirePdu(); // TODO alternate constructors and utility methods - EntityID entityID = new EntityID().setSiteID((short)1).setApplicationID((short)2).setEntityID((short)3); - EntityType entityType = new EntityType() - .setEntityKind (EntityKind.PLATFORM).setEntityKind(EntityKind.PLATFORM) //(short) 1); // Platform (vs lifeform, munition, sensor, etc.); //(short) 1); // Platform (vs lifeform, munition, sensor, etc.) - .setCountry (Country.UNITED_STATES_OF_AMERICA_USA) // 225 USA - .setDomain (Domain.inst(PlatformDomain.LAND)) // Land (vs air, surface, subsurface, space) - .setCategory ((byte) 1) // Tank - .setSubCategory((byte) 1) // M1 Abrams - .setSpecific ((byte) 3); // M1A2 Abrams // TODO update PDU-specific tests - -// firePdu.setEntityType(entityType); -// // Alternate way using entity jar(s) -// firePdu.setEntityType(new edu.nps.moves.dis7.entities.usa.platform.land.M1A2()); -// // or simply use an enumeration by name, with accompanying import statement above -// firePdu.setEntityType(new M1A2()); -// -// testOnePdu(firePdu); -// testOnePdu(firePdu.setEntityID(entityID).setEntityType(entityType)); + + testOnePdu(firePdu); } /** Test single PDU for correctness according to all contained fields in this PDU type - * @param newPdu PDU of interest */ + * See <a href="https://en.wikipedia.org/wiki/Marshalling_(computer_science)" target="_blank">https://en.wikipedia.org/wiki/Marshalling_(computer_science)</a> + * @param newPdu separate PDU for comparison + */ @Override protected void testOnePdu(Pdu newPdu) { sendPdu(newPdu); // will wait a while - assertTrue(receivedPdu != null, "No response from network receive"); + assertTrue(receivedPdu != null, "No response from network receive after " + getThreadSleepInterval() + " msec"); - testPduHeader(newPdu); + testPduHeaderMatch(newPdu); // can cast PDUs at this point since PduType matched FirePdu newEspdu = (FirePdu) newPdu; diff --git a/test/edu/nps/moves/dis7/MarshalEnumsTest.java b/test/edu/nps/moves/dis7/MarshalEnumsTest.java index 4b89299d07e44d9470ce4b0ea7ed44756fddfe9e..5a6f3dff0dacc31bc5caa313c22564dd2d410d1b 100644 --- a/test/edu/nps/moves/dis7/MarshalEnumsTest.java +++ b/test/edu/nps/moves/dis7/MarshalEnumsTest.java @@ -526,20 +526,20 @@ public class MarshalEnumsTest private void marshalOne(Enum en) throws Throwable { - ByteBuffer bb = ByteBuffer.allocate(100); - marshalIt(en, bb); + ByteBuffer byteBuffer = ByteBuffer.allocate(100); + marshalIt(en, byteBuffer); int sz = getMarshalSize(en); - assertEquals(sz, bb.position(), "Marshalled array should be " + sz + " bytes long"); + assertEquals(sz, byteBuffer.position(), "Marshalled array should be " + sz + " bytes long"); // dump(en, sz, bb); count++; } - private void marshalIt(Enum en, ByteBuffer bb) throws Throwable + private void marshalIt(Enum en, ByteBuffer byteBuffer) throws Throwable { Class<?> c = en.getClass(); Method meth = c.getDeclaredMethod("marshal", new Class[]{ByteBuffer.class}); - meth.invoke(en, bb); + meth.invoke(en, byteBuffer); } private int getMarshalSize(Enum en) throws Throwable @@ -554,10 +554,10 @@ public class MarshalEnumsTest Throwable thr = null; try { Exception ex = null; - ByteBuffer bb = ByteBuffer.allocate(100); - bs.marshal(bb); + ByteBuffer byteBuffer = ByteBuffer.allocate(100); + bs.marshal(byteBuffer); int sz = bs.getMarshalledSize(); - assertEquals(sz, bb.position(), "Marshalled array should be " + sz + " bytes long"); + assertEquals(sz, byteBuffer.position(), "Marshalled array should be " + sz + " bytes long"); //System.out.print(s + " "); // dump(bs, bb); } diff --git a/test/edu/nps/moves/dis7/NullFieldsEntityMarshallTest.java b/test/edu/nps/moves/dis7/NullFieldsEntityMarshallTest.java index bc04d84ebd9cff90c98a151b81e22f33e6e0adb4..7f957c06943029d4e7906700332807ecebe5c23d 100644 --- a/test/edu/nps/moves/dis7/NullFieldsEntityMarshallTest.java +++ b/test/edu/nps/moves/dis7/NullFieldsEntityMarshallTest.java @@ -47,10 +47,10 @@ public class NullFieldsEntityMarshallTest public void testNoSpecificNoExtraMarshal() { Exception ex=null; - ByteBuffer bb = ByteBuffer.allocate(100); + ByteBuffer byteBuffer = ByteBuffer.allocate(100); try { //dumpET(lav105); - lav105.marshal(bb); + lav105.marshal(byteBuffer); //dumpBb(bb); } catch(Exception e) { @@ -58,7 +58,7 @@ public class NullFieldsEntityMarshallTest ex = e; } assertNull(ex,"Exception should be null if successful marshal"); - assertEquals(8, bb.position(), "Marshalled array should be 8 bytes long"); + assertEquals(8, byteBuffer.position(), "Marshalled array should be 8 bytes long"); } @Test @@ -69,7 +69,7 @@ public class NullFieldsEntityMarshallTest lav105.setExtra((byte)0xff); lav105.setSpecific((byte)0xff); Exception ex=null; - ByteBuffer bb = ByteBuffer.allocate(100); + ByteBuffer byteBuffer = ByteBuffer.allocate(100); try { dumpET(lav105); lav105.marshal(bb); @@ -83,21 +83,21 @@ public class NullFieldsEntityMarshallTest */ } - private void dumpBb(ByteBuffer bb) + private void dumpBb(ByteBuffer byteBuffer) { - for (int i=0;i<bb.position();i++) - System.out.print(String.format("%02X ", bb.array()[i])); + for (int i=0;i<byteBuffer.position();i++) + System.out.print(String.format("%02X ", byteBuffer.array()[i])); System.out.println(); } - private void dumpET(EntityType et) + private void dumpET(EntityType entityType) { - System.out.println("LAV_105 country: "+et.getCountry()); - System.out.println("LAV_105 domain: "+et.getDomain()); - System.out.println("LAV_105 entity kind: "+et.getEntityKind()); - System.out.println("LAV_105 category: "+et.getCategory()); - System.out.println("LAV_105 subcategory: "+et.getSubCategory()); - System.out.println("LAV_105 specific: "+et.getSpecific()); - System.out.println("LAV_105 extra: "+et.getExtra()); + System.out.println("LAV_105 country: " + entityType.getCountry()); + System.out.println("LAV_105 domain: " + entityType.getDomain()); + System.out.println("LAV_105 entity kind: " + entityType.getEntityKind()); + System.out.println("LAV_105 category: " + entityType.getCategory()); + System.out.println("LAV_105 subcategory: " + entityType.getSubCategory()); + System.out.println("LAV_105 specific: " + entityType.getSpecific()); + System.out.println("LAV_105 extra: " + entityType.getExtra()); } public static void main(String[] args) diff --git a/test/edu/nps/moves/dis7/ObjectTypeMarshallTest.java b/test/edu/nps/moves/dis7/ObjectTypeMarshallTest.java index 165d2d36cc874bcda2f366db9766e768c2930162..02c2dd9cb7ca8add51da9f6db80aac24eb40d52a 100644 --- a/test/edu/nps/moves/dis7/ObjectTypeMarshallTest.java +++ b/test/edu/nps/moves/dis7/ObjectTypeMarshallTest.java @@ -58,17 +58,17 @@ public class ObjectTypeMarshallTest private void common(ObjectType ot) throws Throwable { Exception ex = null; - ByteBuffer bb = ByteBuffer.allocate(100); + ByteBuffer byteBuffer = ByteBuffer.allocate(100); dumpOT(ot); - ot.marshal(bb); - assertEquals(4, bb.position(), "Marshalled array should be 4 bytes long"); - dumpBb(bb); + ot.marshal(byteBuffer); + assertEquals(4, byteBuffer.position(), "Marshalled array should be 4 bytes long"); + dumpBb(byteBuffer); } - private void dumpBb(ByteBuffer bb) + private void dumpBb(ByteBuffer byteBuffer) { - for (int i = 0; i < bb.position(); i++) { - System.out.print(String.format("%02X ", bb.array()[i])); + for (int i = 0; i < byteBuffer.position(); i++) { + System.out.print(String.format("%02X ", byteBuffer.array()[i])); } System.out.println(); } diff --git a/test/edu/nps/moves/dis7/PduTest.java b/test/edu/nps/moves/dis7/PduTest.java index 2d9c43a81f1c882edf9907991632eb4ccc8f5b65..ed92bfc4ed49c8e0d1a661be3acf3d08bd16560f 100644 --- a/test/edu/nps/moves/dis7/PduTest.java +++ b/test/edu/nps/moves/dis7/PduTest.java @@ -44,13 +44,15 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; /** - * - * @author brutzman + * Abstract superclass for PDU testing, originally extracted using Netbeans refactoring feature. + * @author Don Brutzman */ abstract public class PduTest { - + protected final long THREAD_SLEEP_INTERVAL_MSEC_DEFAULT = 100l; + private long threadSleepInterval = THREAD_SLEEP_INTERVAL_MSEC_DEFAULT; + @BeforeAll public static void setUpClass() { @@ -94,7 +96,7 @@ abstract public class PduTest try { disNetworkInterface.send(pdu); - Thread.sleep(100); + Thread.sleep(getThreadSleepInterval()); // TODO better way to wait? } catch (InterruptedException ex) { System.err.println("Error sending Multicast: " + ex.getLocalizedMessage()); @@ -102,7 +104,7 @@ abstract public class PduTest } } - /** Compare all values of these two obects and report if identical + /** Compare all values of these two objects and report if identical * @param pdu1 first pdu * @param pdu2 second pdu * @return true if identical values found */ @@ -118,8 +120,12 @@ abstract public class PduTest { receivedPdu = newPdu; } - /** Common tests for fields in PDU header */ - protected void testPduHeader (Pdu newPdu) + /** + * Common tests for fields in PDU header + * See <a href="https://en.wikipedia.org/wiki/Marshalling_(computer_science)" target="_blank">https://en.wikipedia.org/wiki/Marshalling_(computer_science)</a> + * @param newPdu separate PDU for comparison + */ + protected void testPduHeaderMatch (Pdu newPdu) { assertEquals ( newPdu.getProtocolVersion(), receivedPdu.getProtocolVersion(), "mismatched ProtocolVersion"); // TODO compatibility version @@ -136,7 +142,24 @@ abstract public class PduTest public abstract void testRoundTrip(); /** Test single PDU for correctness according to all contained fields in this PDU type - * @param newPdu PDU of interest*/ + * @param newPdu separate PDU for comparison + */ protected abstract void testOnePdu(Pdu newPdu); + + /** + * @return the threadSleepInterval + */ + public long getThreadSleepInterval() + { + return threadSleepInterval; + } + + /** + * @param threadSleepInterval the threadSleepInterval to set + */ + public void setThreadSleepInterval(long threadSleepInterval) + { + this.threadSleepInterval = threadSleepInterval; + } } diff --git a/test/edu/nps/moves/dis7/SignalPdusTest.java b/test/edu/nps/moves/dis7/SignalPdusTest.java index b7f756f2913161e2eceda320ea7af0df3c507418..0daf7429e159231945e8ec116cde45c215f3a18e 100644 --- a/test/edu/nps/moves/dis7/SignalPdusTest.java +++ b/test/edu/nps/moves/dis7/SignalPdusTest.java @@ -41,7 +41,7 @@ public class SignalPdusTest { static Semaphore mutex; static PduFactory pduFac; static List<Pdu> sentPdus; - byte[] buff; + byte[] bufferByteArray; int size; @BeforeAll @@ -113,12 +113,12 @@ public class SignalPdusTest { // Let's see how these unmarshall receivedPdus.forEach(pdu -> { try { - buff = pdu.marshal(); - size = pdu.unmarshal(ByteBuffer.wrap(buff)); + bufferByteArray = pdu.marshal(); + size = pdu.unmarshal(ByteBuffer.wrap(bufferByteArray)); assertTrue(size > 0, "Unmarshalling error: Unmarshalled size: " + size); // This also unmarshalls the pdu - pdu = pduFac.createPdu(buff); + pdu = pduFac.createPdu(bufferByteArray); assertNotNull(pdu, "Unmarshalling error " + pdu); } catch (Exception ex) { Logger.getLogger(SignalPdusTest.class.getName()).log(Level.SEVERE, null, ex);