Package edu.nps.moves.dis7.pdus
Class DirectedEnergyDamage
java.lang.Object
edu.nps.moves.dis7.pdus.DirectedEnergyDamage
- All Implemented Interfaces:
Serializable
Damage sustained by an entity due to directed energy. Location of the damage based on a relative x,y,z location from the center of the entity. Section 6.2.15.2
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DEDamageDescriptionComponentDamageStatusenumeration uid 315enumeration uid 314enumeration uid 317enumeration uid 316protected floatSize of damaged area, in metersprotected Vector3Floatlocation of damage, relative to center of entityprotected EventIdentifierFor any component damage resulting this field shall be set to the fire event ID from that PDU.protected shortzero-filled array of padding bits for byte alignment and consistent sizing of PDU dataprotected shortpaddingprotected shortDE Record Length (bytes)protected intDE Record Type.protected floataverage temp of the damaged area, in degrees celsius. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor creates and configures a new instance object -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanequalsImpl(Object obj) Compare all fields that contribute to the state, ignoring transient and static fields, forthisand the supplied objectGetter forcomponentDamageStatusGetter forcomponentIdentificationGetter forcomponentVisualDamageStatusGetter forcomponentVisualSmokeColorfloatGetter fordamageDiameterGetter fordamageLocationGetter forfireEventIDintReturns size of this serialized (marshalled) object in bytesshortGetter forpaddingshortGetter forpadding2shortGetter forrecordLengthintGetter forrecordTypefloatGetter fortemperatureinthashCode()voidmarshal(DataOutputStream dos) Serializes an object to a DataOutputStream.voidmarshal(ByteBuffer byteBuffer) Packs an object into the ByteBuffer.setComponentDamageStatus(DEDamageDescriptionComponentDamageStatus pComponentDamageStatus) Setter forcomponentDamageStatussetComponentIdentification(EntityDamageStatusComponentIdentification pComponentIdentification) Setter forcomponentIdentificationsetComponentVisualDamageStatus(DEDamageDescriptionComponentVisualDamageStatus pComponentVisualDamageStatus) Setter forcomponentVisualDamageStatussetComponentVisualSmokeColor(DEDamageDescriptionComponentVisualSmokeColor pComponentVisualSmokeColor) Setter forcomponentVisualSmokeColorsetDamageDiameter(float pDamageDiameter) Setter fordamageDiametersetDamageLocation(Vector3Float pDamageLocation) Setter fordamageLocationsetFireEventID(EventIdentifier pFireEventID) Setter forfireEventIDsetPadding(int pPadding) Utility setter forpaddingsetPadding(short pPadding) Setter forpaddingsetPadding2(int pPadding2) Utility setter forpadding2setPadding2(short pPadding2) Setter forpadding2setRecordLength(int pRecordLength) Utility setter forrecordLengthsetRecordLength(short pRecordLength) Setter forrecordLengthsetRecordType(int pRecordType) Setter forrecordTypesetTemperature(float pTemperature) Setter fortemperaturetoString()intunmarshal(DataInputStream dis) Deserializes an object from a DataInputStream.intunmarshal(ByteBuffer byteBuffer) Unpacks a Pdu from the underlying data.
-
Field Details
-
recordType
protected int recordTypeDE Record Type. -
recordLength
protected short recordLengthDE Record Length (bytes) -
padding
protected short paddingzero-filled array of padding bits for byte alignment and consistent sizing of PDU data -
damageLocation
location of damage, relative to center of entity -
damageDiameter
protected float damageDiameterSize of damaged area, in meters -
temperature
protected float temperatureaverage temp of the damaged area, in degrees celsius. If firing entitty does not model this, use a value of -273.15 -
componentIdentification
enumeration uid 314 -
componentDamageStatus
enumeration uid 315 -
componentVisualDamageStatus
enumeration uid 317 -
componentVisualSmokeColor
enumeration uid 316 -
fireEventID
For any component damage resulting this field shall be set to the fire event ID from that PDU. -
padding2
protected short padding2padding
-
-
Constructor Details
-
DirectedEnergyDamage
public DirectedEnergyDamage()Constructor creates and configures a new instance object
-
-
Method Details
-
getMarshalledSize
public int getMarshalledSize()Returns size of this serialized (marshalled) object in bytes- Returns:
- serialized size in bytes
- See Also:
-
setRecordType
Setter forrecordType- Parameters:
pRecordType- new value of interest- Returns:
- same object to permit progressive setters
-
getRecordType
-
setRecordLength
Setter forrecordLength- Parameters:
pRecordLength- new value of interest- Returns:
- same object to permit progressive setters
-
setRecordLength
Utility setter forrecordLength- Parameters:
pRecordLength- new value of interest- Returns:
- same object to permit progressive setters
-
getRecordLength
-
setPadding
Setter forpadding- Parameters:
pPadding- new value of interest- Returns:
- same object to permit progressive setters
-
setPadding
Utility setter forpadding- Parameters:
pPadding- new value of interest- Returns:
- same object to permit progressive setters
-
getPadding
-
setDamageLocation
Setter fordamageLocation- Parameters:
pDamageLocation- new value of interest- Returns:
- same object to permit progressive setters
-
getDamageLocation
-
setDamageDiameter
Setter fordamageDiameter- Parameters:
pDamageDiameter- new value of interest- Returns:
- same object to permit progressive setters
-
getDamageDiameter
-
setTemperature
Setter fortemperature- Parameters:
pTemperature- new value of interest- Returns:
- same object to permit progressive setters
-
getTemperature
-
setComponentIdentification
public DirectedEnergyDamage setComponentIdentification(EntityDamageStatusComponentIdentification pComponentIdentification) Setter forcomponentIdentification- Parameters:
pComponentIdentification- new value of interest- Returns:
- same object to permit progressive setters
-
getComponentIdentification
Getter forcomponentIdentification- Returns:
- value of interest
-
setComponentDamageStatus
public DirectedEnergyDamage setComponentDamageStatus(DEDamageDescriptionComponentDamageStatus pComponentDamageStatus) Setter forcomponentDamageStatus- Parameters:
pComponentDamageStatus- new value of interest- Returns:
- same object to permit progressive setters
-
getComponentDamageStatus
Getter forcomponentDamageStatus- Returns:
- value of interest
-
setComponentVisualDamageStatus
public DirectedEnergyDamage setComponentVisualDamageStatus(DEDamageDescriptionComponentVisualDamageStatus pComponentVisualDamageStatus) Setter forcomponentVisualDamageStatus- Parameters:
pComponentVisualDamageStatus- new value of interest- Returns:
- same object to permit progressive setters
-
getComponentVisualDamageStatus
Getter forcomponentVisualDamageStatus- Returns:
- value of interest
-
setComponentVisualSmokeColor
public DirectedEnergyDamage setComponentVisualSmokeColor(DEDamageDescriptionComponentVisualSmokeColor pComponentVisualSmokeColor) Setter forcomponentVisualSmokeColor- Parameters:
pComponentVisualSmokeColor- new value of interest- Returns:
- same object to permit progressive setters
-
getComponentVisualSmokeColor
Getter forcomponentVisualSmokeColor- Returns:
- value of interest
-
setFireEventID
Setter forfireEventID- Parameters:
pFireEventID- new value of interest- Returns:
- same object to permit progressive setters
-
getFireEventID
-
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
-
marshal
Serializes an object to a DataOutputStream.- Parameters:
dos- the OutputStream- Throws:
Exception- if something goes wrong- See Also:
-
unmarshal
Deserializes an object from a DataInputStream.- 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.- 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.- 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
-
equalsImpl
Compare all fields that contribute to the state, ignoring transient and static fields, forthisand the supplied object- Parameters:
obj- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
-
hashCode
-