- java.lang.Object
-
- org.pcap4j.packet.RadiotapDataDbTxAttenuation
-
- All Implemented Interfaces:
java.io.Serializable,RadiotapPacket.RadiotapData
public final class RadiotapDataDbTxAttenuation extends java.lang.Object implements RadiotapPacket.RadiotapData
Radiotap dB TX attenuation field. Transmit power expressed as decibel distance from max power set at factory calibration. 0 is max power. Monotonically nondecreasing with lower power levels.- Since:
- pcap4j 1.6.5
- See Also:
- Radiotap, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRadiotapDataDbTxAttenuation.Builder
-
Field Summary
Fields Modifier and Type Field Description private static intLENGTHprivate static longserialVersionUIDprivate shorttxAttenuation
-
Constructor Summary
Constructors Modifier Constructor Description privateRadiotapDataDbTxAttenuation(byte[] rawData, int offset, int length)privateRadiotapDataDbTxAttenuation(RadiotapDataDbTxAttenuation.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)RadiotapDataDbTxAttenuation.BuildergetBuilder()byte[]getRawData()shortgetTxAttenuation()intgetTxAttenuationAsInt()inthashCode()intlength()static RadiotapDataDbTxAttenuationnewInstance(byte[] rawData, int offset, int length)A static factory method.java.lang.StringtoString()java.lang.StringtoString(java.lang.String indent)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
LENGTH
private static final int LENGTH
- See Also:
- Constant Field Values
-
txAttenuation
private final short txAttenuation
-
-
Constructor Detail
-
RadiotapDataDbTxAttenuation
private RadiotapDataDbTxAttenuation(byte[] rawData, int offset, int length) throws IllegalRawDataException- Throws:
IllegalRawDataException
-
RadiotapDataDbTxAttenuation
private RadiotapDataDbTxAttenuation(RadiotapDataDbTxAttenuation.Builder builder)
-
-
Method Detail
-
newInstance
public static RadiotapDataDbTxAttenuation newInstance(byte[] rawData, int offset, int length) throws IllegalRawDataException
A static factory method. This method validates the arguments byByteArrays.validateBounds(byte[], int, int), which may throw exceptions undocumented here.- Parameters:
rawData- rawDataoffset- offsetlength- length- Returns:
- a new RadiotapDbTxAttenuation object.
- Throws:
IllegalRawDataException- if parsing the raw data fails.
-
getTxAttenuation
public short getTxAttenuation()
- Returns:
- txAttenuation (unit: dB)
-
getTxAttenuationAsInt
public int getTxAttenuationAsInt()
- Returns:
- txAttenuation (unit: dB)
-
length
public int length()
- Specified by:
lengthin interfaceRadiotapPacket.RadiotapData- Returns:
- length
-
getRawData
public byte[] getRawData()
- Specified by:
getRawDatain interfaceRadiotapPacket.RadiotapData- Returns:
- raw data
-
getBuilder
public RadiotapDataDbTxAttenuation.Builder getBuilder()
- Returns:
- a new Builder object populated with this object's fields.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toString
public java.lang.String toString(java.lang.String indent)
- Specified by:
toStringin interfaceRadiotapPacket.RadiotapData- Parameters:
indent- indent- Returns:
- String representation of this object.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-