Пример #1
0
  public void unmarshal(DataInputStream dis) {
    super.unmarshal(dis);

    try {
      minefieldID.unmarshal(dis);
      requestingEntityID.unmarshal(dis);
      requestID = (short) dis.readUnsignedByte();
      numberOfPerimeterPoints = (short) dis.readUnsignedByte();
      pad2 = (short) dis.readUnsignedByte();
      numberOfSensorTypes = (short) dis.readUnsignedByte();
      dataFilter = dis.readInt();
      requestedMineType.unmarshal(dis);
      for (int idx = 0; idx < numberOfPerimeterPoints; idx++) {
        Point anX = new Point();
        anX.unmarshal(dis);
        requestedPerimeterPoints.add(anX);
      }

      for (int idx = 0; idx < numberOfSensorTypes; idx++) {
        TwoByteChunk anX = new TwoByteChunk();
        anX.unmarshal(dis);
        sensorTypes.add(anX);
      }

    } // end try
    catch (Exception e) {
      System.out.println(e);
    }
  } // end of unmarshal method
Пример #2
0
  public void unmarshal(DataInputStream dis) {
    super.unmarshal(dis);

    try {
      minefieldID.unmarshal(dis);
      requestingEntityID.unmarshal(dis);
      minefieldSequenceNumbeer = (int) dis.readUnsignedShort();
      requestID = (short) dis.readUnsignedByte();
      pduSequenceNumber = (short) dis.readUnsignedByte();
      numberOfPdus = (short) dis.readUnsignedByte();
      numberOfMinesInThisPdu = (short) dis.readUnsignedByte();
      numberOfSensorTypes = (short) dis.readUnsignedByte();
      pad2 = (short) dis.readUnsignedByte();
      dataFilter = dis.readInt();
      mineType.unmarshal(dis);
      for (int idx = 0; idx < numberOfSensorTypes; idx++) {
        TwoByteChunk anX = new TwoByteChunk();
        anX.unmarshal(dis);
        sensorTypes.add(anX);
      }

      pad3 = (short) dis.readUnsignedByte();
      for (int idx = 0; idx < numberOfMinesInThisPdu; idx++) {
        Vector3Float anX = new Vector3Float();
        anX.unmarshal(dis);
        mineLocation.add(anX);
      }

    } // end try
    catch (Exception e) {
      System.out.println(e);
    }
  } // end of unmarshal method
Пример #3
0
  public void marshal(DataOutputStream dos) {
    super.marshal(dos);
    try {
      minefieldID.marshal(dos);
      requestingEntityID.marshal(dos);
      dos.writeByte((byte) requestID);
      dos.writeByte((byte) requestedPerimeterPoints.size());
      dos.writeByte((byte) pad2);
      dos.writeByte((byte) sensorTypes.size());
      dos.writeInt((int) dataFilter);
      requestedMineType.marshal(dos);

      for (int idx = 0; idx < requestedPerimeterPoints.size(); idx++) {
        Point aPoint = requestedPerimeterPoints.get(idx);
        aPoint.marshal(dos);
      } // end of list marshalling

      for (int idx = 0; idx < sensorTypes.size(); idx++) {
        TwoByteChunk aTwoByteChunk = sensorTypes.get(idx);
        aTwoByteChunk.marshal(dos);
      } // end of list marshalling

    } // end try
    catch (Exception e) {
      System.out.println(e);
    }
  } // end of marshal method
Пример #4
0
  public void marshal(DataOutputStream dos) {
    super.marshal(dos);
    try {
      minefieldID.marshal(dos);
      requestingEntityID.marshal(dos);
      dos.writeShort((short) minefieldSequenceNumbeer);
      dos.writeByte((byte) requestID);
      dos.writeByte((byte) pduSequenceNumber);
      dos.writeByte((byte) numberOfPdus);
      dos.writeByte((byte) mineLocation.size());
      dos.writeByte((byte) sensorTypes.size());
      dos.writeByte((byte) pad2);
      dos.writeInt((int) dataFilter);
      mineType.marshal(dos);

      for (int idx = 0; idx < sensorTypes.size(); idx++) {
        TwoByteChunk aTwoByteChunk = sensorTypes.get(idx);
        aTwoByteChunk.marshal(dos);
      } // end of list marshalling

      dos.writeByte((byte) pad3);

      for (int idx = 0; idx < mineLocation.size(); idx++) {
        Vector3Float aVector3Float = mineLocation.get(idx);
        aVector3Float.marshal(dos);
      } // end of list marshalling

    } // end try
    catch (Exception e) {
      System.out.println(e);
    }
  } // end of marshal method
