Hi all!
I'm working on a proof of concept project, part of which requires me to use bacnet4j libraries.
Project so far went perfect, until the bacnet part. This is where it all stopped :)
Browsing through the forum I got a slight understanding of "what" and "how" yet when I try running your examples (to get a slight idea on how it's working) nothing works.
Am I missing something?
So far I have tried DiscoveryTest.java
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The constructor LocalDevice(int, String) is undefined
The method setPort(int) is undefined for the type LocalDevice
The type new DeviceEventListener(){} must implement the inherited abstract method DeviceEventListener.reinitializeDevice(ReinitializeDeviceRequest$ReinitializedStateOfDevice)
The type new DeviceEventListener(){} must implement the inherited abstract method DeviceEventListener.synchronizeTime(DateTime, boolean)
The method sendBroadcast(Address, OctetString, UnconfirmedRequestService) in the type LocalDevice is not applicable for the arguments (int, WhoIsRequest)
The method getExtendedDeviceInformation(RemoteDevice) is undefined for the type LocalDevice
The method sendReadPropertyAllowNull(RemoteDevice, ObjectIdentifier, PropertyIdentifier) is undefined for the type LocalDevice
The method readProperties(RemoteDevice, PropertyReferences) is undefined for the type LocalDevice
The method readProperties(RemoteDevice, PropertyReferences) is undefined for the type LocalDevice
at DiscoveryTest.<init>(DiscoveryTest.java:48)
at DiscoveryTest.main(DiscoveryTest.java:152)
LoopDevice.java
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
DEFAULT_PORT cannot be resolved or is not a field
at LoopDevice.main(LoopDevice.java:38)
And even when replacing DEFAULT_PORT with a random number, I got compiler errors:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The constructor LocalDevice(int, String) is undefined
The method setPort(int) is undefined for the type LocalDevice
The type new DeviceEventListener(){} must implement the inherited abstract method DeviceEventListener.reinitializeDevice(ReinitializeDeviceRequest$ReinitializedStateOfDevice)
The type new DeviceEventListener(){} must implement the inherited abstract method DeviceEventListener.synchronizeTime(DateTime, boolean)
The method getBroadcastAddress() is undefined for the type LocalDevice
The method getPort() is undefined for the type LocalDevice
at LoopDevice.<init>(LoopDevice.java:52)
at LoopDevice.main(LoopDevice.java:38)
BacnetTest (from bacnet4j-src)
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang3/ObjectUtils
at com.serotonin.bacnet4j.obj.BACnetObject.setPropertyImpl(BACnetObject.java:269)
at com.serotonin.bacnet4j.obj.BACnetObject.setProperty(BACnetObject.java:193)
at com.serotonin.bacnet4j.obj.BACnetObject.<init>(BACnetObject.java:88)
at com.serotonin.bacnet4j.LocalDevice.<init>(LocalDevice.java:118)
at BacnetTest.main(BacnetTest.java:31)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.ObjectUtils
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 5 more
and so on...
i'm using java 1.7 x64
and bacnet4j 1.3
and seroUtils 1.3
What am I doing wrong?
Eventually what I would like to achieve is to list all devices present on the network and write a file on one.
Best regards,
Michael Cann