private LnDescriptor createDesc(int index, byte[] data) { LnDescriptor att = createDesc(index); att.setRequestData(data); return(att); }
public void transferBlocks(DlmsClient dlms, PhyLayer phy, ImageInformation imageInfo) { int offset = 0; int nblock = 1; LnDescriptor att = createDesc(mtdImageBlockTransfer); while (offset < imageInfo.getImage().Length) { att.setRequestData(getTransferBlockData(nblock, imageInfo)); dlms.action(phy, att); nblock++; offset += imageInfo.getBlockSize(); } }