Пример #5
0
  /**
   * Packs a Pdu into the ByteBuffer.
   *
   * @throws java.nio.BufferOverflowException if buff is too small
   * @throws java.nio.ReadOnlyBufferException if buff is read only
   * @see java.nio.ByteBuffer
   * @param buff The ByteBuffer at the position to begin writing
   * @since ??
   */
  public void marshal(java.nio.ByteBuffer buff) {
    super.marshal(buff);
    minefieldID.marshal(buff);
    requestingEntityID.marshal(buff);
    buff.putShort((short) minefieldSequenceNumbeer);
    buff.put((byte) requestID);
    buff.put((byte) pduSequenceNumber);
    buff.put((byte) numberOfPdus);
    buff.put((byte) mineLocation.size());
    buff.put((byte) sensorTypes.size());
    buff.put((byte) pad2);
    buff.putInt((int) dataFilter);
    mineType.marshal(buff);

    for (int idx = 0; idx < sensorTypes.size(); idx++) {
      TwoByteChunk aTwoByteChunk = (TwoByteChunk) sensorTypes.get(idx);
      aTwoByteChunk.marshal(buff);
    } // end of list marshalling

    buff.put((byte) pad3);

    for (int idx = 0; idx < mineLocation.size(); idx++) {
      Vector3Float aVector3Float = (Vector3Float) mineLocation.get(idx);
      aVector3Float.marshal(buff);
    } // end of list marshalling
  } // end of marshal method
Пример #6
0
  /**
   * Unpacks a Pdu from the underlying data.
   *
   * @throws java.nio.BufferUnderflowException if buff is too small
   * @see java.nio.ByteBuffer
   * @param buff The ByteBuffer at the position to begin reading
   * @since ??
   */
  public void unmarshal(java.nio.ByteBuffer buff) {
    super.unmarshal(buff);

    minefieldID.unmarshal(buff);
    requestingEntityID.unmarshal(buff);
    minefieldSequenceNumbeer = (int) (buff.getShort() & 0xFFFF);
    requestID = (short) (buff.get() & 0xFF);
    pduSequenceNumber = (short) (buff.get() & 0xFF);
    numberOfPdus = (short) (buff.get() & 0xFF);
    numberOfMinesInThisPdu = (short) (buff.get() & 0xFF);
    numberOfSensorTypes = (short) (buff.get() & 0xFF);
    pad2 = (short) (buff.get() & 0xFF);
    dataFilter = buff.getInt();
    mineType.unmarshal(buff);
    for (int idx = 0; idx < numberOfSensorTypes; idx++) {
      TwoByteChunk anX = new TwoByteChunk();
      anX.unmarshal(buff);
      sensorTypes.add(anX);
    }

    pad3 = (short) (buff.get() & 0xFF);
    for (int idx = 0; idx < numberOfMinesInThisPdu; idx++) {
      Vector3Float anX = new Vector3Float();
      anX.unmarshal(buff);
      mineLocation.add(anX);
    }
  } // end of unmarshal method
