Skip to content

Providing BACnet objects (BACnet server)

pichler edited this page Jun 30, 2015 · 1 revision

The local device instance can provide programmable BACnet objects. The following example shows how to create a new analog value object with some common object properties set:

ObjectIdentifier objectId = new ObjectIdentifier(ObjectType.analogValue, 1);
BACnetObject object = new BACnetObject(localDevice, objectId);

object.setProperty(new PropertyValue(PropertyIdentifier.presentValue, new Real(12.3f)));
object.setProperty(new PropertyValue(PropertyIdentifier.description, new CharacterString("Outside temperature")));
object.setProperty(new PropertyValue(PropertyIdentifier.units, EngineeringUnits.degreesCelsius));
object.setProperty(new PropertyValue(PropertyIdentifier.objectName, new CharacterString("B'U'TOa")));

localDevice.addObject(object);

For debugging, BACnet tools like YABE can be used to connect to the device and read to properties that have been set with the example above.

Back to bacnet4J page