代码拉取完成,页面将自动刷新
function [compressedPacketsDS] = compressPacketsDS(packetsDS)
%creates a compressed version of the given packetsDS data structure
dsInd = 1;
for i=1:size(packetsDS, 2)
pktTrans = packetsDS{i}.trans;
transSize = size(pktTrans, 2);
for j=1:transSize
compressedPacketsDS.ind(dsInd) = packetsDS{i}.pkt.ind;
compressedPacketsDS.src(dsInd) = packetsDS{i}.pkt.src;
compressedPacketsDS.dst(dsInd) = packetsDS{i}.pkt.dst;
compressedPacketsDS.startTimes(dsInd) = pktTrans{j}.start;
compressedPacketsDS.endTimes(dsInd) = pktTrans{j}.end;
compressedPacketsDS.isAcked(dsInd) = 0;
dsInd = dsInd + 1;
end
if(packetsDS{i}.isAcked == 1)
compressedPacketsDS.isAcked(dsInd-1) = 1; % we got a valid ACK only on the last retransmission!
end
end
end
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。