Module hla.rti1516e

Interface DataElement

All Known Subinterfaces:
HLAASCIIchar, HLAASCIIstring, HLAboolean, HLAbyte, HLAfixedArray<T>, HLAfixedRecord, HLAfloat32BE, HLAfloat32LE, HLAfloat64BE, HLAfloat64LE, HLAinteger16BE, HLAinteger16LE, HLAinteger32BE, HLAinteger32LE, HLAinteger64BE, HLAinteger64LE, HLAoctet, HLAoctetPairBE, HLAoctetPairLE, HLAopaqueData, HLAunicodeChar, HLAunicodeString, HLAvariableArray<T>, HLAvariantRecord<T>

public interface DataElement
Interface provided by all HLA data elements.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    decode(byte[] bytes)
    Decodes this element from the byte array.
    void
    decode(ByteWrapper byteWrapper)
    Decodes this element from the ByteWrapper.
    void
    encode(ByteWrapper byteWrapper)
    Encodes this element into the specified ByteWrapper.
    int
    Returns the size in bytes of this element's encoding.
    int
    Returns the octet boundary of this element.
    byte[]
    Returns a byte array with this element encoded.
  • Method Details

    • getOctetBoundary

      int getOctetBoundary()
      Returns the octet boundary of this element.
      Returns:
      the octet boundary of this element
    • encode

      void encode(ByteWrapper byteWrapper) throws EncoderException
      Encodes this element into the specified ByteWrapper.
      Parameters:
      byteWrapper - destination for the encoded element
      Throws:
      EncoderException - if the element can not be encoded
    • getEncodedLength

      int getEncodedLength()
      Returns the size in bytes of this element's encoding.
      Returns:
      the size in bytes of this element's encoding
    • toByteArray

      byte[] toByteArray() throws EncoderException
      Returns a byte array with this element encoded.
      Returns:
      byte array with encoded element
      Throws:
      EncoderException - if the element can not be encoded
    • decode

      void decode(ByteWrapper byteWrapper) throws DecoderException
      Decodes this element from the ByteWrapper.
      Parameters:
      byteWrapper - source for the decoding of this element
      Throws:
      DecoderException - if the element can not be decoded
    • decode

      void decode(byte[] bytes) throws DecoderException
      Decodes this element from the byte array.
      Parameters:
      bytes - source for the decoding of this element
      Throws:
      DecoderException - if the element can not be decoded