edu.nps.moves.dismobile
Class IntercomControlPdu

java.lang.Object
  extended by edu.nps.moves.dismobile.Pdu
      extended by edu.nps.moves.dismobile.RadioCommunicationsFamilyPdu
          extended by edu.nps.moves.dismobile.IntercomControlPdu
All Implemented Interfaces:
java.io.Serializable

public class IntercomControlPdu
extends RadioCommunicationsFamilyPdu
implements java.io.Serializable

Section 5.3.8.5. Detailed inofrmation about the state of an intercom device and the actions it is requestion of another intercom device, or the response to a requested action. Required manual intervention to fix the intercom parameters, which can be of varialbe length. UNFINSISHED Copyright (c) 2008-2010, MOVES Institute, Naval Postgraduate School. All rights reserved. This work is licensed under the BSD open source license, available at https://www.movesinstitute.org/licenses/bsd.html

Author:
DMcG
See Also:
Serialized Form

Field Summary
protected  short command
          detailed type requested.
protected  short communicationsChannelType
          control type
protected  short controlType
          control type
protected  java.util.List<IntercomCommunicationsParameters> intercomParameters
          ^^^This is wrong--the length of the data field is variable.
protected  long intercomParametersLength
          number of intercom parameters
protected  int masterCommunicationsDeviceID
          specific intercom device that has created this intercom channel
protected  EntityID masterEntityID
          eid of the entity that has created this intercom channel.
protected  short sourceCommunicationsDeviceID
          The specific intercom device being simulated within an entity.
protected  EntityID sourceEntityID
          Source entity ID
protected  short sourceLineID
          Line number to which the intercom control refers
protected  short transmitLineState
          current transmit state of the line
protected  short transmitPriority
          priority of this message relative to transmissons from other intercom devices
 
Fields inherited from class edu.nps.moves.dismobile.RadioCommunicationsFamilyPdu
entityId, radioId
 
Fields inherited from class edu.nps.moves.dismobile.Pdu
exerciseID, padding, pduLength, pduType, protocolFamily, protocolVersion, timestamp
 
Constructor Summary
IntercomControlPdu()
          Constructor
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 boolean equalsImpl(java.lang.Object obj)
          Compare all fields that contribute to the state, ignoring transient and static fields, for this and the supplied object
 short getCommand()
           
 short getCommunicationsChannelType()
           
 short getControlType()
           
 java.util.List<IntercomCommunicationsParameters> getIntercomParameters()
           
 long getIntercomParametersLength()
           
 int getMarshalledSize()
           
 int getMasterCommunicationsDeviceID()
           
 EntityID getMasterEntityID()
           
 short getSourceCommunicationsDeviceID()
           
 EntityID getSourceEntityID()
           
 short getSourceLineID()
           
 short getTransmitLineState()
           
 short getTransmitPriority()
           
 void marshal(java.nio.ByteBuffer buff)
          Packs a Pdu into the ByteBuffer.
 void marshal(java.io.DataOutputStream dos)
           
 void setCommand(short pCommand)
           
 void setCommunicationsChannelType(short pCommunicationsChannelType)
           
 void setControlType(short pControlType)
           
 void setIntercomParameters(java.util.List<IntercomCommunicationsParameters> pIntercomParameters)
           
 void setIntercomParametersLength(long pIntercomParametersLength)
          Note that setting this value will not change the marshalled value.
 void setMasterCommunicationsDeviceID(int pMasterCommunicationsDeviceID)
           
 void setMasterEntityID(EntityID pMasterEntityID)
           
 void setSourceCommunicationsDeviceID(short pSourceCommunicationsDeviceID)
           
 void setSourceEntityID(EntityID pSourceEntityID)
           
 void setSourceLineID(short pSourceLineID)
           
 void setTransmitLineState(short pTransmitLineState)
           
 void setTransmitPriority(short pTransmitPriority)
           
 void unmarshal(java.nio.ByteBuffer buff)
          Unpacks a Pdu from the underlying data.
 void unmarshal(java.io.DataInputStream dis)
           
 
Methods inherited from class edu.nps.moves.dismobile.RadioCommunicationsFamilyPdu
getEntityId, getRadioId, setEntityId, setRadioId
 
Methods inherited from class edu.nps.moves.dismobile.Pdu
getExerciseID, getLength, getPadding, getPduLength, getPduType, getProtocolFamily, getProtocolVersion, getTimestamp, marshal, marshalWithDisAbsoluteTimestamp, marshalWithDisAbsoluteTimestamp, marshalWithDisRelativeTimestamp, marshalWithDisRelativeTimestamp, marshalWithNpsTimestamp, marshalWithNpsTimestamp, marshalWithUnixTimestamp, marshalWithUnixTimestamp, readUnsignedInt, readUnsignedInt, setExerciseID, setPadding, setPduLength, setPduType, setProtocolFamily, setProtocolVersion, setTimestamp
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

