• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. dave

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website
    D
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Best 0
    • Controversial 0
    • Groups 0

    dave

    @dave

    0
    Reputation
    291
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    dave Unfollow Follow

    Latest posts made by dave

    • Error when removing local oject

      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.

      posted in BACnet4J general discussion
      D
      dave
    • RE: Error when removing local oject

      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.

      posted in BACnet4J general discussion
      D
      dave