Hi all
I am using BACnet4J in my second project now the first one went well. Thankyou "m" for sharing your work.
I found a little error .... when removing an object from the local device as follows
com.serotonin.bacnet4j.LocalDevice
public void removeObject(ObjectIdentifier id) throws BACnetServiceException {
BACnetObject obj = getObject(id);
if (obj != null)
localObjects.remove(obj);
else
throw new BACnetServiceException(ErrorClass.object, ErrorCode.unknownObject);
// Remove the reference in the device's object list for this id.
//dwb change 20090813
//getObjectList().add(id);
getObjectList().remove(id);
}
and added the following
com.serotonin.bacnet4j.type.constructed.SequenceOf
//dwb added 20090813
import java.util.ListIterator;
//dwb added 20090813
public void remove(E value) {
E e;
for (ListIterator<E> it = values.listIterator(); it.hasNext(); ) {
e = it.next();
if (ObjectUtils.isEqual(e, value)) {
it.remove();
}
}
}
didn't spend a lot of time thinking about above fixed so wouldn't feel sad if someone recomends a better option.