Пример #7
0
  @Override
  public boolean equalsImpl(Object obj) {
    boolean ivarsEqual = true;

    if (!(obj instanceof MinefieldDataPdu)) return false;

    final MinefieldDataPdu rhs = (MinefieldDataPdu) obj;

    if (!(minefieldID.equals(rhs.minefieldID))) ivarsEqual = false;
    if (!(requestingEntityID.equals(rhs.requestingEntityID))) ivarsEqual = false;
    if (!(minefieldSequenceNumbeer == rhs.minefieldSequenceNumbeer)) ivarsEqual = false;
    if (!(requestID == rhs.requestID)) ivarsEqual = false;
    if (!(pduSequenceNumber == rhs.pduSequenceNumber)) ivarsEqual = false;
    if (!(numberOfPdus == rhs.numberOfPdus)) ivarsEqual = false;
    if (!(numberOfMinesInThisPdu == rhs.numberOfMinesInThisPdu)) ivarsEqual = false;
    if (!(numberOfSensorTypes == rhs.numberOfSensorTypes)) ivarsEqual = false;
    if (!(pad2 == rhs.pad2)) ivarsEqual = false;
    if (!(dataFilter == rhs.dataFilter)) ivarsEqual = false;
    if (!(mineType.equals(rhs.mineType))) ivarsEqual = false;

    for (int idx = 0; idx < sensorTypes.size(); idx++) {
      if (!(sensorTypes.get(idx).equals(rhs.sensorTypes.get(idx)))) ivarsEqual = false;
    }

    if (!(pad3 == rhs.pad3)) ivarsEqual = false;

    for (int idx = 0; idx < mineLocation.size(); idx++) {
      if (!(mineLocation.get(idx).equals(rhs.mineLocation.get(idx)))) ivarsEqual = false;
    }

    return ivarsEqual && super.equalsImpl(rhs);
  }
Пример #8
0
  @Override
  public boolean equalsImpl(Object obj) {
    boolean ivarsEqual = true;

    if (!(obj instanceof MinefieldQueryPdu)) return false;

    final MinefieldQueryPdu rhs = (MinefieldQueryPdu) obj;

    if (!(minefieldID.equals(rhs.minefieldID))) ivarsEqual = false;
    if (!(requestingEntityID.equals(rhs.requestingEntityID))) ivarsEqual = false;
    if (!(requestID == rhs.requestID)) ivarsEqual = false;
    if (!(numberOfPerimeterPoints == rhs.numberOfPerimeterPoints)) ivarsEqual = false;
    if (!(pad2 == rhs.pad2)) ivarsEqual = false;
    if (!(numberOfSensorTypes == rhs.numberOfSensorTypes)) ivarsEqual = false;
    if (!(dataFilter == rhs.dataFilter)) ivarsEqual = false;
    if (!(requestedMineType.equals(rhs.requestedMineType))) ivarsEqual = false;

    for (int idx = 0; idx < requestedPerimeterPoints.size(); idx++) {
      if (!(requestedPerimeterPoints.get(idx).equals(rhs.requestedPerimeterPoints.get(idx))))
        ivarsEqual = false;
    }

    for (int idx = 0; idx < sensorTypes.size(); idx++) {
      if (!(sensorTypes.get(idx).equals(rhs.sensorTypes.get(idx)))) ivarsEqual = false;
    }

    return ivarsEqual && super.equalsImpl(rhs);
  }
Пример #9
0
  public int getMarshalledSize() {
    int marshalSize = 0;

    marshalSize = super.getMarshalledSize();
    marshalSize = marshalSize + minefieldID.getMarshalledSize(); // minefieldID
    marshalSize = marshalSize + requestingEntityID.getMarshalledSize(); // requestingEntityID
    marshalSize = marshalSize + 2; // minefieldSequenceNumbeer
    marshalSize = marshalSize + 1; // requestID
    marshalSize = marshalSize + 1; // pduSequenceNumber
    marshalSize = marshalSize + 1; // numberOfPdus
    marshalSize = marshalSize + 1; // numberOfMinesInThisPdu
    marshalSize = marshalSize + 1; // numberOfSensorTypes
    marshalSize = marshalSize + 1; // pad2
    marshalSize = marshalSize + 4; // dataFilter
    marshalSize = marshalSize + mineType.getMarshalledSize(); // mineType
    for (int idx = 0; idx < sensorTypes.size(); idx++) {
      TwoByteChunk listElement = sensorTypes.get(idx);
      marshalSize = marshalSize + listElement.getMarshalledSize();
    }
    marshalSize = marshalSize + 1; // pad3
    for (int idx = 0; idx < mineLocation.size(); idx++) {
      Vector3Float listElement = mineLocation.get(idx);
      marshalSize = marshalSize + listElement.getMarshalledSize();
    }

    return marshalSize;
  }