controlType

protected short controlType
control type


communicationsChannelType

protected short communicationsChannelType
control type


sourceEntityID

protected EntityID sourceEntityID
Source entity ID


sourceCommunicationsDeviceID

protected short sourceCommunicationsDeviceID
The specific intercom device being simulated within an entity.


sourceLineID

protected short sourceLineID
Line number to which the intercom control refers


transmitPriority

protected short transmitPriority
priority of this message relative to transmissons from other intercom devices


transmitLineState

protected short transmitLineState
current transmit state of the line


command

protected short command
detailed type requested.


masterEntityID

protected EntityID masterEntityID
eid of the entity that has created this intercom channel.


masterCommunicationsDeviceID

protected int masterCommunicationsDeviceID
specific intercom device that has created this intercom channel


intercomParametersLength

protected long intercomParametersLength
number of intercom parameters


intercomParameters

protected java.util.List<IntercomCommunicationsParameters> intercomParameters
^^^This is wrong--the length of the data field is variable. Using a long for now.

Constructor Detail

IntercomControlPdu

public IntercomControlPdu()
Constructor

Method Detail

getMarshalledSize

public int getMarshalledSize()
Overrides:
getMarshalledSize in class RadioCommunicationsFamilyPdu

setControlType

public void setControlType(short pControlType)

getControlType

public short getControlType()

setCommunicationsChannelType

public void setCommunicationsChannelType(short pCommunicationsChannelType)

getCommunicationsChannelType

public short getCommunicationsChannelType()

setSourceEntityID

public void setSourceEntityID(EntityID pSourceEntityID)

getSourceEntityID

public EntityID getSourceEntityID()

setSourceCommunicationsDeviceID

public void setSourceCommunicationsDeviceID(short pSourceCommunicationsDeviceID)

getSourceCommunicationsDeviceID

public short getSourceCommunicationsDeviceID()

setSourceLineID

public void setSourceLineID(short pSourceLineID)

getSourceLineID

public short getSourceLineID()

setTransmitPriority

public void setTransmitPriority(short pTransmitPriority)

getTransmitPriority

public short getTransmitPriority()

setTransmitLineState

public void setTransmitLineState(short pTransmitLineState)

getTransmitLineState

public short getTransmitLineState()

setCommand

public void setCommand(short pCommand)

getCommand

public short getCommand()

setMasterEntityID

public void setMasterEntityID(EntityID pMasterEntityID)

getMasterEntityID

public EntityID getMasterEntityID()

setMasterCommunicationsDeviceID

public void setMasterCommunicationsDeviceID(int pMasterCommunicationsDeviceID)

getMasterCommunicationsDeviceID

public int getMasterCommunicationsDeviceID()

getIntercomParametersLength

public long getIntercomParametersLength()

setIntercomParametersLength

public void setIntercomParametersLength(long pIntercomParametersLength)
Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose. The getintercomParametersLength method will also be based on the actual list length rather than this value. The method is simply here for java bean completeness.


setIntercomParameters

public void setIntercomParameters(java.util.List<IntercomCommunicationsParameters> pIntercomParameters)

getIntercomParameters

public java.util.List<IntercomCommunicationsParameters> getIntercomParameters()

marshal

public void marshal(java.io.DataOutputStream dos)
Overrides:
marshal in class RadioCommunicationsFamilyPdu

unmarshal

public void unmarshal(java.io.DataInputStream dis)
Overrides:
unmarshal in class RadioCommunicationsFamilyPdu

marshal

public void marshal(java.nio.ByteBuffer buff)
Packs a Pdu into the ByteBuffer.

Overrides:
marshal in class RadioCommunicationsFamilyPdu
Parameters:
buff - The ByteBuffer at the position to begin writing
Throws:
java.nio.BufferOverflowException - if buff is too small
java.nio.ReadOnlyBufferException - if buff is read only
Since:
??
See Also:
ByteBuffer

unmarshal

public void unmarshal(java.nio.ByteBuffer buff)
Unpacks a Pdu from the underlying data.

Overrides:
unmarshal in class RadioCommunicationsFamilyPdu
Parameters:
buff - The ByteBuffer at the position to begin reading
Throws:
java.nio.BufferUnderflowException - if buff is too small
Since:
??
See Also:
ByteBuffer

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class RadioCommunicationsFamilyPdu

equalsImpl

public boolean equalsImpl(java.lang.Object obj)
Description copied from class: Pdu
Compare all fields that contribute to the state, ignoring transient and static fields, for this and the supplied object

Overrides:
equalsImpl in class RadioCommunicationsFamilyPdu
Parameters:
obj - the object to compare to
Returns:
true if the objects are equal, false otherwise.