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

Examples in "src_test/com/serotonin/bacnet4j/test" cannot compile


  • I have downloaded the latest bacnet4j ( 2016-05-18) from Sourceforge.

    I have managed to compile the library file and attempted to test out some examples of using the library.

    I see that there are a number of seemingly useful demo source files in the folder:

    /src_test/com/serotonin/bacnet4j/test/"

    However, when I tried to compile these files there are multiple compilation errors due to the fact that the library functions may have changed. E.g. IpNetwork() function in the library no longer accepts a single string variable whereas all the test programs still calling ipNetwork() function with a single string variable. There are also other errors.

    I wonder if there are updated sample files that will compile properly when linked to the library? It makes it much easier to understand the program if we can compile and test the program without having to debug all the errors.

    Thank you.


  • Hi leon,

    The latest BACnet4J is more likely the one in our repo: https://github.com/infiniteautomation/BACnet4J

    Matthew has recently contributed v4 of BACnet4J


  • Thank you very much for your advice!

    We checked what we have downloaded and noticed that we have already downloaded version 4. We looked at the build.gradle file we see "version = '4.0.2'". This appears to be the latest version of the library?

    Is there a git clone command for downloading what latest version? Our programmer used this git command to download the library:

    "git clone https://github.com/infiniteautomation/BACnet4J.git".

    If this is still not the latest then we would love to be able to download the latest with updated sample programs. Thanks again for any advice.

    The following are the first few lines in the build.gradle

    apply plugin: 'application'
    apply plugin: 'java'
    apply plugin: 'jacoco'
    apply plugin: 'maven-publish'

    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8

    group = 'com.serotonin'
    version = '4.0.2'

    repositories {
    jcenter()
    }

    dependencies {
    compile 'ai.serotonin.oss:sero-scheduler:[1.1.0,2)'
    compile 'ai.serotonin.oss:sero-warp:1.0.0'
    compile 'org.apache.commons:commons-lang3:3.5'
    compile 'org.scream3r:jssc:2.8.0'
    compile 'org.slf4j:slf4j-api:[1.7.0,1.8)'

    testCompile 'junit:junit:4.12'
    testCompile 'org.mockito:mockito-core:[2.7.22,3)'
    testCompile 'org.slf4j:slf4j-simple:[1.7.0,1.8)'
    

    }


  • @leon said in Examples in "src_test/com/serotonin/bacnet4j/test" cannot compile:

    git clone https://github.com/infiniteautomation/BACnet4J.git

    That is the correct command to checkout the 'master' branch. The master branch is the branch with the latest code.


  • @leon said in Examples in "src_test/com/serotonin/bacnet4j/test" cannot compile:

    /src_test/com/serotonin/bacnet4j/test/"

    Thanks for the confirmation. So it seems like the sample files in the project are indeed not yet updated. If anyone has updated versions of these sample files and could share them it would be most appreciated!