Пример #10
0
 /**
  * Packs a Pdu into the ByteBuffer.
  *
  * @throws java.nio.BufferOverflowException if buff is too small
  * @throws java.nio.ReadOnlyBufferException if buff is read only
  * @see java.nio.ByteBuffer
  * @param buff The ByteBuffer at the position to begin writing
  * @since ??
  */
 public void marshal(java.nio.ByteBuffer buff) {
   super.marshal(buff);
   orginatingEntityID.marshal(buff);
   receivingEntityID.marshal(buff);
   relationship.marshal(buff);
   partLocation.marshal(buff);
   namedLocationID.marshal(buff);
   partEntityType.marshal(buff);
 } // end of marshal method
Пример #11
0
  public int getMarshalledSize() {
    int marshalSize = 0;

    marshalSize = super.getMarshalledSize();
    marshalSize = marshalSize + orginatingEntityID.getMarshalledSize(); // orginatingEntityID
    marshalSize = marshalSize + receivingEntityID.getMarshalledSize(); // receivingEntityID
    marshalSize = marshalSize + relationship.getMarshalledSize(); // relationship
    marshalSize = marshalSize + partLocation.getMarshalledSize(); // partLocation
    marshalSize = marshalSize + namedLocationID.getMarshalledSize(); // namedLocationID
    marshalSize = marshalSize + partEntityType.getMarshalledSize(); // partEntityType

    return marshalSize;
  }
Пример #12
0
 public void marshal(DataOutputStream dos) {
   super.marshal(dos);
   try {
     orginatingEntityID.marshal(dos);
     receivingEntityID.marshal(dos);
     relationship.marshal(dos);
     partLocation.marshal(dos);
     namedLocationID.marshal(dos);
     partEntityType.marshal(dos);
   } // end try
   catch (Exception e) {
     System.out.println(e);
   }
 } // end of marshal method
Пример #13
0
  @Override
  public boolean equalsImpl(Object obj) {
    boolean ivarsEqual = true;

    if (!(obj instanceof IsPartOfPdu)) return false;

    final IsPartOfPdu rhs = (IsPartOfPdu) obj;

    if (!(orginatingEntityID.equals(rhs.orginatingEntityID))) ivarsEqual = false;
    if (!(receivingEntityID.equals(rhs.receivingEntityID))) ivarsEqual = false;
    if (!(relationship.equals(rhs.relationship))) ivarsEqual = false;
    if (!(partLocation.equals(rhs.partLocation))) ivarsEqual = false;
    if (!(namedLocationID.equals(rhs.namedLocationID))) ivarsEqual = false;
    if (!(partEntityType.equals(rhs.partEntityType))) ivarsEqual = false;

    return ivarsEqual && super.equalsImpl(rhs);
  }
Пример #14
0
 /**
  * Unpacks a Pdu from the underlying data.
  *
  * @throws java.nio.BufferUnderflowException if buff is too small
  * @see java.nio.ByteBuffer
  * @param buff The ByteBuffer at the position to begin reading
  * @since ??
  */
 public void unmarshal(java.nio.ByteBuffer buff) {
   recordType = (short) (buff.get() & 0xFF);
   changeIndicator = (short) (buff.get() & 0xFF);
   associationStatus = (short) (buff.get() & 0xFF);
   associationType = (short) (buff.get() & 0xFF);
   entityID.unmarshal(buff);
   ownStationLocation = (int) (buff.getShort() & 0xFFFF);
   physicalConnectionType = (short) (buff.get() & 0xFF);
   groupMemberType = (short) (buff.get() & 0xFF);
   groupNumber = (int) (buff.getShort() & 0xFFFF);
 } // end of unmarshal method
Пример #15
0
 /**
  * Packs a Pdu into the ByteBuffer.
  *
  * @throws java.nio.BufferOverflowException if buff is too small
  * @throws java.nio.ReadOnlyBufferException if buff is read only
  * @see java.nio.ByteBuffer
  * @param buff The ByteBuffer at the position to begin writing
  * @since ??
  */
 public void marshal(java.nio.ByteBuffer buff) {
   buff.put((byte) recordType);
   buff.put((byte) changeIndicator);
   buff.put((byte) associationStatus);
   buff.put((byte) associationType);
   entityID.marshal(buff);
   buff.putShort((short) ownStationLocation);
   buff.put((byte) physicalConnectionType);
   buff.put((byte) groupMemberType);
   buff.putShort((short) groupNumber);
 } // end of marshal method
