Bug in class AcknowledgementService
-
we try to delete objects and found that the appropriate request is not handled at all.
if (type == CreateObjectAck.TYPE_ID) // 10 return new CreateObjectAck(queue); if (type == ReadPropertyAck.TYPE_ID) // 12 return new ReadPropertyAck(queue);
the service with type_id equal 11 is not coded!
the missing code:if (type == DeleteObjectAck.TYPE_ID) // 11 return new DeleteObjectAck(queue);
and that new class is also not coded :)
robert -
the missing class:
package com.serotonin.bacnet4j.service.acknowledgement; import com.serotonin.bacnet4j.exception.BACnetServiceException; import com.serotonin.util.queue.ByteQueue; public class DeleteObjectAck extends AcknowledgementService { private static final long serialVersionUID = 3837098889443642131L; public static final byte TYPE_ID = 11; public DeleteObjectAck() { } @Override public byte getChoiceId() { return TYPE_ID; } @Override public void write(ByteQueue queue) { } DeleteObjectAck(ByteQueue queue) throws BACnetServiceException { } @Override public String toString() { return "DeleteObjectAck()"; } @Override public int hashCode() { final int PRIME = 31; int result = 1; result = PRIME * result; return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final DeleteObjectAck other = (DeleteObjectAck) obj; if (this == other) return true; else return false; } }
the result is not used anyway - if it fails the exception and the appr. error will be catched.