Class Sensor
java.lang.Object
edu.nps.moves.dis7.pdus.Sensor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected short
zero-filled array of padding bits for byte alignment and consistent sizing of PDU dataprotected short
quantity of the sensorprotected SensorOnOffStatus
The on/off status of the sensor uid 331protected short
for Source 'other':SensorRecordOtherActiveSensors/325,'em':EmitterName/75,'passive':SensorRecordSensorTypePassiveSensors/326,'mine':6.2.57,'ua':UAAcousticSystemName/144,'lasers':DesignatorSystemName/80protected SensorTypeSource
the source of the Sensor Type field uid 414protected int
the station to which the sensor is assigned. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
equalsImpl
(Object obj) Compare all fields that contribute to the state, ignoring transient and static fields, forthis
and the supplied objectint
Returns size of this serialized (marshalled) object in bytesshort
Getter forpadding
short
Getter forquantity
Getter forsensorOnOffStatus
short
Getter forsensorType
Getter forsensorTypeSource
int
Getter forstation
int
hashCode()
void
marshal
(DataOutputStream dos) Serializes an object to a DataOutputStream.void
marshal
(ByteBuffer byteBuffer) Packs an object into the ByteBuffer.setPadding
(int pPadding) Utility setter forpadding
setPadding
(short pPadding) Setter forpadding
setQuantity
(int pQuantity) Utility setter forquantity
setQuantity
(short pQuantity) Setter forquantity
setSensorOnOffStatus
(SensorOnOffStatus pSensorOnOffStatus) Setter forsensorOnOffStatus
setSensorType
(int pSensorType) Utility setter forsensorType
setSensorType
(short pSensorType) Setter forsensorType
setSensorTypeSource
(SensorTypeSource pSensorTypeSource) Setter forsensorTypeSource
setStation
(int pStation) Setter forstation
toString()
int
unmarshal
(DataInputStream dis) Deserializes an object from a DataInputStream.int
unmarshal
(ByteBuffer byteBuffer) Unpacks a Pdu from the underlying data.
-
Field Details
-
sensorTypeSource
the source of the Sensor Type field uid 414 -
sensorOnOffStatus
The on/off status of the sensor uid 331 -
sensorType
protected short sensorTypefor Source 'other':SensorRecordOtherActiveSensors/325,'em':EmitterName/75,'passive':SensorRecordSensorTypePassiveSensors/326,'mine':6.2.57,'ua':UAAcousticSystemName/144,'lasers':DesignatorSystemName/80 -
station
protected int stationthe station to which the sensor is assigned. A zero value shall indi- cate that this Sensor record is not associated with any particular station and represents the total quan- tity of this sensor for this entity. If this field is non-zero, it shall either reference an attached part or an articulated part -
quantity
protected short quantityquantity of the sensor -
padding
protected short paddingzero-filled array of padding bits for byte alignment and consistent sizing of PDU data
-
-
Constructor Details
-
Sensor
public Sensor()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:
-
setSensorTypeSource
Setter forsensorTypeSource
- Parameters:
pSensorTypeSource
- new value of interest- Returns:
- same object to permit progressive setters
-
getSensorTypeSource
Getter forsensorTypeSource
- Returns:
- value of interest
-
setSensorOnOffStatus
Setter forsensorOnOffStatus
- Parameters:
pSensorOnOffStatus
- new value of interest- Returns:
- same object to permit progressive setters
-
getSensorOnOffStatus
Getter forsensorOnOffStatus
- Returns:
- value of interest
-
setSensorType
Setter forsensorType
- Parameters:
pSensorType
- new value of interest- Returns:
- same object to permit progressive setters
-
setSensorType
Utility setter forsensorType
- Parameters:
pSensorType
- new value of interest- Returns:
- same object to permit progressive setters
-
getSensorType
-
setStation
-
getStation
-
setQuantity
-
setQuantity
-
getQuantity
-
setPadding
-
setPadding
-
getPadding
-
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, forthis
and the supplied object- Parameters:
obj
- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
-
hashCode
-