edu.nps.moves.dis
Class ServiceRequestPdu

java.lang.Object
  extended by edu.nps.moves.dis.Pdu
      extended by edu.nps.moves.dis.LogisticsFamilyPdu
          extended by edu.nps.moves.dis.ServiceRequestPdu
All Implemented Interfaces:
java.io.Serializable

@Entity
public class ServiceRequestPdu
extends LogisticsFamilyPdu
implements java.io.Serializable

Section 5.3.5.1. Information about a request for supplies. COMPLETE 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
 long fk_requestingEntityID
           
 long fk_servicingEntityID
           
protected  short numberOfSupplyTypes
          How many requested
protected  EntityID requestingEntityID
          Entity that is requesting service
protected  short serviceRequestPadding
          padding
protected  short serviceTypeRequested
          type of service requested
protected  EntityID servicingEntityID
          Entity that is providing the service
protected  java.util.List<SupplyQuantity> supplies
           
 
Fields inherited from class edu.nps.moves.dis.Pdu
exerciseID, padding, pduLength, pduType, protocolFamily, protocolVersion, timestamp
 
Constructor Summary
ServiceRequestPdu()
          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
 int getMarshalledSize()
           
 short getNumberOfSupplyTypes()
           
 EntityID getRequestingEntityID()
           
 short getServiceRequestPadding()
           
 short getServiceTypeRequested()
           
 EntityID getServicingEntityID()
           
 java.util.List<SupplyQuantity> getSupplies()
           
 void marshal(java.nio.ByteBuffer buff)
          Packs a Pdu into the ByteBuffer.
 void marshal(java.io.DataOutputStream dos)
           
 void setNumberOfSupplyTypes(short pNumberOfSupplyTypes)
          Note that setting this value will not change the marshalled value.
 void setRequestingEntityID(EntityID pRequestingEntityID)
           
 void setServiceRequestPadding(short pServiceRequestPadding)
           
 void setServiceTypeRequested(short pServiceTypeRequested)
           
 void setServicingEntityID(EntityID pServicingEntityID)
           
 void setSupplies(java.util.List<SupplyQuantity> pSupplies)
           
 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.dis.Pdu
getExerciseID, getLength, getPadding, getPduLength, getPduType, getPduTypeEnum, getPk_Pdu, getProtocolFamily, getProtocolVersion, getTimestamp, marshal, marshalWithDisAbsoluteTimestamp, marshalWithDisAbsoluteTimestamp, marshalWithDisRelativeTimestamp, marshalWithDisRelativeTimestamp, marshalWithNpsTimestamp, marshalWithNpsTimestamp, marshalWithUnixTimestamp, marshalWithUnixTimestamp, readUnsignedInt, readUnsignedInt, setExerciseID, setPadding, setPduLength, setPduType, setPk_Pdu, setProtocolFamily, setProtocolVersion, setTimestamp
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

requestingEntityID

protected EntityID requestingEntityID
Entity that is requesting service


servicingEntityID

protected EntityID servicingEntityID
Entity that is providing the service


serviceTypeRequested

protected short serviceTypeRequested
type of service requested


numberOfSupplyTypes

protected short numberOfSupplyTypes
How many requested


serviceRequestPadding

protected short serviceRequestPadding
padding


supplies

protected java.util.List<SupplyQuantity> supplies

fk_requestingEntityID

public long fk_requestingEntityID

fk_servicingEntityID

public long fk_servicingEntityID
Constructor Detail

ServiceRequestPdu

public ServiceRequestPdu()
Constructor

Method Detail

getMarshalledSize

public int getMarshalledSize()
Overrides:
getMarshalledSize in class LogisticsFamilyPdu

setRequestingEntityID

public void setRequestingEntityID(EntityID pRequestingEntityID)

getRequestingEntityID

public EntityID getRequestingEntityID()

setServicingEntityID

public void setServicingEntityID(EntityID pServicingEntityID)

getServicingEntityID

public EntityID getServicingEntityID()

setServiceTypeRequested

public void setServiceTypeRequested(short pServiceTypeRequested)

getServiceTypeRequested

public short getServiceTypeRequested()

getNumberOfSupplyTypes

public short getNumberOfSupplyTypes()

setNumberOfSupplyTypes

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


setServiceRequestPadding

public void setServiceRequestPadding(short pServiceRequestPadding)

getServiceRequestPadding

public short getServiceRequestPadding()

setSupplies

public void setSupplies(java.util.List<SupplyQuantity> pSupplies)

getSupplies

public java.util.List<SupplyQuantity> getSupplies()

marshal

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

unmarshal

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

marshal

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

Overrides:
marshal in class LogisticsFamilyPdu
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 LogisticsFamilyPdu
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 LogisticsFamilyPdu

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 LogisticsFamilyPdu
Parameters:
obj - the object to compare to
Returns:
true if the objects are equal, false otherwise.