If I create a new Switch record:
mgrec *switchRec = mgNewRec(fltSwitch);
and try to set the following attributes:
numAttributes = mgSetAttList(switchRec,
fltSwCount, fSwCount, MG_NULL);
I get as return value numAttributes = 3, i.e. the operation was successful for the 3 attributes, but at the same time I get two errors in the MS DOS window:
Ã¢â¬ÅCannot set this switch node attributeÃ¢â¬Â ( for fltSwMaxMask attribute)
Ã¢â¬ÅCannot set this switch node attributeÃ¢â¬Â (for fltSwCount attribute)
That certainly is not behavior you would expect. Thank you for bringing this to our attention, we will log a bug and look into this.
Just took a quick look at the code and see the culprit. In the case of the switch attribute values you note, the value returned by mgSetAttList reflects the number of attributes that are "valid" for the node type, not the actual number that were set successfully. In the case of "read only" attributes, they are "valid" for get but not for "set".
Again, we really appreciate your feedback and we'll see what we can do to fix this ;-)
Thanks for the prompt reply !
Due to ambiguity I checked the values of the attributes again after the call to mgSetAttList: fltSwMaxMask and fltSwCount where not changed by the command and they retained the default values. It means the error messages in MS DOS window were correct but not the returned value from mgSetAttList. The 3 listed attributes are not described as "read only" in the Reference Manual.
The 3 listed attributes are not described as Ã¢â¬Åread onlyÃ¢â¬Â in the Reference Manual.I'll add a note in the bug to this effect to make sure the Data Dictionary (Reference) reflects this. Thanks again for your help.