Пример #16
0
  /**
   * Packs a Pdu into the ByteBuffer.
   *
   * @throws java.nio.BufferOverflowException if buff is too small
   * @throws java.nio.ReadOnlyBufferException if buff is read only
   * @see java.nio.ByteBuffer
   * @param buff The ByteBuffer at the position to begin writing
   * @since ??
   */
  public void marshal(java.nio.ByteBuffer buff) {
    super.marshal(buff);
    minefieldID.marshal(buff);
    requestingEntityID.marshal(buff);
    buff.put((byte) requestID);
    buff.put((byte) requestedPerimeterPoints.size());
    buff.put((byte) pad2);
    buff.put((byte) sensorTypes.size());
    buff.putInt((int) dataFilter);
    requestedMineType.marshal(buff);

    for (int idx = 0; idx < requestedPerimeterPoints.size(); idx++) {
      Point aPoint = (Point) requestedPerimeterPoints.get(idx);
      aPoint.marshal(buff);
    } // end of list marshalling

    for (int idx = 0; idx < sensorTypes.size(); idx++) {
      TwoByteChunk aTwoByteChunk = (TwoByteChunk) sensorTypes.get(idx);
      aTwoByteChunk.marshal(buff);
    } // end of list marshalling
  } // end of marshal method
Пример #17
0
  public int getMarshalledSize() {
    int marshalSize = 0;

    marshalSize = super.getMarshalledSize();
    marshalSize = marshalSize + minefieldID.getMarshalledSize(); // minefieldID
    marshalSize = marshalSize + requestingEntityID.getMarshalledSize(); // requestingEntityID
    marshalSize = marshalSize + 1; // requestID
    marshalSize = marshalSize + 1; // numberOfPerimeterPoints
    marshalSize = marshalSize + 1; // pad2
    marshalSize = marshalSize + 1; // numberOfSensorTypes
    marshalSize = marshalSize + 4; // dataFilter
    marshalSize = marshalSize + requestedMineType.getMarshalledSize(); // requestedMineType
    for (int idx = 0; idx < requestedPerimeterPoints.size(); idx++) {
      Point listElement = requestedPerimeterPoints.get(idx);
      marshalSize = marshalSize + listElement.getMarshalledSize();
    }
    for (int idx = 0; idx < sensorTypes.size(); idx++) {
      TwoByteChunk listElement = sensorTypes.get(idx);
      marshalSize = marshalSize + listElement.getMarshalledSize();
    }

    return marshalSize;
  }
Пример #18
0
  /**
   * Unpacks a Pdu from the underlying data.
   *
   * @throws java.nio.BufferUnderflowException if buff is too small
   * @see java.nio.ByteBuffer
   * @param buff The ByteBuffer at the position to begin reading
   * @since ??
   */
  public void unmarshal(java.nio.ByteBuffer buff) {
    super.unmarshal(buff);

    minefieldID.unmarshal(buff);
    requestingEntityID.unmarshal(buff);
    requestID = (short) (buff.get() & 0xFF);
    numberOfPerimeterPoints = (short) (buff.get() & 0xFF);
    pad2 = (short) (buff.get() & 0xFF);
    numberOfSensorTypes = (short) (buff.get() & 0xFF);
    dataFilter = buff.getInt();
    requestedMineType.unmarshal(buff);
    for (int idx = 0; idx < numberOfPerimeterPoints; idx++) {
      Point anX = new Point();
      anX.unmarshal(buff);
      requestedPerimeterPoints.add(anX);
    }

    for (int idx = 0; idx < numberOfSensorTypes; idx++) {
      TwoByteChunk anX = new TwoByteChunk();
      anX.unmarshal(buff);
      sensorTypes.add(anX);
    }
  } // end of unmarshal method
