• 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

    How to send request to a device

    BACnet4J general discussion
    2
    9
    4.3k
    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
      millben11
      last edited by

      Hi,
      I am new for bacnet. I have a bacnet device , and let's say its id is 2.
      How can I write a small java to sent request to the device and get back its response?

      1 Reply Last reply Reply Quote 0
      • M
        mlohbihler
        last edited by

        Check out the source code in the test package.

        Best regards,
        Matthew

        1 Reply Last reply Reply Quote 0
        • M
          millben11
          last edited by

          Thanks Mlohbihler

          I try to complie the Test2, and get following error.Did I make someting uncorrect?

          Test2.java:39: cannot find symbol
          symbol : variable read
          location: class com.serotonin.bacnet4j.test.Test2
          ReadPropertyAck ack = (ReadPropertyAck) localDevice.send(addr, null, 14
          6, Segmentation.segmentedBoth, read);

                                     ^
          

          Note: Test2.java uses unchecked or unsafe operations.
          Note: Recompile with -Xlint:unchecked for details.
          1 error

          1 Reply Last reply Reply Quote 0
          • M
            mlohbihler
            last edited by

            Yes. It doesn't know what the symbol "read" is.

            Best regards,
            Matthew

            1 Reply Last reply Reply Quote 0
            • M
              millben11
              last edited by

              Yes, you are right.
              I took out the "read" object.
              Now, I put it back,and (following ) this is the actual error (my first error) while doing compling.
              It seems some classes missing in the package.

              Test2.java:37: cannot access com.serotonin.util.queue.ByteQueue
              class file for com.serotonin.util.queue.ByteQueue not found
              ReadPropertyRequest read = new ReadPropertyRequest(new ObjectIdentifier(
              ObjectType.device, deviceId),
              ^
              Note: Test2.java uses unchecked or unsafe operations.
              Note: Recompile with -Xlint:unchecked for details.

              1 Reply Last reply Reply Quote 0
              • M
                mlohbihler
                last edited by

                seroUtils.jar is included in the package. You need this in your classpath.

                Best regards,
                Matthew

                1 Reply Last reply Reply Quote 0
                • M
                  millben11
                  last edited by

                  in the package, we use a lot of com.serotonin.util.queue.ByteQueue;but
                  where i can find the source code for
                  com.serotonin.util.queue.ByteQueue?
                  Or, what is method or function for it?

                  1 Reply Last reply Reply Quote 0
                  • M
                    mlohbihler
                    last edited by

                    ByteQueue is in the seroUtils.jar file, which is not open source. You shouldn't really need it since it's just a utility class anyway.

                    Best regards,
                    Matthew

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