Hi, I have this code:
systemStatus1 = new BACnetObject(localDevice, localDevice.getNextInstanceObjectIdentifier(ObjectType.analogInput));
systemStatus1.setProperty(PropertyIdentifier.objectName, new CharacterString("System status group 1"));
systemStatus1.setProperty(PropertyIdentifier.units, EngineeringUnits.noUnits);
systemStatus1.setProperty(PropertyIdentifier.presentValue, new Real(65535));
localDevice.addObject(systemStatus1);
As you can see, I'm inserting a Real
with value 65535, which gets translated into 65535.00.
Is there a way to set a integer value? I've tried with UnsignedInteger
but I get
com.serotonin.bacnet4j.exception.BACnetServiceException: class=Property, code=Invalid data type, message=expected class com.serotonin.bacnet4j.type.primitive.Real, received=class com.serotonin.bacnet4j.type.primitive.UnsignedInteger
Thanks