Probelem while assigning property to attributes
|
|
---|---|
Hi all, I am trying to assign properties to attribute through code as above. It is working fine. But when I tried this, It shows an error.It seems that DbData takes exactly three arguments. Is it so?
Regards,
TCS_GMRT |
|
|
---|---|
Hi, without the error stack I don't know the problem but have you tried to use a new instance of DbData? Maybe the error is due to you reusing DbData. Andy |
|
|
---|---|
Hi Andy, I simply getting Segmentation Fault. Actually when I tried to assign two property, it is working fine as I described earlier. But instead, when I tried to assign one or three property, I am getting Segmentation fault. Thanks & Regards, TCS-GMRT
Regards,
TCS_GMRT |
|
|
---|---|
Hi, There is a misunderstanding here. I agree the doc is not very clear on that point. When you want to put/update device attribute property(ies), you need the following info:
property to put/update. Its name is the attribute name and its value is the number of property to put/update. In your first example, everything works fine because you specify 2 as the number of property to put/update and you insert 2 instances of DbDatum instance in the DbData vector (thus the vector has 3 elements). In your second code snippet, you still specify that you want to put/update 2 properties but you provide only one DbDatum instance!! Hoping this help Emmanuel |
|
|
---|---|
Hi Manu, You are right. It worked. Thanks for help to all. Thanks & Regards, TCS-GMRT
Regards,
TCS_GMRT |