MangoAutomation / BACnet4J

BACnet/IP stack written in Java. Forked from http://sourceforge.net/projects/bacnet4j/
GNU General Public License v3.0
183 stars 110 forks source link

how to set my bacnet analog input properties? #24

Closed yzkim9501 closed 6 years ago

yzkim9501 commented 6 years ago

Hello, I'm using my bacnet4j for collecting my bacnet datas, but I get lots of errors on my BacnetProperty in YABE. I want to set BacnetProperty on my code, How can I set other properties like 'Acked Transitions', 'Deadband', 'Description' or etc? I couldn't find them on test code. Thank you. :)

ai.writeProperty(PropertyIdentifier.units, units);
ai.writeProperty(PropertyIdentifier.presentValue, new Real(value));
ai.writeProperty(PropertyIdentifier.statusFlags, new StatusFlags(false, false, false, false));
ai.writeProperty(PropertyIdentifier.eventState, EventState.normal);
ai.writeProperty(PropertyIdentifier.outOfService, new Boolean(false));
ai.supportCovReporting(CovReportingMixin.criteria13_1_3, new Real(covIncrement))
terrypacker commented 6 years ago

You haven't provided much information to work with, but a quick search of the BACnet4J code shows that you can set deadband on an AnalogInputObject like this:

ai.writePropertyInternal(PropertyIdentifier.deadband, new Real(deadband));

I would just search for references for each of the PropertyIdentifier.* fields you want to use, there are examples throughout the code (some in src/test/java and others in /src/main/java)