removeAttributes method
Implementation
AsyncReply<bool> removeAttributes(IResource resource,
[List<String>? attributes = null]) {
var rt = new AsyncReply<bool>();
if (attributes == null)
(sendRequest(IIPPacketAction.ClearAllAttributes)
..addUint32(resource.instance?.id as int))
.done()
..then((ar) => rt.trigger(true))
..error((ex) => rt.triggerError(ex));
else {
var attrs = DC.stringArrayToBytes(attributes);
(sendRequest(IIPPacketAction.ClearAttributes)
..addUint32(resource.instance?.id as int)
..addInt32(attrs.length)
..addDC(attrs))
.done()
..then<dynamic>((ar) => rt.trigger(true))
..error((ex) => rt.triggerError(ex));
}
return rt;
}