• 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

    Failed to read binaryValue

    BACnet4J general discussion
    1
    1
    240
    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.
    • B
      BigKING
      last edited by

      Encodable e= RequestUtils.readProperty(d, rd,
          new ObjectIdentifier(ObjectType.binaryValue, 0),
          PropertyIdentifier.presentValue, null);
      

      This is the code for me to read the binary, but when I start the code, the program will report this error on this line

      com.serotonin.bacnet4j.exception.BACnetException: java.lang.reflect.InvocationTargetException
      	at com.serotonin.bacnet4j.transport.ServiceFutureImpl.result(ServiceFutureImpl.java:79)
      	at com.serotonin.bacnet4j.transport.ServiceFutureImpl.get(ServiceFutureImpl.java:64)
      	at com.serotonin.bacnet4j.util.RequestUtils.readProperty(RequestUtils.java:222)
      	at com.fdj.test.demos.web.test.BacNet.BacNet4jtestWriteCross.main(BacNet4jtestWriteCross.java:59)
      Caused by: com.serotonin.bacnet4j.exception.ReflectionException: java.lang.reflect.InvocationTargetException
      	at com.serotonin.bacnet4j.type.Encodable.read(Encodable.java:244)
      	at com.serotonin.bacnet4j.type.AmbiguousValue.convertTo(AmbiguousValue.java:181)
      	at com.serotonin.bacnet4j.type.Encodable.readANY(Encodable.java:447)
      	at com.serotonin.bacnet4j.service.acknowledgement.ReadPropertyAck.<init>(ReadPropertyAck.java:93)
      	at com.serotonin.bacnet4j.service.acknowledgement.AcknowledgementService.createAcknowledgementService(AcknowledgementService.java:50)
      	at com.serotonin.bacnet4j.apdu.ComplexACK.parseServiceData(ComplexACK.java:211)
      	at com.serotonin.bacnet4j.transport.DefaultTransport.completeComplexAckResponse(DefaultTransport.java:760)
      	at com.serotonin.bacnet4j.transport.DefaultTransport.receiveAPDU(DefaultTransport.java:682)
      	at com.serotonin.bacnet4j.transport.DefaultTransport.receiveImpl(DefaultTransport.java:578)
      	at com.serotonin.bacnet4j.transport.DefaultTransport.run(DefaultTransport.java:498)
      	at java.lang.Thread.run(Thread.java:750)
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at com.serotonin.bacnet4j.type.Encodable.read(Encodable.java:237)
      	... 10 more
      Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
      	at com.serotonin.bacnet4j.util.sero.ByteQueue.pop(ByteQueue.java:291)
      	at com.serotonin.bacnet4j.type.primitive.Enumerated.<init>(Enumerated.java:114)
      	at com.serotonin.bacnet4j.type.enumerated.BinaryPV.<init>(BinaryPV.java:76)
      	... 15 more
      

      And when I read another data such as analogValue, there was no problem,why,can somebody help me,thanks!

      The version of my Maven dependency package is 5.0.2

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