Пример #19
0
  /**
   * Packs a Pdu into the ByteBuffer.
   *
   * @throws java.nio.BufferOverflowException if buff is too small
   * @throws java.nio.ReadOnlyBufferException if buff is read only
   * @see java.nio.ByteBuffer
   * @param buff The ByteBuffer at the position to begin writing
   * @since ??
   */
  public void marshal(java.nio.ByteBuffer buff) {
    super.marshal(buff);
    entityId.marshal(buff);
    buff.putShort((short) communicationsDeviceID);
    buff.putShort((short) encodingScheme);
    buff.putShort((short) tdlType);
    buff.putInt((int) sampleRate);
    buff.putShort((short) data.size());
    buff.putShort((short) samples);

    for (int idx = 0; idx < data.size(); idx++) {
      OneByteChunk aOneByteChunk = (OneByteChunk) data.get(idx);
      aOneByteChunk.marshal(buff);
    } // end of list marshalling
  } // end of marshal method
Пример #20
0
  public int getMarshalledSize() {
    int marshalSize = 0;

    marshalSize = marshalSize + 1; // recordType
    marshalSize = marshalSize + 1; // changeIndicator
    marshalSize = marshalSize + 1; // associationStatus
    marshalSize = marshalSize + 1; // associationType
    marshalSize = marshalSize + entityID.getMarshalledSize(); // entityID
    marshalSize = marshalSize + 2; // ownStationLocation
    marshalSize = marshalSize + 1; // physicalConnectionType
    marshalSize = marshalSize + 1; // groupMemberType
    marshalSize = marshalSize + 2; // groupNumber

    return marshalSize;
  }
Пример #21
0
  /**
   * Unpacks a Pdu from the underlying data.
   *
   * @throws java.nio.BufferUnderflowException if buff is too small
   * @see java.nio.ByteBuffer
   * @param buff The ByteBuffer at the position to begin reading
   * @since ??
   */
  public void unmarshal(java.nio.ByteBuffer buff) {
    super.unmarshal(buff);

    entityId.unmarshal(buff);
    communicationsDeviceID = (int) (buff.getShort() & 0xFFFF);
    encodingScheme = (int) (buff.getShort() & 0xFFFF);
    tdlType = (int) (buff.getShort() & 0xFFFF);
    sampleRate = buff.getInt();
    dataLength = (int) (buff.getShort() & 0xFFFF);
    samples = (int) (buff.getShort() & 0xFFFF);
    for (int idx = 0; idx < dataLength; idx++) {
      OneByteChunk anX = new OneByteChunk();
      anX.unmarshal(buff);
      data.add(anX);
    }
  } // end of unmarshal method
Пример #22
0
 public void marshal(DataOutputStream dos) {
   try {
     dos.writeByte((byte) recordType);
     dos.writeByte((byte) changeIndicator);
     dos.writeByte((byte) associationStatus);
     dos.writeByte((byte) associationType);
     entityID.marshal(dos);
     dos.writeShort((short) ownStationLocation);
     dos.writeByte((byte) physicalConnectionType);
     dos.writeByte((byte) groupMemberType);
     dos.writeShort((short) groupNumber);
   } // end try
   catch (Exception e) {
     System.out.println(e);
   }
 } // end of marshal method
Пример #23
0
 public void unmarshal(DataInputStream dis) {
   try {
     recordType = (short) dis.readUnsignedByte();
     changeIndicator = (short) dis.readUnsignedByte();
     associationStatus = (short) dis.readUnsignedByte();
     associationType = (short) dis.readUnsignedByte();
     entityID.unmarshal(dis);
     ownStationLocation = (int) dis.readUnsignedShort();
     physicalConnectionType = (short) dis.readUnsignedByte();
     groupMemberType = (short) dis.readUnsignedByte();
     groupNumber = (int) dis.readUnsignedShort();
   } // end try
   catch (Exception e) {
     System.out.println(e);
   }
 } // end of unmarshal method
Пример #24
0
  public int getMarshalledSize() {
    int marshalSize = 0;

    marshalSize = super.getMarshalledSize();
    marshalSize = marshalSize + entityId.getMarshalledSize(); // entityId
    marshalSize = marshalSize + 2; // communicationsDeviceID
    marshalSize = marshalSize + 2; // encodingScheme
    marshalSize = marshalSize + 2; // tdlType
    marshalSize = marshalSize + 4; // sampleRate
    marshalSize = marshalSize + 2; // dataLength
    marshalSize = marshalSize + 2; // samples
    for (int idx = 0; idx < data.size(); idx++) {
      OneByteChunk listElement = data.get(idx);
      marshalSize = marshalSize + listElement.getMarshalledSize();
    }

    return marshalSize;
  }
