diff --git a/examples/src/OpenDis7Examples/AllPduSender.java b/examples/src/OpenDis7Examples/AllPduSender.java index b49965231f89a70ba2157b6444f3365d816b3872..c76c77143c344f9dcbd4da728916209bd82b8ac5 100755 --- a/examples/src/OpenDis7Examples/AllPduSender.java +++ b/examples/src/OpenDis7Examples/AllPduSender.java @@ -373,7 +373,7 @@ public class AllPduSender ArrayList<String> commentsList = new ArrayList<>(); commentsList.add("Hello CommentPDU"); - commentsList.add("Here is a new message"); + commentsList.add("Here is a second line of text in this comment."); if (!commentsList.isEmpty()) System.out.println("Preparing CommentPDU:"); @@ -448,8 +448,8 @@ public class AllPduSender catch (InterruptedException ex) { } String currentPduTypeValuePadded = String.format("%2s", aPdu.getPduType().getValue()); - String currentPduTypePadded = String.format("%-34s", aPdu.getPduType()); // - indicates right padding of whitespace - System.out.print ("Sent DIS PDU " + currentPduTypePadded + " " + currentPduTypeValuePadded ); + String currentPduTypePadded = String.format("%-50s", aPdu.getPduType().toString()); // - indicates right padding of whitespace + System.out.print ("Sent DIS PDU " + currentPduTypeValuePadded + " " + currentPduTypePadded ); System.out.println(" of type " + aPdu.getClass().getName()); } catch (Exception ex) { diff --git a/examples/src/OpenDis7Examples/AllPduSenderLog.txt b/examples/src/OpenDis7Examples/AllPduSenderLog.txt index ecca4d4a42dc1f491cacf7eb8a56bf2a152f5be1..6ebd47195d57181a4a0778d898693c850745daf8 100644 --- a/examples/src/OpenDis7Examples/AllPduSenderLog.txt +++ b/examples/src/OpenDis7Examples/AllPduSenderLog.txt @@ -9,79 +9,82 @@ Usage: AllPduSender <port> <multicast group> Default: AllPduSender 3000 239.1.2.3 DisExamplesOpenDis7.AllPduSender started... Generate PDUs and note issues, if any... -*** Note: DISPDUType.OTHER not supported +*** Note: DISPDUType.OTHER=0 not supported +Preparing CommentPDU: + "Hello CommentPDU" + "Here is a second line of text in this comment." Send the 72 PDUs we created... -Sent DIS PDU 1 ENTITY_STATE of type edu.nps.moves.dis7.EntityStatePdu -Sent DIS PDU 2 FIRE of type edu.nps.moves.dis7.FirePdu -Sent DIS PDU 3 DETONATION of type edu.nps.moves.dis7.DetonationPdu -Sent DIS PDU 4 COLLISION of type edu.nps.moves.dis7.CollisionPdu -Sent DIS PDU 5 SERVICE_REQUEST of type edu.nps.moves.dis7.ServiceRequestPdu -Sent DIS PDU 6 RESUPPLY_OFFER of type edu.nps.moves.dis7.ResupplyOfferPdu -Sent DIS PDU 7 RESUPPLY_RECEIVED of type edu.nps.moves.dis7.ResupplyReceivedPdu -Sent DIS PDU 8 RESUPPLY_CANCEL of type edu.nps.moves.dis7.ResupplyCancelPdu -Sent DIS PDU 9 REPAIR_COMPLETE of type edu.nps.moves.dis7.RepairCompletePdu -Sent DIS PDU 10 REPAIR_RESPONSE of type edu.nps.moves.dis7.RepairResponsePdu -Sent DIS PDU 11 CREATE_ENTITY of type edu.nps.moves.dis7.CreateEntityPdu -Sent DIS PDU 12 REMOVE_ENTITY of type edu.nps.moves.dis7.RemoveEntityPdu -Sent DIS PDU 13 START_RESUME of type edu.nps.moves.dis7.StartResumePdu -Sent DIS PDU 14 STOP_FREEZE of type edu.nps.moves.dis7.StopFreezePdu -Sent DIS PDU 15 ACKNOWLEDGE of type edu.nps.moves.dis7.AcknowledgePdu -Sent DIS PDU 16 ACTION_REQUEST of type edu.nps.moves.dis7.ActionRequestPdu -Sent DIS PDU 17 ACTION_RESPONSE of type edu.nps.moves.dis7.ActionResponsePdu -Sent DIS PDU 18 DATA_QUERY of type edu.nps.moves.dis7.DataQueryPdu -Sent DIS PDU 19 SET_DATA of type edu.nps.moves.dis7.SetDataPdu -Sent DIS PDU 20 DATA of type edu.nps.moves.dis7.DataPdu -Sent DIS PDU 21 EVENT_REPORT of type edu.nps.moves.dis7.EventReportPdu -Sent DIS PDU 22 COMMENT of type edu.nps.moves.dis7.CommentPdu -Sent DIS PDU 23 ELECTROMAGNETIC_EMISSION of type edu.nps.moves.dis7.ElectromagneticEmissionPdu -Sent DIS PDU 24 DESIGNATOR of type edu.nps.moves.dis7.DesignatorPdu -Sent DIS PDU 25 TRANSMITTER of type edu.nps.moves.dis7.TransmitterPdu -Sent DIS PDU 26 SIGNAL of type edu.nps.moves.dis7.SignalPdu -Sent DIS PDU 27 RECEIVER of type edu.nps.moves.dis7.ReceiverPdu -Sent DIS PDU 28 IDENTIFICATION_FRIEND_OR_FOE of type edu.nps.moves.dis7.IdentificationFriendOrFoePdu -Sent DIS PDU 29 UNDERWATER_ACOUSTIC of type edu.nps.moves.dis7.UnderwaterAcousticPdu -Sent DIS PDU 30 SUPPLEMENTAL_EMISSION_ENTITY_STATE of type edu.nps.moves.dis7.SupplementalEmissionEntityStatePdu -Sent DIS PDU 31 INTERCOM_SIGNAL of type edu.nps.moves.dis7.IntercomSignalPdu -Sent DIS PDU 32 INTERCOM_CONTROL of type edu.nps.moves.dis7.IntercomControlPdu -Sent DIS PDU 33 AGGREGATE_STATE of type edu.nps.moves.dis7.AggregateStatePdu -Sent DIS PDU 34 ISGROUPOF of type edu.nps.moves.dis7.IsGroupOfPdu -Sent DIS PDU 35 TRANSFER_OWNERSHIP of type edu.nps.moves.dis7.TransferOwnershipPdu -Sent DIS PDU 36 ISPARTOF of type edu.nps.moves.dis7.IsPartOfPdu -Sent DIS PDU 37 MINEFIELD_STATE of type edu.nps.moves.dis7.MinefieldStatePdu -Sent DIS PDU 38 MINEFIELD_QUERY of type edu.nps.moves.dis7.MinefieldQueryPdu -Sent DIS PDU 39 MINEFIELD_DATA of type edu.nps.moves.dis7.MinefieldDataPdu -Sent DIS PDU 40 MINEFIELD_RESPONSE_NACK of type edu.nps.moves.dis7.MinefieldResponseNACKPdu -Sent DIS PDU 41 ENVIRONMENTAL_PROCESS of type edu.nps.moves.dis7.EnvironmentalProcessPdu -Sent DIS PDU 42 GRIDDED_DATA of type edu.nps.moves.dis7.GriddedDataPdu -Sent DIS PDU 43 POINT_OBJECT_STATE of type edu.nps.moves.dis7.PointObjectStatePdu -Sent DIS PDU 44 LINEAR_OBJECT_STATE of type edu.nps.moves.dis7.LinearObjectStatePdu -Sent DIS PDU 45 AREAL_OBJECT_STATE of type edu.nps.moves.dis7.ArealObjectStatePdu -Sent DIS PDU 46 TIME_SPACE_POSITION_INFORMATION of type edu.nps.moves.dis7.TimeSpacePositionInformationPdu -Sent DIS PDU 47 APPEARANCE of type edu.nps.moves.dis7.AppearancePdu -Sent DIS PDU 48 ARTICULATED_PARTS of type edu.nps.moves.dis7.ArticulatedPartsPdu -Sent DIS PDU 49 LIVE_ENTITY_FIRE of type edu.nps.moves.dis7.LiveEntityFirePdu -Sent DIS PDU 50 LIVE_ENTITY_DETONATION of type edu.nps.moves.dis7.LiveEntityDetonationPdu -Sent DIS PDU 51 CREATE_ENTITY_RELIABLE of type edu.nps.moves.dis7.CreateEntityReliablePdu -Sent DIS PDU 52 REMOVE_ENTITY_RELIABLE of type edu.nps.moves.dis7.RemoveEntityReliablePdu -Sent DIS PDU 53 START_RESUME_RELIABLE of type edu.nps.moves.dis7.StartResumeReliablePdu -Sent DIS PDU 54 STOP_FREEZE_RELIABLE of type edu.nps.moves.dis7.StopFreezeReliablePdu -Sent DIS PDU 55 ACKNOWLEDGE_RELIABLE of type edu.nps.moves.dis7.AcknowledgeReliablePdu -Sent DIS PDU 56 ACTION_REQUEST_RELIABLE of type edu.nps.moves.dis7.ActionRequestReliablePdu -Sent DIS PDU 57 ACTION_RESPONSE_RELIABLE of type edu.nps.moves.dis7.ActionResponseReliablePdu -Sent DIS PDU 58 DATA_QUERY_RELIABLE of type edu.nps.moves.dis7.DataQueryReliablePdu -Sent DIS PDU 59 SET_DATA_RELIABLE of type edu.nps.moves.dis7.SetDataReliablePdu -Sent DIS PDU 60 DATA_RELIABLE of type edu.nps.moves.dis7.DataReliablePdu -Sent DIS PDU 61 EVENT_REPORT_RELIABLE of type edu.nps.moves.dis7.EventReportReliablePdu -Sent DIS PDU 62 COMMENT_RELIABLE of type edu.nps.moves.dis7.CommentReliablePdu -Sent DIS PDU 63 RECORD_RELIABLE of type edu.nps.moves.dis7.RecordReliablePdu -Sent DIS PDU 64 SET_RECORD_RELIABLE of type edu.nps.moves.dis7.SetRecordReliablePdu -Sent DIS PDU 65 RECORD_QUERY_RELIABLE of type edu.nps.moves.dis7.RecordQueryReliablePdu -Sent DIS PDU 66 COLLISION_ELASTIC of type edu.nps.moves.dis7.CollisionElasticPdu -Sent DIS PDU 67 ENTITY_STATE_UPDATE of type edu.nps.moves.dis7.EntityStateUpdatePdu -Sent DIS PDU 68 DIRECTED_ENERGY_FIRE of type edu.nps.moves.dis7.DirectedEnergyFirePdu -Sent DIS PDU 69 ENTITY_DAMAGE_STATUS of type edu.nps.moves.dis7.EntityDamageStatusPdu -Sent DIS PDU 70 INFORMATION_OPERATIONS_ACTION of type edu.nps.moves.dis7.InformationOperationsActionPdu -Sent DIS PDU 71 INFORMATION_OPERATIONS_REPORT of type edu.nps.moves.dis7.InformationOperationsReportPdu -Sent DIS PDU 72 ATTRIBUTE of type edu.nps.moves.dis7.AttributePdu -DisExamplesOpenDis7.AllPduSender complete. -BUILD SUCCESSFUL (total time: 8 seconds) +Sent DIS PDU 1 DISPDUType: ENTITY_STATE: 1 of type edu.nps.moves.dis7.EntityStatePdu +Sent DIS PDU 2 DISPDUType: FIRE: 2 of type edu.nps.moves.dis7.FirePdu +Sent DIS PDU 3 DISPDUType: DETONATION: 3 of type edu.nps.moves.dis7.DetonationPdu +Sent DIS PDU 4 DISPDUType: COLLISION: 4 of type edu.nps.moves.dis7.CollisionPdu +Sent DIS PDU 5 DISPDUType: SERVICE_REQUEST: 5 of type edu.nps.moves.dis7.ServiceRequestPdu +Sent DIS PDU 6 DISPDUType: RESUPPLY_OFFER: 6 of type edu.nps.moves.dis7.ResupplyOfferPdu +Sent DIS PDU 7 DISPDUType: RESUPPLY_RECEIVED: 7 of type edu.nps.moves.dis7.ResupplyReceivedPdu +Sent DIS PDU 8 DISPDUType: RESUPPLY_CANCEL: 8 of type edu.nps.moves.dis7.ResupplyCancelPdu +Sent DIS PDU 9 DISPDUType: REPAIR_COMPLETE: 9 of type edu.nps.moves.dis7.RepairCompletePdu +Sent DIS PDU 10 DISPDUType: REPAIR_RESPONSE: 10 of type edu.nps.moves.dis7.RepairResponsePdu +Sent DIS PDU 11 DISPDUType: CREATE_ENTITY: 11 of type edu.nps.moves.dis7.CreateEntityPdu +Sent DIS PDU 12 DISPDUType: REMOVE_ENTITY: 12 of type edu.nps.moves.dis7.RemoveEntityPdu +Sent DIS PDU 13 DISPDUType: START_RESUME: 13 of type edu.nps.moves.dis7.StartResumePdu +Sent DIS PDU 14 DISPDUType: STOP_FREEZE: 14 of type edu.nps.moves.dis7.StopFreezePdu +Sent DIS PDU 15 DISPDUType: ACKNOWLEDGE: 15 of type edu.nps.moves.dis7.AcknowledgePdu +Sent DIS PDU 16 DISPDUType: ACTION_REQUEST: 16 of type edu.nps.moves.dis7.ActionRequestPdu +Sent DIS PDU 17 DISPDUType: ACTION_RESPONSE: 17 of type edu.nps.moves.dis7.ActionResponsePdu +Sent DIS PDU 18 DISPDUType: DATA_QUERY: 18 of type edu.nps.moves.dis7.DataQueryPdu +Sent DIS PDU 19 DISPDUType: SET_DATA: 19 of type edu.nps.moves.dis7.SetDataPdu +Sent DIS PDU 20 DISPDUType: DATA: 20 of type edu.nps.moves.dis7.DataPdu +Sent DIS PDU 21 DISPDUType: EVENT_REPORT: 21 of type edu.nps.moves.dis7.EventReportPdu +Sent DIS PDU 22 DISPDUType: COMMENT: 22 of type edu.nps.moves.dis7.CommentPdu +Sent DIS PDU 23 DISPDUType: ELECTROMAGNETIC_EMISSION: 23 of type edu.nps.moves.dis7.ElectromagneticEmissionPdu +Sent DIS PDU 24 DISPDUType: DESIGNATOR: 24 of type edu.nps.moves.dis7.DesignatorPdu +Sent DIS PDU 25 DISPDUType: TRANSMITTER: 25 of type edu.nps.moves.dis7.TransmitterPdu +Sent DIS PDU 26 DISPDUType: SIGNAL: 26 of type edu.nps.moves.dis7.SignalPdu +Sent DIS PDU 27 DISPDUType: RECEIVER: 27 of type edu.nps.moves.dis7.ReceiverPdu +Sent DIS PDU 28 DISPDUType: IDENTIFICATION_FRIEND_OR_FOE: 28 of type edu.nps.moves.dis7.IdentificationFriendOrFoePdu +Sent DIS PDU 29 DISPDUType: UNDERWATER_ACOUSTIC: 29 of type edu.nps.moves.dis7.UnderwaterAcousticPdu +Sent DIS PDU 30 DISPDUType: SUPPLEMENTAL_EMISSION_ENTITY_STATE: 30 of type edu.nps.moves.dis7.SupplementalEmissionEntityStatePdu +Sent DIS PDU 31 DISPDUType: INTERCOM_SIGNAL: 31 of type edu.nps.moves.dis7.IntercomSignalPdu +Sent DIS PDU 32 DISPDUType: INTERCOM_CONTROL: 32 of type edu.nps.moves.dis7.IntercomControlPdu +Sent DIS PDU 33 DISPDUType: AGGREGATE_STATE: 33 of type edu.nps.moves.dis7.AggregateStatePdu +Sent DIS PDU 34 DISPDUType: ISGROUPOF: 34 of type edu.nps.moves.dis7.IsGroupOfPdu +Sent DIS PDU 35 DISPDUType: TRANSFER_OWNERSHIP: 35 of type edu.nps.moves.dis7.TransferOwnershipPdu +Sent DIS PDU 36 DISPDUType: ISPARTOF: 36 of type edu.nps.moves.dis7.IsPartOfPdu +Sent DIS PDU 37 DISPDUType: MINEFIELD_STATE: 37 of type edu.nps.moves.dis7.MinefieldStatePdu +Sent DIS PDU 38 DISPDUType: MINEFIELD_QUERY: 38 of type edu.nps.moves.dis7.MinefieldQueryPdu +Sent DIS PDU 39 DISPDUType: MINEFIELD_DATA: 39 of type edu.nps.moves.dis7.MinefieldDataPdu +Sent DIS PDU 40 DISPDUType: MINEFIELD_RESPONSE_NACK: 40 of type edu.nps.moves.dis7.MinefieldResponseNACKPdu +Sent DIS PDU 41 DISPDUType: ENVIRONMENTAL_PROCESS: 41 of type edu.nps.moves.dis7.EnvironmentalProcessPdu +Sent DIS PDU 42 DISPDUType: GRIDDED_DATA: 42 of type edu.nps.moves.dis7.GriddedDataPdu +Sent DIS PDU 43 DISPDUType: POINT_OBJECT_STATE: 43 of type edu.nps.moves.dis7.PointObjectStatePdu +Sent DIS PDU 44 DISPDUType: LINEAR_OBJECT_STATE: 44 of type edu.nps.moves.dis7.LinearObjectStatePdu +Sent DIS PDU 45 DISPDUType: AREAL_OBJECT_STATE: 45 of type edu.nps.moves.dis7.ArealObjectStatePdu +Sent DIS PDU 46 DISPDUType: TIME_SPACE_POSITION_INFORMATION: 46 of type edu.nps.moves.dis7.TimeSpacePositionInformationPdu +Sent DIS PDU 47 DISPDUType: APPEARANCE: 47 of type edu.nps.moves.dis7.AppearancePdu +Sent DIS PDU 48 DISPDUType: ARTICULATED_PARTS: 48 of type edu.nps.moves.dis7.ArticulatedPartsPdu +Sent DIS PDU 49 DISPDUType: LIVE_ENTITY_FIRE: 49 of type edu.nps.moves.dis7.LiveEntityFirePdu +Sent DIS PDU 50 DISPDUType: LIVE_ENTITY_DETONATION: 50 of type edu.nps.moves.dis7.LiveEntityDetonationPdu +Sent DIS PDU 51 DISPDUType: CREATE_ENTITY_RELIABLE: 51 of type edu.nps.moves.dis7.CreateEntityReliablePdu +Sent DIS PDU 52 DISPDUType: REMOVE_ENTITY_RELIABLE: 52 of type edu.nps.moves.dis7.RemoveEntityReliablePdu +Sent DIS PDU 53 DISPDUType: START_RESUME_RELIABLE: 53 of type edu.nps.moves.dis7.StartResumeReliablePdu +Sent DIS PDU 54 DISPDUType: STOP_FREEZE_RELIABLE: 54 of type edu.nps.moves.dis7.StopFreezeReliablePdu +Sent DIS PDU 55 DISPDUType: ACKNOWLEDGE_RELIABLE: 55 of type edu.nps.moves.dis7.AcknowledgeReliablePdu +Sent DIS PDU 56 DISPDUType: ACTION_REQUEST_RELIABLE: 56 of type edu.nps.moves.dis7.ActionRequestReliablePdu +Sent DIS PDU 57 DISPDUType: ACTION_RESPONSE_RELIABLE: 57 of type edu.nps.moves.dis7.ActionResponseReliablePdu +Sent DIS PDU 58 DISPDUType: DATA_QUERY_RELIABLE: 58 of type edu.nps.moves.dis7.DataQueryReliablePdu +Sent DIS PDU 59 DISPDUType: SET_DATA_RELIABLE: 59 of type edu.nps.moves.dis7.SetDataReliablePdu +Sent DIS PDU 60 DISPDUType: DATA_RELIABLE: 60 of type edu.nps.moves.dis7.DataReliablePdu +Sent DIS PDU 61 DISPDUType: EVENT_REPORT_RELIABLE: 61 of type edu.nps.moves.dis7.EventReportReliablePdu +Sent DIS PDU 62 DISPDUType: COMMENT_RELIABLE: 62 of type edu.nps.moves.dis7.CommentReliablePdu +Sent DIS PDU 63 DISPDUType: RECORD_RELIABLE: 63 of type edu.nps.moves.dis7.RecordReliablePdu +Sent DIS PDU 64 DISPDUType: SET_RECORD_RELIABLE: 64 of type edu.nps.moves.dis7.SetRecordReliablePdu +Sent DIS PDU 65 DISPDUType: RECORD_QUERY_RELIABLE: 65 of type edu.nps.moves.dis7.RecordQueryReliablePdu +Sent DIS PDU 66 DISPDUType: COLLISION_ELASTIC: 66 of type edu.nps.moves.dis7.CollisionElasticPdu +Sent DIS PDU 67 DISPDUType: ENTITY_STATE_UPDATE: 67 of type edu.nps.moves.dis7.EntityStateUpdatePdu +Sent DIS PDU 68 DISPDUType: DIRECTED_ENERGY_FIRE: 68 of type edu.nps.moves.dis7.DirectedEnergyFirePdu +Sent DIS PDU 69 DISPDUType: ENTITY_DAMAGE_STATUS: 69 of type edu.nps.moves.dis7.EntityDamageStatusPdu +Sent DIS PDU 70 DISPDUType: INFORMATION_OPERATIONS_ACTION: 70 of type edu.nps.moves.dis7.InformationOperationsActionPdu +Sent DIS PDU 71 DISPDUType: INFORMATION_OPERATIONS_REPORT: 71 of type edu.nps.moves.dis7.InformationOperationsReportPdu +Sent DIS PDU 72 DISPDUType: ATTRIBUTE: 72 of type edu.nps.moves.dis7.AttributePdu +DisExamplesOpenDis7.AllPduSender complete, sent 72 PDUs total. +BUILD SUCCESSFUL (total time: 2 seconds)