Class PduFactory
java.lang.Object
edu.nps.moves.dis7.utilities.PduFactory
PduFactory.java created on Jun 14, 2019
MOVES Institute Naval Postgraduate School, Monterey, CA, USA www.nps.edu
A class to 1) create new Pdus (for sending purposes) and 2) create Pdus from byte streams received from the net.
For the first use case, pdus will be initialized with country, exerciseId, siteId, applicationId and timestamp format, matching the parameters passed to the constructor. For no arg constructor, the defaults of USA, 1, 2, 3, and absolute timestamp are used.
- Author:
- Mike Bailey, jmbailey@nps.edu
-
Constructor Summary
ConstructorsConstructorDescriptionCreate and add initial properties to a new PduFactory using defaults for country (USA), exerciseId (2), application (3) and absolute timestamps.PduFactory
(Country country, byte exerciseId, short siteId, short applicationId, DisTime.TimestampStyle timestampStyle) Create and add initial properties to a new PduFactory which creates pdus using the specified default values.PduFactory
(DisTime.TimestampStyle newTimestampStyle) Create and add initial properties to a new PduFactory using newTimestampStyle. -
Method Summary
Modifier and TypeMethodDescriptioncreatePdu
(byte[] data) PDU builder.createPdu
(DisPduType pduType) Create and add initial properties to an empty PDU of the given typecreatePdu
(ByteBuffer byteBuffer) PDU builder.getPdusFromBundle
(byte[] data, int length) Decodes datagram contents with bundled PDUs.accessor to report valuestatic void
If invoked, notify location of unit test (which is located outside of the jar distribution).Create and add initial properties to an Acknowledge PDU
IEEE Std 1278.1-2012, 5.6.5.6Create and add initial properties to an Acknowledge-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.6Create and add initial properties to an Action Request PDU
IEEE Std 1278.1-2012, 5.6.5.7Create and add initial properties to an Action Request-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.7Create and add initial properties to an Action Response PDU
IEEE Std 1278.1-2012, 5.6.5.8Create and add initial properties to an Action Response-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.8Create and add initial properties to a new Designator PDU
IEEE Std 1278.1-2012, 5.7.4Create and add initial properties to an Appearance PDU
IEEE Std 1278.1-2012, 9.4.3Create and add initial properties to an Areal Object State PDU
IEEE Std 1278.1-2012, 5.11.3.4Create and add initial properties to an Articulated Parts PDU
IEEE Std 1278.1-2012, 9.4.4Create and add initial properties to an Attribute PDU
IEEE Std 1278.1-2012, 5.3.6Create and add initial properties to a new Collision-Elastic PDU
IEEE Std 1278.1-2012, 5.3.4Create and add initial properties to a new Collision PDU
IEEE Std 1278.1-2012, 5.3.3Create and add initial properties to a new Comment PDU
IEEE Std 1278.1-2012, 5.6.5.13makeCommentPdu
(VariableRecordType typ, String... comments) Create and add initial properties to a new Comment PDU containing the given String(s) and variable record typemakeCommentPdu
(String... comments) Create and add initial properties to a new Comment PDU containing the given String(s), variable record type = "OTHER"Create and add initial properties to a new Comment-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.13makeCommentReliablePdu
(VariableRecordType typ, String... comments) Create and add initial properties to a new CommentR PDU containing the given String(s) and variable record typemakeCommentReliablePdu
(String... comments) Create and add initial properties to a new Comment-R PDU containing the given String(s), variable record type = "OTHER"Create and add initial properties to a new Create Entity PDU
IEEE Std 1278.1-2012, 5.6.5.2Create and add initial properties to a new Create Entity-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.2Create and add initial properties to a new Data PDU
IEEE Std 1278.1-2012, 5.6.5.11Create and add initial properties to a new Data Query PDU
IEEE Std 1278.1-2012, 5.6.5.9Create and add initial properties to a new Data Query-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.9Create and add initial properties to a new Data-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.11Create and add initial properties to a new Designator PDU
IEEE Std 1278.1-2012, 5.7.4Create and add initial properties to a new Detonation PDU
IEEE Std 1278.1-2012, 5.4.4Create and add initial properties to a new Directed Energy (DE) Fire PDU
IEEE Std 1278.1-2012, 5.4.5Create and add initial properties to a new Electromagnetic Emission (EE) PDU
IEEE Std 1278.1-2012, 5.7.3Create and add initial properties to a new Collision-Elastic PDU
IEEE Std 1278.1-2012, 5.3.3Create and add initial properties to an Entity State PDU
IEEE Std 1278.1-2012, 5.3.2Create and add initial properties to a new Entity State Update PDU
IEEE Std 1278.1-2012, 5.3.5Create and add initial properties to an Environmental Process PDU
IEEE Std 1278.1-2012, 5.11.2.2Create and add initial properties to an Event Report PDU
IEEE Std 1278.1-2012, 5.6.5.12Create and add initial properties to an Event Report-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.12Create and add initial properties to a new Fire PDU
IEEE Std 1278.1-2012, 5.4.3Create and add initial properties to a new Gridded Data PDU
IEEE Std 1278.1-2012, 5.11.2.3Create and add initial properties to a new an Identification Friend or Foe (IFF) PDU
IEEE Std 1278.1-2012, 5.7.6Create and add initial properties to an Information Operations (IO) Action PDU
IEEE Std 1278.1-2012, 5.13.3Create and add initial properties to an Information Operations (IO) Report PDU
IEEE Std 1278.1-2012, 5.13.4Create and add initial properties to an Intercom Control PDU
IEEE Std 1278.1-2012, 5.8.7Create and add initial properties to an Intercom Signal PDU
IEEE Std 1278.1-2012, 5.8.6Create and add initial properties to an IsGroupOf PDU
IEEE Std 1278.1-2012, 5.9.3Create and add initial properties to an IsPartOf PDU
IEEE Std 1278.1-2012, 5.9.5Create and add initial properties to a new Live Entity (LE) Detonation PDU
IEEE Std 1278.1-2012, 9.4.6Create and add initial properties to a new Live Entity (LE) Fire PDU
IEEE Std 1278.1-2012, 9.4.5Create and add initial properties to a new Linear Object State PDU
IEEE Std 1278.1-2012, 5.11.3.3Create and add initial properties to a new Minefield Data PDU
IEEE Std 1278.1-2012, 5.10.4Create and add initial properties to a new Minefield Query PDU
IEEE Std 1278.1-2012, 5.10.3Create and add initial properties to a new Minefield Response Negative Acknowledgment (NACK) PDU
IEEE Std 1278.1-2012, 5.10.5Create and add initial properties to a new Minefield State PDU
IEEE Std 1278.1-2012, 5.10.2Create and add initial properties to a new Point Object State PDU
IEEE Std 1278.1-2012, 5.11.3.2Create and add initial properties to a new Receiver PDU
IEEE Std 1278.1-2012, 5.8.5Create and add initial properties to a new Record Query-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.14Create and add initial properties to a new Record-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.16Create and add initial properties to a new Remove Entity PDU
IEEE Std 1278.1-2012, 5.6.5.3Create and add initial properties to a new Remove Entity-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.3Create and add initial properties to a new Repair Complete PDU
IEEE Std 1278.1-2012, 5.5.10Create and add initial properties to a new Repair Response PDU
IEEE Std 1278.1-2012, 5.5.11Create and add initial properties to a new Resupply Cancel PDU
IEEE Std 1278.1-2012, 5.5.8Create and add initial properties to a new Resupply Offer PDU
IEEE Std 1278.1-2012, 5.5.6Create and add initial properties to a new Resupply Received PDU
IEEE Std 1278.1-2012, 5.5.7Create and add initial properties to a new Supplemental Emission/Entity State (SEES) PDU
IEEE Std 1278.1-2012, 5.7.7Create and add initial properties to a new Service Request PDU
IEEE Std 1278.1-2012, 5.5.5Create and add initial properties to a new Set DataPDU
IEEE Std 1278.1-2012, 5.6.5.10Create and add initial properties to a new Set Data-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.10Create and add initial properties to a new Set Record-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.15Create and add initial properties to a new Signal PDU
IEEE Std 1278.1-2012, 5.7.4Create and add initial properties to a new Start Resume PDU
IEEE Std 1278.1-2012, 5.6.5.4Create and add initial properties to a new Start/Resume-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.4Create and add initial properties to a new Stop Freeze PDU
IEEE Std 1278.1-2012, 5.6.5.5Create and add initial properties to a new Stop/Freeze-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.5Create and add initial properties to a new Transfer Ownership PDU
IEEE Std 1278.1-2012, 5.9.4Create and add initial properties to a new Transmitter PDU
IEEE Std 1278.1-2012, 5.8.3Create and add initial properties to a new Time Space Position Information (TSPI) PDU
IEEE Std 1278.1-2012, 9.4.2Create and add initial properties to a new Designator PDU
IEEE Std 1278.1-2012, 5.7.4void
setTimestampStyle
(DisTime.TimestampStyle newTimestampStyle) accessor to update value
-
Constructor Details
-
PduFactory
public PduFactory()Create and add initial properties to a new PduFactory using defaults for country (USA), exerciseId (2), application (3) and absolute timestamps. -
PduFactory
Create and add initial properties to a new PduFactory using newTimestampStyle.- Parameters:
newTimestampStyle
- timeStampStyle of interest
-
PduFactory
public PduFactory(Country country, byte exerciseId, short siteId, short applicationId, DisTime.TimestampStyle timestampStyle) Create and add initial properties to a new PduFactory which creates pdus using the specified default values.- Parameters:
country
- used in EntityType and RadioType objectsexerciseId
- used in standard PDU headersiteId
- used in standard PDU headerapplicationId
- used in standard PDU headertimestampStyle
- enum to specify time stamp style (IEEE Std 1278.1-2012, 4.6)- See Also:
-
-
Method Details
-
getTimestampStyle
accessor to report value- Returns:
- current timestampStyle
-
setTimestampStyle
accessor to update value- Parameters:
newTimestampStyle
- value of interest
-
makeEntityStatePdu
Create and add initial properties to an Entity State PDU
IEEE Std 1278.1-2012, 5.3.2- Returns:
- the new pdu
-
makeFirePdu
Create and add initial properties to a new Fire PDU
IEEE Std 1278.1-2012, 5.4.3- Returns:
- the new pdu
-
makeDetonationPdu
Create and add initial properties to a new Detonation PDU
IEEE Std 1278.1-2012, 5.4.4- Returns:
- the new pdu
-
makeCollisionPdu
Create and add initial properties to a new Collision PDU
IEEE Std 1278.1-2012, 5.3.3- Returns:
- the new pdu
-
makeServiceRequestPdu
Create and add initial properties to a new Service Request PDU
IEEE Std 1278.1-2012, 5.5.5- Returns:
- the new pdu
-
makeResupplyOfferPdu
Create and add initial properties to a new Resupply Offer PDU
IEEE Std 1278.1-2012, 5.5.6- Returns:
- the new pdu
-
makeResupplyReceivedPdu
Create and add initial properties to a new Resupply Received PDU
IEEE Std 1278.1-2012, 5.5.7- Returns:
- the new pdu
-
makeResupplyCancelPdu
Create and add initial properties to a new Resupply Cancel PDU
IEEE Std 1278.1-2012, 5.5.8- Returns:
- the new pdu
-
makeRepairCompletePdu
Create and add initial properties to a new Repair Complete PDU
IEEE Std 1278.1-2012, 5.5.10- Returns:
- the new pdu
-
makeRepairResponsePdu
Create and add initial properties to a new Repair Response PDU
IEEE Std 1278.1-2012, 5.5.11- Returns:
- the new pdu
-
makeCreateEntityPdu
Create and add initial properties to a new Create Entity PDU
IEEE Std 1278.1-2012, 5.6.5.2- Returns:
- the new pdu
-
makeRemoveEntityPdu
Create and add initial properties to a new Remove Entity PDU
IEEE Std 1278.1-2012, 5.6.5.3- Returns:
- the new pdu
-
makeStartResumePdu
Create and add initial properties to a new Start Resume PDU
IEEE Std 1278.1-2012, 5.6.5.4- Returns:
- the new pdu
-
makeStopFreezePdu
Create and add initial properties to a new Stop Freeze PDU
IEEE Std 1278.1-2012, 5.6.5.5- Returns:
- the new pdu
-
makeAcknowledgePdu
Create and add initial properties to an Acknowledge PDU
IEEE Std 1278.1-2012, 5.6.5.6- Returns:
- the new pdu
-
makeActionRequestPdu
Create and add initial properties to an Action Request PDU
IEEE Std 1278.1-2012, 5.6.5.7- Returns:
- the new pdu
-
makeActionResponsePdu
Create and add initial properties to an Action Response PDU
IEEE Std 1278.1-2012, 5.6.5.8- Returns:
- the new pdu
-
makeDataQueryPdu
Create and add initial properties to a new Data Query PDU
IEEE Std 1278.1-2012, 5.6.5.9- Returns:
- the new pdu
-
makeSetDataPdu
Create and add initial properties to a new Set DataPDU
IEEE Std 1278.1-2012, 5.6.5.10- Returns:
- the new pdu
-
makeDataPdu
Create and add initial properties to a new Data PDU
IEEE Std 1278.1-2012, 5.6.5.11- Returns:
- the new pdu
-
makeEventReportPdu
Create and add initial properties to an Event Report PDU
IEEE Std 1278.1-2012, 5.6.5.12- Returns:
- the new pdu
-
makeCommentPdu
Create and add initial properties to a new Comment PDU
IEEE Std 1278.1-2012, 5.6.5.13- Returns:
- the new pdu
-
makeCommentPdu
Create and add initial properties to a new Comment PDU containing the given String(s), variable record type = "OTHER"- Parameters:
comments
- of interest- Returns:
- the new pdu
-
makeCommentPdu
Create and add initial properties to a new Comment PDU containing the given String(s) and variable record type- Parameters:
typ
- VariableRecordTypecomments
- of interest- Returns:
- the new pdu
-
makeElectronicEmissionsPdu
Create and add initial properties to a new Electromagnetic Emission (EE) PDU
IEEE Std 1278.1-2012, 5.7.3- Returns:
- the new pdu
-
makeDesignatorPdu
Create and add initial properties to a new Designator PDU
IEEE Std 1278.1-2012, 5.7.4- Returns:
- the new pdu
-
makeTransmitterPdu
Create and add initial properties to a new Transmitter PDU
IEEE Std 1278.1-2012, 5.8.3- Returns:
- the new pdu
-
makeSignalPdu
Create and add initial properties to a new Signal PDU
IEEE Std 1278.1-2012, 5.7.4- Returns:
- the new pdu
-
makeReceiverPdu
Create and add initial properties to a new Receiver PDU
IEEE Std 1278.1-2012, 5.8.5- Returns:
- the new pdu
-
makeIffPdu
Create and add initial properties to a new an Identification Friend or Foe (IFF) PDU
IEEE Std 1278.1-2012, 5.7.6- Returns:
- the new pdu
-
makeUnderwaterAcousticPdu
Create and add initial properties to a new Designator PDU
IEEE Std 1278.1-2012, 5.7.4- Returns:
- the new pdu
-
makeSeesPdu
Create and add initial properties to a new Supplemental Emission/Entity State (SEES) PDU
IEEE Std 1278.1-2012, 5.7.7- Returns:
- the new pdu
-
makeIntercomSignalPdu
Create and add initial properties to an Intercom Signal PDU
IEEE Std 1278.1-2012, 5.8.6- Returns:
- the new pdu
-
makeIntercomControlPdu
Create and add initial properties to an Intercom Control PDU
IEEE Std 1278.1-2012, 5.8.7- Returns:
- the new pdu
-
makeAggregateStatePdu
Create and add initial properties to a new Designator PDU
IEEE Std 1278.1-2012, 5.7.4- Returns:
- the new pdu
-
makeIsGroupOfPdu
Create and add initial properties to an IsGroupOf PDU
IEEE Std 1278.1-2012, 5.9.3- Returns:
- the new pdu
-
makeTransferOwnershipPdu
Create and add initial properties to a new Transfer Ownership PDU
IEEE Std 1278.1-2012, 5.9.4- Returns:
- the new pdu
-
makeIsPartOfPdu
Create and add initial properties to an IsPartOf PDU
IEEE Std 1278.1-2012, 5.9.5- Returns:
- the new pdu
-
makeMinefieldStatePdu
Create and add initial properties to a new Minefield State PDU
IEEE Std 1278.1-2012, 5.10.2- Returns:
- the new pdu
-
makeMinefieldQueryPdu
Create and add initial properties to a new Minefield Query PDU
IEEE Std 1278.1-2012, 5.10.3- Returns:
- the new pdu
-
makeMinefieldDataPdu
Create and add initial properties to a new Minefield Data PDU
IEEE Std 1278.1-2012, 5.10.4- Returns:
- the new pdu
-
makeMinefieldResponseNackPdu
Create and add initial properties to a new Minefield Response Negative Acknowledgment (NACK) PDU
IEEE Std 1278.1-2012, 5.10.5- Returns:
- the new pdu
-
makeEnvironmentalProcessPdu
Create and add initial properties to an Environmental Process PDU
IEEE Std 1278.1-2012, 5.11.2.2- Returns:
- the new pdu
-
makeGriddedDataPdu
Create and add initial properties to a new Gridded Data PDU
IEEE Std 1278.1-2012, 5.11.2.3- Returns:
- the new pdu
-
makePointObjectStatePdu
Create and add initial properties to a new Point Object State PDU
IEEE Std 1278.1-2012, 5.11.3.2- Returns:
- the new pdu
-
makeLinearObjectStatePdu
Create and add initial properties to a new Linear Object State PDU
IEEE Std 1278.1-2012, 5.11.3.3- Returns:
- the new pdu
-
makeArealObjectStatePdu
Create and add initial properties to an Areal Object State PDU
IEEE Std 1278.1-2012, 5.11.3.4- Returns:
- the new pdu
-
makeTspiPdu
Create and add initial properties to a new Time Space Position Information (TSPI) PDU
IEEE Std 1278.1-2012, 9.4.2- Returns:
- the new pdu
-
makeAppearancePdu
Create and add initial properties to an Appearance PDU
IEEE Std 1278.1-2012, 9.4.3- Returns:
- the new pdu
-
makeArticulatedPartsPdu
Create and add initial properties to an Articulated Parts PDU
IEEE Std 1278.1-2012, 9.4.4- Returns:
- the new pdu
-
makeLEFirePdu
Create and add initial properties to a new Live Entity (LE) Fire PDU
IEEE Std 1278.1-2012, 9.4.5- Returns:
- the new pdu
-
makeLEDetonationPdu
Create and add initial properties to a new Live Entity (LE) Detonation PDU
IEEE Std 1278.1-2012, 9.4.6- Returns:
- the new pdu
-
makeCreateEntityReliablePdu
Create and add initial properties to a new Create Entity-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.2- Returns:
- the new pdu
-
makeRemoveEntityReliablePdu
Create and add initial properties to a new Remove Entity-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.3- Returns:
- the new pdu
-
makeStartResumeReliablePdu
Create and add initial properties to a new Start/Resume-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.4- Returns:
- the new pdu
-
makeStopFreezeReliablePdu
Create and add initial properties to a new Stop/Freeze-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.5- Returns:
- the new pdu
-
makeAcknowledgeReliablePdu
Create and add initial properties to an Acknowledge-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.6- Returns:
- the new pdu
-
makeActionRequestReliablePdu
Create and add initial properties to an Action Request-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.7- Returns:
- the new pdu
-
makeActionResponseReliablePdu
Create and add initial properties to an Action Response-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.8- Returns:
- the new pdu
-
makeDataQueryReliablePdu
Create and add initial properties to a new Data Query-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.9- Returns:
- the new pdu
-
makeSetDataReliablePdu
Create and add initial properties to a new Set Data-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.10- Returns:
- the new pdu
-
makeDataReliablePdu
Create and add initial properties to a new Data-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.11- Returns:
- the new pdu
-
makeEventReportReliablePdu
Create and add initial properties to an Event Report-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.12- Returns:
- the new pdu
-
makeCommentReliablePdu
Create and add initial properties to a new Comment-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.13- Returns:
- the new pdu
-
makeCommentReliablePdu
Create and add initial properties to a new Comment-R PDU containing the given String(s), variable record type = "OTHER"- Parameters:
comments
- of interest- Returns:
- the new pdu
-
makeCommentReliablePdu
Create and add initial properties to a new CommentR PDU containing the given String(s) and variable record type- Parameters:
typ
- VariableRecordTypecomments
- of interest- Returns:
- the new pdu
-
makeRecordReliablePdu
Create and add initial properties to a new Record-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.16- Returns:
- the new pdu
-
makeSetRecordReliablePdu
Create and add initial properties to a new Set Record-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.15- Returns:
- the new pdu
-
makeRecordQueryReliablePdu
Create and add initial properties to a new Record Query-R (Reliable) PDU
IEEE Std 1278.1-2012, 5.12.4.14- Returns:
- the new pdu
-
makeCollisionElasticPdu
Create and add initial properties to a new Collision-Elastic PDU
IEEE Std 1278.1-2012, 5.3.4- Returns:
- the new pdu
-
makeEntityStateUpdatePdu
Create and add initial properties to a new Entity State Update PDU
IEEE Std 1278.1-2012, 5.3.5- Returns:
- the new pdu
-
makeDirectedEnergyFirePdu
Create and add initial properties to a new Directed Energy (DE) Fire PDU
IEEE Std 1278.1-2012, 5.4.5- Returns:
- the new pdu
-
makeEntityDamageStatusPdu
Create and add initial properties to a new Collision-Elastic PDU
IEEE Std 1278.1-2012, 5.3.3- Returns:
- the new pdu
-
makeInformationOperationsActionPdu
Create and add initial properties to an Information Operations (IO) Action PDU
IEEE Std 1278.1-2012, 5.13.3- Returns:
- the new pdu
-
makeInformationOperationsReportPdu
Create and add initial properties to an Information Operations (IO) Report PDU
IEEE Std 1278.1-2012, 5.13.4- Returns:
- the new pdu
-
makeAttributePdu
Create and add initial properties to an Attribute PDU
IEEE Std 1278.1-2012, 5.3.6- Returns:
- the new pdu
-
createPdu
PDU builder. Pass in an array of bytes, get the correct type of pdu back based on the PDU type field contained in the byte array.- Parameters:
data
- an array of PDU data- Returns:
- A PDU of the appropriate concrete subclass of PDU or null if there was an error
-
createPdu
PDU builder. Pass in a data buffer, get the correct type of pdu back based on the PDU type field contained in the underlying array.- Parameters:
byteBuffer
- the buffer containing PDU data to input- Returns:
- A PDU of the appropriate concrete subclass of PDU or null if there was an error
-
createPdu
Create and add initial properties to an empty PDU of the given type- Parameters:
pduType
- PDU type to create- Returns:
- the empty pdu
-
getPdusFromBundle
Decodes datagram contents with bundled PDUs. As a performance hack DIS may include several PDUs in one datagram. Typically the max datagram size is 8K (above that it runs into some issues with the default incoming socket buffer size) but it may be more. The PDUs may be of multiple types and different lengths, so we have to step through the buffer and depend on the reported PDU length in the header. There's a lot that can go wrong. If something blows up, we return all the decoded PDUs we can.- Parameters:
data
- a large buffer filled with possible multiple PDUslength
- the size of the multiple PDU buffer- Returns:
- List of decoded PDUs
-
main
If invoked, notify location of unit test (which is located outside of the jar distribution).- Parameters:
args
- none supported
-