Create a BACnet object with fixed instance number
-
Hello
How can I create a BACnet object with fixed instance number on the local device?
Thanks for any answers
-
BACnetObject o = new BACnetObject(LocalDevice, ObjectIdentifier); localDevice.addObject(o);
-
Hello mlohbihler
Thanks for your Answers I had tried it and it don`t works.
How have I to write this when I want a Binary Value with the Objectinstance number 1 for example?Regards
Poldi
-
That code was meant to be instructive, not compilable. The ObjectIndentifier parameter has both data type and instance number. You should find what you need there.
-
I had found something to do what I want here is an example, how I can add a Binary Value with the Instancenumber 1
//Binary Value create with fixed instance number ObjectIdentifier OIbv1 = new ObjectIdentifier(ObjectType.binaryValue, 1); BACnetObject bv1 = new BACnetObject (localDevice, OIbv1);
-
Add this line:
localDevice.addObject(o);