setAttributes method
Implementation
AsyncReply<bool> setAttributes(IResource resource, Structure attributes,
[bool clearAttributes = false]) {
var rt = new AsyncReply<bool>();
sendRequest(clearAttributes
? IIPPacketAction.UpdateAllAttributes
: IIPPacketAction.UpdateAttributes)
..addUint32(resource.instance?.id as int)
..addDC(Codec.composeStructure(attributes, this, true, true, true))
..done()
.then<dynamic>((ar) => rt.trigger(true))
.error((ex) => rt.triggerError(ex));
return rt;
}