• Recent
    • Tags
    • Popular
    • Register
    • Login

    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

    Timeout error when call getExtendedDeviceInformation

    Scheduled Pinned Locked Moved BACnet4J general discussion
    3 Posts 2 Posters 1.9k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      Madartsoft
      last edited by

      Hi,

      I'm having problem with discovery devices when using method 'getExtendedDeviceInformation'. The application stops and after some time I got a timeout error.
      To test the BACnet I use VTS application. The VTS respond 4 times but it looks like the BACnet4j doesn't see the responses.

      P.S.
      Also the VTS can see 'Iam' message so it's not a communication issue.

          public static void main(String[] args) throws Exception {
               LocalDevice localDevice = new LocalDevice(12, "192.168.254.255");         
              localDevice.getEventHandler().addListener(new Listener());
              localDevice.initialize();
      
              localDevice.sendBroadcast(47808, new WhoIsRequest());
      
              // Wait a bit for responses to come in.
              Thread.sleep(1000);
              
              // Get extended information for all remote devices.
              for (RemoteDevice d : localDevice.getRemoteDevices()) {            
            	
              	localDevice.getExtendedDeviceInformation(d);        	
                  
                  List<ObjectIdentifier> oids = ((SequenceOf<ObjectIdentifier>) localDevice.sendReadPropertyAllowNull(d, d
                          .getObjectIdentifier(), PropertyIdentifier.objectList)).getValues();
      
                  PropertyReferences refs = new PropertyReferences();
                  for (ObjectIdentifier oid : oids)
                      addPropertyReferences(refs, oid);
      
                  PropertyValues pvs = localDevice.readProperties(d, refs);
                  
                  System.out.println(pvs);
                  System.out.println(d);
              }
      
              localDevice.terminate();
              
          }
      
          private static void addPropertyReferences(PropertyReferences refs, ObjectIdentifier oid) {
              refs.add(oid, PropertyIdentifier.objectName);
      
              ObjectType type = oid.getObjectType();
              if (ObjectType.accumulator.equals(type)) {
                  refs.add(oid, PropertyIdentifier.units);
              }
              else if (ObjectType.analogInput.equals(type) || ObjectType.analogOutput.equals(type)
                      || ObjectType.analogValue.equals(type) || ObjectType.pulseConverter.equals(type)) {
                  refs.add(oid, PropertyIdentifier.units);
              }
              else if (ObjectType.binaryInput.equals(type) || ObjectType.binaryOutput.equals(type)
                      || ObjectType.binaryValue.equals(type)) {
                  refs.add(oid, PropertyIdentifier.inactiveText);
                  refs.add(oid, PropertyIdentifier.activeText);
              }
              else if (ObjectType.lifeSafetyPoint.equals(type)) {
                  refs.add(oid, PropertyIdentifier.units);
              }
              else if (ObjectType.loop.equals(type)) {
                  refs.add(oid, PropertyIdentifier.outputUnits);
              }
              else if (ObjectType.multiStateInput.equals(type) || ObjectType.multiStateOutput.equals(type)
                      || ObjectType.multiStateValue.equals(type)) {
                  refs.add(oid, PropertyIdentifier.stateText);
              }
              else
                  return;
      
              refs.add(oid, PropertyIdentifier.presentValue);
          }
      
          static class Listener extends DefaultDeviceEventListener {
              @Override
              public void iAmReceived(RemoteDevice d) {
                  System.out.println("IAm received" + d);
              }
          }
      
      
      1 Reply Last reply Reply Quote 0
      • M Offline
        mlohbihler
        last edited by

        Can you get a trace of the request and response, i.e. the byte streams?

        Best regards,
        Matthew

        1 Reply Last reply Reply Quote 0
        • First post
          Last post