Class AttributePdu
java.lang.Object
edu.nps.moves.dis7.pdus.Pdu
edu.nps.moves.dis7.pdus.PduBase
edu.nps.moves.dis7.pdus.EntityInformationInteractionFamilyPdu
edu.nps.moves.dis7.pdus.AttributePdu
- All Implemented Interfaces:
Marshaller
,Serializable
7.2.6. Information about individual attributes for a particular entity, other object, or event may be communicated using an Attribute PDU. The Attribute PDU shall not be used to exchange data available in any other PDU except where explicitly mentioned in the PDU issuance instructions within this standard. See 5.3.6.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DISAttributeActionCode
This field shall identify the action code applicable to this Attribute PDU.protected DisPduType
This field shall represent the type of the PDU that is being extended or updated, if applicable.protected DISProtocolFamily
This field shall indicate the Protocol Version associated with the Attribute Record PDU Type.protected List
<AttributeRecordSet> attributeRecordSets is an undescribed parameter...protected ByteArrayOutputStream
byteArrayOutputStream (baos) is used for marshal/unmarshal serializationprotected DataOutputStream
dataOutputStream (dos) is used for marshal/unmarshal serializationprotected VariableRecordType
This field shall contain the Attribute record type of the Attribute records in the PDU if they all have the same Attribute record type.static final String
The name of this PDU typeprotected short
This field shall specify the number of Attribute Record Sets that make up the remainder of the PDU.protected SimulationAddress
This field shall identify the simulation issuing the Attribute PDU.protected int
Paddingprotected short
Paddingprotected byte
PaddingFields inherited from class edu.nps.moves.dis7.pdus.EntityInformationInteractionFamilyPdu
FAMILY_NAME
Fields inherited from class edu.nps.moves.dis7.pdus.Pdu
exerciseID, length, pduType, protocolFamily, protocolVersion, timestamp
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()
copy method creates a deep copy of current object using preferred marshalling methodCreates a "deep copy" of current object using ByteBuffer methods.copy method creates a deep copy of current object using DataOutputStream methods.boolean
boolean
equalsImpl
(Object obj) Compare all fields that contribute to the state, ignoring transient and static fields, forthis
and the supplied objectGetter foractionCode
Getter forattributeRecordPduType
Getter forattributeRecordProtocolVersion
Getter forattributeRecordSets
int
Returns size of this serialized (marshalled) object in bytesGetter formasterAttributeRecordType
Getter fororiginatingSimulationAddress
int
Getter forpadding1
short
Getter forpadding2
byte
Getter forpadding3
int
hashCode()
void
marshal
(DataOutputStream dos) Serializes an object to a DataOutputStream.void
marshal
(ByteBuffer byteBuffer) Packs an object into the ByteBuffer.setActionCode
(DISAttributeActionCode pActionCode) Setter foractionCode
setAttributeRecordPduType
(DisPduType pAttributeRecordPduType) Setter forattributeRecordPduType
setAttributeRecordProtocolVersion
(DISProtocolFamily pAttributeRecordProtocolVersion) Setter forattributeRecordProtocolVersion
setAttributeRecordSets
(List<AttributeRecordSet> pAttributeRecordSets) Setter forattributeRecordSets
setMasterAttributeRecordType
(VariableRecordType pMasterAttributeRecordType) Setter formasterAttributeRecordType
setOriginatingSimulationAddress
(SimulationAddress pOriginatingSimulationAddress) Setter fororiginatingSimulationAddress
setPadding1
(int pPadding1) Setter forpadding1
setPadding2
(int pPadding2) Utility setter forpadding2
setPadding2
(short pPadding2) Setter forpadding2
setPadding3
(byte pPadding3) Setter forpadding3
setPadding3
(int pPadding3) Utility setter forpadding3
toString()
int
unmarshal
(DataInputStream dis) Deserializes an object from a DataInputStream.int
unmarshal
(ByteBuffer byteBuffer) Unpacks a Pdu from the underlying data.Methods inherited from class edu.nps.moves.dis7.pdus.PduBase
getPadding, getPduStatus, setPadding, setPadding, setPduStatus
Methods inherited from class edu.nps.moves.dis7.pdus.Pdu
copyByPduFactory, getExerciseID, getLength, getPduType, getProtocolFamily, getProtocolVersion, getTimestamp, getTimestampSeconds, isAcknowledgeRPdu, isActionRequestPdu, isActionRequestRPdu, isActionResponsePdu, isActionResponseRPdu, isAggregateStatePdu, isAppearancePdu, isArealObjectStatePdu, isArticulatedPartsPdu, isAttributePdu, isCollisionElasticPdu, isCollisionPdu, isCommentPdu, isCommentRPdu, isCreateEntityPdu, isCreateEntityRPdu, isDataPdu, isDataQueryPdu, isDataQueryRPdu, isDataRPdu, isDesignatorPdu, isDetonationPdu, isDirectedEnergyFirePdu, isDistributedEmissionsRegenerationFamilyPdu, isElectromagneticEmissionPdu, isEntityDamageStatusPdu, isEntityInformationInteractionFamilyPdu, isEntityManagementFamilyPdu, isEntityStatePdu, isEntityStateUpdatePdu, isEnvironmentalProcessPdu, isEventReportPdu, isEventReportRPdu, isFirePdu, isGriddedDataPdu, isIFFPdu, isInformationOperationsActionPdu, isInformationOperationsFamilyPdu, isInformationOperationsReportPdu, isIntercomControlPdu, isIntercomSignalPdu, isIsGroupOfPdu, isIsPartOfPdu, isLEDetonationPdu, isLEFirePdu, isLinearObjectStatePdu, isLiveEntityDetonationPdu, isLiveEntityFirePdu, isLogisticsFamilyPdu, isMinefieldDataPdu, isMinefieldFamilyPdu, isMinefieldQueryPdu, isMinefieldResponseNACKPdu, isMinefieldStatePdu, isPointObjectStatePdu, isRadioCommunicationsFamilyPdu, isReceiverPdu, isRecordQueryRPdu, isRecordRPdu, isReliablePdu, isRemoveEntityPdu, isRemoveEntityRPdu, isRepairCompletePdu, isRepairResponsePdu, isResupplyCancelPdu, isResupplyOfferPdu, isResupplyReceivedPdu, isSEESPdu, isSetDataPdu, isSetDataRPdu, isSetRecordRPdu, isSignalPdu, isSimulationManagementFamilyPdu, isSimulationManagementWithReliabilityFamilyPdu, isStartResumePdu, isStartResumeRPdu, isStopFreezePdu, isStopFreezeRPdu, isSupplementalEmissionEntityStatePdu, isSyntheticEnvironmentFamilyPdu, isTransferOwnershipPdu, isTransmitterPdu, isTSPIPdu, isUnderwaterAcousticPdu, isWarfareFamilyPdu, marshal, occursAfter, occursBefore, occursSameTime, setExerciseID, setExerciseID, setLength, setLength, setPduType, setProtocolFamily, setProtocolVersion, setTimestamp, setTimestampSeconds
-
Field Details
-
NAME
-
originatingSimulationAddress
This field shall identify the simulation issuing the Attribute PDU. It shall be represented by a Simulation Address record (see 6.2.79). -
padding1
protected int padding1Padding -
padding2
protected short padding2Padding -
attributeRecordPduType
This field shall represent the type of the PDU that is being extended or updated, if applicable. It shall be represented by an 8-bit enumeration. uid 4 -
attributeRecordProtocolVersion
This field shall indicate the Protocol Version associated with the Attribute Record PDU Type. It shall be represented by an 8-bit enumeration. uid 5 -
masterAttributeRecordType
This field shall contain the Attribute record type of the Attribute records in the PDU if they all have the same Attribute record type. It shall be represented by a 32-bit enumeration. uid 66 Variable Record Type values are defined by VariableRecordType enumerations -
actionCode
This field shall identify the action code applicable to this Attribute PDU. The Action Code shall apply to all Attribute records contained in the PDU. It shall be represented by an 8-bit enumeration. uid 295 -
padding3
protected byte padding3Padding -
numberAttributeRecordSet
protected short numberAttributeRecordSetThis field shall specify the number of Attribute Record Sets that make up the remainder of the PDU. It shall be represented by a 16-bit unsigned integer. -
attributeRecordSets
attributeRecordSets is an undescribed parameter... -
byteArrayOutputStream
byteArrayOutputStream (baos) is used for marshal/unmarshal serialization- See Also:
-
dataOutputStream
dataOutputStream (dos) is used for marshal/unmarshal serialization- See Also:
-
-
Constructor Details
-
AttributePdu
public AttributePdu()Constructor creates and configures a new instance object
-
-
Method Details
-
copy
copy method creates a deep copy of current object using preferred marshalling method- Returns:
- deep copy of PDU
-
copyByteBuffer
Creates a "deep copy" of current object using ByteBuffer methods.- Returns:
- deep copy of PDU
-
copyDataOutputStream
copy method creates a deep copy of current object using DataOutputStream methods.- Returns:
- deep copy of PDU
-
getMarshalledSize
public int getMarshalledSize()Returns size of this serialized (marshalled) object in bytes- Specified by:
getMarshalledSize
in interfaceMarshaller
- Overrides:
getMarshalledSize
in classEntityInformationInteractionFamilyPdu
- Returns:
- serialized size in bytes
- See Also:
-
setOriginatingSimulationAddress
public AttributePdu setOriginatingSimulationAddress(SimulationAddress pOriginatingSimulationAddress) Setter fororiginatingSimulationAddress
- Parameters:
pOriginatingSimulationAddress
- new value of interest- Returns:
- same object to permit progressive setters
-
getOriginatingSimulationAddress
Getter fororiginatingSimulationAddress
- Returns:
- value of interest
-
setPadding1
Setter forpadding1
- Parameters:
pPadding1
- new value of interest- Returns:
- same object to permit progressive setters
-
getPadding1
-
setPadding2
Setter forpadding2
- Parameters:
pPadding2
- new value of interest- Returns:
- same object to permit progressive setters
-
setPadding2
Utility setter forpadding2
- Parameters:
pPadding2
- new value of interest- Returns:
- same object to permit progressive setters
-
getPadding2
-
setAttributeRecordPduType
Setter forattributeRecordPduType
- Parameters:
pAttributeRecordPduType
- new value of interest- Returns:
- same object to permit progressive setters
-
getAttributeRecordPduType
Getter forattributeRecordPduType
- Returns:
- value of interest
-
setAttributeRecordProtocolVersion
public AttributePdu setAttributeRecordProtocolVersion(DISProtocolFamily pAttributeRecordProtocolVersion) Setter forattributeRecordProtocolVersion
- Parameters:
pAttributeRecordProtocolVersion
- new value of interest- Returns:
- same object to permit progressive setters
-
getAttributeRecordProtocolVersion
Getter forattributeRecordProtocolVersion
- Returns:
- value of interest
-
setMasterAttributeRecordType
Setter formasterAttributeRecordType
- Parameters:
pMasterAttributeRecordType
- new value of interest- Returns:
- same object to permit progressive setters
-
getMasterAttributeRecordType
Getter formasterAttributeRecordType
- Returns:
- value of interest
-
setActionCode
Setter foractionCode
- Parameters:
pActionCode
- new value of interest- Returns:
- same object to permit progressive setters
-
getActionCode
-
setPadding3
Setter forpadding3
- Parameters:
pPadding3
- new value of interest- Returns:
- same object to permit progressive setters
-
setPadding3
Utility setter forpadding3
- Parameters:
pPadding3
- new value of interest- Returns:
- same object to permit progressive setters
-
getPadding3
-
setAttributeRecordSets
Setter forattributeRecordSets
- Parameters:
pAttributeRecordSets
- new value of interest- Returns:
- same object to permit progressive setters
-
getAttributeRecordSets
Getter forattributeRecordSets
- Returns:
- value of interest
-
marshal
Serializes an object to a DataOutputStream.- Specified by:
marshal
in interfaceMarshaller
- Overrides:
marshal
in classEntityInformationInteractionFamilyPdu
- Parameters:
dos
- the OutputStream- Throws:
Exception
- if something goes wrong- See Also:
-
unmarshal
Deserializes an object from a DataInputStream.- Specified by:
unmarshal
in interfaceMarshaller
- Overrides:
unmarshal
in classEntityInformationInteractionFamilyPdu
- Parameters:
dis
- the InputStream- Returns:
- marshalled serialized size in bytes
- Throws:
Exception
- if something goes wrong- See Also:
-
marshal
Packs an object into the ByteBuffer.- Specified by:
marshal
in interfaceMarshaller
- Overrides:
marshal
in classEntityInformationInteractionFamilyPdu
- Parameters:
byteBuffer
- The ByteBuffer at the position to begin writing- Throws:
BufferOverflowException
- if byteBuffer is too smallReadOnlyBufferException
- if byteBuffer is read onlyException
- ByteBuffer-generated exception- See Also:
-
unmarshal
Unpacks a Pdu from the underlying data.- Specified by:
unmarshal
in interfaceMarshaller
- Overrides:
unmarshal
in classEntityInformationInteractionFamilyPdu
- Parameters:
byteBuffer
- The ByteBuffer at the position to begin reading- Returns:
- marshalled serialized size in bytes
- Throws:
BufferUnderflowException
- if byteBuffer is too smallException
- ByteBuffer-generated exception- See Also:
-
equals
- Overrides:
equals
in classEntityInformationInteractionFamilyPdu
-
equalsImpl
Description copied from class:Pdu
Compare all fields that contribute to the state, ignoring transient and static fields, forthis
and the supplied object- Overrides:
equalsImpl
in classEntityInformationInteractionFamilyPdu
- Parameters:
obj
- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
- Overrides:
toString
in classEntityInformationInteractionFamilyPdu
-
hashCode
-