Class EntityTypeRaw

java.lang.Object
edu.nps.moves.dis7.pdus.EntityTypeRaw
All Implemented Interfaces:
Serializable

public class EntityTypeRaw extends Object implements Serializable
Identifies the type of Entity
See Also:
  • Field Details

    • entityKind

      protected EntityKind entityKind
      Kind of entity uid 7
    • domain

      protected byte domain
      Domain of entity (air, surface, subsurface, space, etc.)
    • country

      protected short country
      country to which the design of the entity is attributed
    • category

      protected byte category
      category of entity
    • subCategory

      protected byte subCategory
      subcategory of entity
    • specific

      protected byte specific
      specific info based on subcategory field. Renamed from specific because that is a reserved word in SQL.
    • extra

      protected byte extra
      extra is an undescribed parameter...
  • Constructor Details

    • EntityTypeRaw

      public EntityTypeRaw()
      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:
    • setEntityKind

      public EntityTypeRaw setEntityKind(EntityKind pEntityKind)
      Setter for entityKind
      Parameters:
      pEntityKind - new value of interest
      Returns:
      same object to permit progressive setters
    • getEntityKind

      public EntityKind getEntityKind()
      Getter for entityKind
      Returns:
      value of interest
    • setDomain

      public EntityTypeRaw setDomain(byte pDomain)
      Setter for domain
      Parameters:
      pDomain - new value of interest
      Returns:
      same object to permit progressive setters
    • setDomain

      public EntityTypeRaw setDomain(int pDomain)
      Utility setter for domain
      Parameters:
      pDomain - new value of interest
      Returns:
      same object to permit progressive setters
    • getDomain

      public byte getDomain()
      Getter for domain
      Returns:
      value of interest
    • setCountry

      public EntityTypeRaw setCountry(short pCountry)
      Setter for country
      Parameters:
      pCountry - new value of interest
      Returns:
      same object to permit progressive setters
    • setCountry

      public EntityTypeRaw setCountry(int pCountry)
      Utility setter for country
      Parameters:
      pCountry - new value of interest
      Returns:
      same object to permit progressive setters
    • getCountry

      public short getCountry()
      Getter for country
      Returns:
      value of interest
    • setCategory

      public EntityTypeRaw setCategory(byte pCategory)
      Setter for category
      Parameters:
      pCategory - new value of interest
      Returns:
      same object to permit progressive setters
    • setCategory

      public EntityTypeRaw setCategory(int pCategory)
      Utility setter for category
      Parameters:
      pCategory - new value of interest
      Returns:
      same object to permit progressive setters
    • getCategory

      public byte getCategory()
      Getter for category
      Returns:
      value of interest
    • setSubCategory

      public EntityTypeRaw setSubCategory(byte pSubCategory)
      Setter for subCategory
      Parameters:
      pSubCategory - new value of interest
      Returns:
      same object to permit progressive setters
    • setSubCategory

      public EntityTypeRaw setSubCategory(int pSubCategory)
      Utility setter for subCategory
      Parameters:
      pSubCategory - new value of interest
      Returns:
      same object to permit progressive setters
    • getSubCategory

      public byte getSubCategory()
      Getter for subCategory
      Returns:
      value of interest
    • setSpecific

      public EntityTypeRaw setSpecific(byte pSpecific)
      Setter for specific
      Parameters:
      pSpecific - new value of interest
      Returns:
      same object to permit progressive setters
    • setSpecific

      public EntityTypeRaw setSpecific(int pSpecific)
      Utility setter for specific
      Parameters:
      pSpecific - new value of interest
      Returns:
      same object to permit progressive setters
    • getSpecific

      public byte getSpecific()
      Getter for specific
      Returns:
      value of interest
    • setExtra

      public EntityTypeRaw setExtra(byte pExtra)
      Setter for extra
      Parameters:
      pExtra - new value of interest
      Returns:
      same object to permit progressive setters
    • setExtra

      public EntityTypeRaw setExtra(int pExtra)
      Utility setter for extra
      Parameters:
      pExtra - new value of interest
      Returns:
      same object to permit progressive setters
    • getExtra

      public byte getExtra()
      Getter for extra
      Returns:
      value of interest
    • marshal

      public void marshal(DataOutputStream dos) throws Exception
      Serializes an object to a DataOutputStream.
      Parameters:
      dos - the OutputStream
      Throws:
      Exception - if something goes wrong
      See Also:
    • unmarshal

      public int unmarshal(DataInputStream dis) throws Exception
      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

      public void marshal(ByteBuffer byteBuffer) throws Exception
      Packs an object into the ByteBuffer.
      Parameters:
      byteBuffer - The ByteBuffer at the position to begin writing
      Throws:
      BufferOverflowException - if byteBuffer is too small
      ReadOnlyBufferException - if byteBuffer is read only
      Exception - ByteBuffer-generated exception
      See Also:
    • unmarshal

      public int unmarshal(ByteBuffer byteBuffer) throws Exception
      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 small
      Exception - ByteBuffer-generated exception
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsImpl

      public boolean equalsImpl(Object obj)
      Compare all fields that contribute to the state, ignoring transient and static fields, for this and the supplied object
      Parameters:
      obj - the object to compare to
      Returns:
      true if the objects are equal, false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object