id_rtt.m

来自「good for who wants it」· M 代码 · 共 43 行

M
43
字号
function varargout = id_rtt(h, eventdata, handles, varargin)
% trgraph
global NET AKTWEZ STARTWEZ HIST fig RTT

thandles=guihandles(fig);
RTT=1;
if AKTWEZ~=STARTWEZ
    NET=0; % whole network
    czyscosie;
    HIST=3; % ON if CHECK(2)==0
    [czy, opis]=czyopis('sent packet id', h, eventdata, handles);
    HIST=0; 
    if czy==0
        [opoz, id, idr, seqs, stime, rtime, rozs]=wezrtt(handles,0);
        if isempty(opoz)
            hplot=wykrespusty(handles);
            zapisz_wykres(0, opis, handles);
        else
            [id, i]=sort(id);
            opoz=opoz(i);
            [hplot,id,opoz]=rysuj(id, opoz, handles);
            zapisz_wykres([id, opoz], opis, handles);
        end
        plot_info(opis, eventdata, hplot, handles);
	xylabel('sent packet id',['RTT between node ', ...
	num2str(AKTWEZ),' and node ', num2str(STARTWEZ),' [sec]'], hplot, handles);
    end
else
    NET=0; % whole network
    czyscosie;
    HIST=3; % ON if CHECK(2)==0
    [czy, opis]=czyopis('sent packet id', h, eventdata, handles);
    HIST=0;
    if czy==0
        hplot=wykrespusty(handles);
        zapisz_wykres(0, opis, handles);
        plot_info(opis, eventdata, hplot, handles);
	xylabel('sent packet id',['RTT between node ', ...
	num2str(AKTWEZ),' and node ', num2str(STARTWEZ),' [sec]'], hplot, handles);
    end
end
zapisz_wykres_jpg(opis,handles);
RTT=0;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?