Пример #25
0
  /**
   * Compare all fields that contribute to the state, ignoring transient and static fields, for
   * <code>this</code> and the supplied object
   *
   * @param obj the object to compare to
   * @return true if the objects are equal, false otherwise.
   */
  public boolean equalsImpl(Object obj) {
    boolean ivarsEqual = true;

    if (!(obj instanceof EntityAssociation)) return false;

    final EntityAssociation rhs = (EntityAssociation) obj;

    if (!(recordType == rhs.recordType)) ivarsEqual = false;
    if (!(changeIndicator == rhs.changeIndicator)) ivarsEqual = false;
    if (!(associationStatus == rhs.associationStatus)) ivarsEqual = false;
    if (!(associationType == rhs.associationType)) ivarsEqual = false;
    if (!(entityID.equals(rhs.entityID))) ivarsEqual = false;
    if (!(ownStationLocation == rhs.ownStationLocation)) ivarsEqual = false;
    if (!(physicalConnectionType == rhs.physicalConnectionType)) ivarsEqual = false;
    if (!(groupMemberType == rhs.groupMemberType)) ivarsEqual = false;
    if (!(groupNumber == rhs.groupNumber)) ivarsEqual = false;

    return ivarsEqual;
  }
Пример #26
0
  public void marshal(DataOutputStream dos) {
    super.marshal(dos);
    try {
      entityId.marshal(dos);
      dos.writeShort((short) communicationsDeviceID);
      dos.writeShort((short) encodingScheme);
      dos.writeShort((short) tdlType);
      dos.writeInt((int) sampleRate);
      dos.writeShort((short) data.size());
      dos.writeShort((short) samples);

      for (int idx = 0; idx < data.size(); idx++) {
        OneByteChunk aOneByteChunk = data.get(idx);
        aOneByteChunk.marshal(dos);
      } // end of list marshalling

    } // end try
    catch (Exception e) {
      System.out.println(e);
    }
  } // end of marshal method
Пример #27
0
  @Override
  public boolean equalsImpl(Object obj) {
    boolean ivarsEqual = true;

    if (!(obj instanceof IntercomSignalPdu)) return false;

    final IntercomSignalPdu rhs = (IntercomSignalPdu) obj;

    if (!(entityId.equals(rhs.entityId))) ivarsEqual = false;
    if (!(communicationsDeviceID == rhs.communicationsDeviceID)) ivarsEqual = false;
    if (!(encodingScheme == rhs.encodingScheme)) ivarsEqual = false;
    if (!(tdlType == rhs.tdlType)) ivarsEqual = false;
    if (!(sampleRate == rhs.sampleRate)) ivarsEqual = false;
    if (!(dataLength == rhs.dataLength)) ivarsEqual = false;
    if (!(samples == rhs.samples)) ivarsEqual = false;

    for (int idx = 0; idx < data.size(); idx++) {
      if (!(data.get(idx).equals(rhs.data.get(idx)))) ivarsEqual = false;
    }

    return ivarsEqual && super.equalsImpl(rhs);
  }
Пример #28
0
  public void unmarshal(DataInputStream dis) {
    super.unmarshal(dis);

    try {
      entityId.unmarshal(dis);
      communicationsDeviceID = (int) dis.readUnsignedShort();
      encodingScheme = (int) dis.readUnsignedShort();
      tdlType = (int) dis.readUnsignedShort();
      sampleRate = dis.readInt();
      dataLength = (int) dis.readUnsignedShort();
      samples = (int) dis.readUnsignedShort();
      for (int idx = 0; idx < dataLength; idx++) {
        OneByteChunk anX = new OneByteChunk();
        anX.unmarshal(dis);
        data.add(anX);
      }

    } // end try
    catch (Exception e) {
      System.out.println(e);
    }
  } // end of unmarshal method