Dynamic Attribute in JAVA

Hi all,

I am wondering how to assign properties to attributes in JAVA.
Here few lines of code I am using to do so.

Database db=new Database();
		DbClass myClass = new DbClass("DynamicProperty");
		DbAttribute DbAttr = new DbAttribute("Speed");

		
		DbAttr.add("min_value" , 10);
		DbAttr.add("max_value" , 90);
		DbAttr.add("min_alarm" , 20);
		DbAttr.add("max_alarm" , 80);

		myClass.put_attribute_property(DbAttr);

Is this right?

Thank & Regards,
Pritesh
Hi
It seems right for class attribute properties.
If you want to assign device attribute properties,
you must do same code but on DeviceProxy object.
myProxy.put_attribute_property(DbAttr);
 
Register or login to create to post a reply.