Aufgrund von Umarbeiten des s3 Storage wird es in GitLab, in nächster Zeit, mögliche Performance-Einbußen geben. Näheres dazu unter: https://maintenance.itc.rwth-aachen.de/ticket/status/messages/43/show_ticket/6670

NetAudioServerLog.m 2.16 KB
Newer Older
Anne's avatar
Anne committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
%% Einlesen der Logs
close all;
clear all;
BlockSize = '1024';
NetAudioLogServer = dir(['NetAudioLogServer_BS' BlockSize '*.txt']);
NetAudioLogServer = {NetAudioLogServer.name};
NetAudioLogServerTab = readtable(NetAudioLogServer{1}, 'FileType', 'text', 'Delimiter', '\t');
minTime = NetAudioLogServerTab.WorldTimeStamp(1);
maxTime = NetAudioLogServerTab.WorldTimeStamp(end);
channel = NetAudioLogServer{1}(28:end-4);

for k=2:numel(NetAudioLogServer) 
    temp = readtable(NetAudioLogServer{k}, 'FileType', 'text', 'Delimiter', '\t');
    NetAudioLogServerTab = [NetAudioLogServerTab; temp];
    minTime = min(minTime, temp.WorldTimeStamp(1));
    maxTime = max(maxTime, temp.WorldTimeStamp(end));
    channel = [channel; NetAudioLogServer{k}(28:end-4)];
end
NetAudioLogServerTab.WorldTimeStamp = NetAudioLogServerTab.WorldTimeStamp - minTime;

21 22 23 24 25 26 27 28 29 30 31 32 33
% NetAudioLogClient = dir(['NetAudioLogClient_BS' BlockSize '*.txt']);
% NetAudioLogClient = {NetAudioLogClient.name};
% NetAudioLogClientTab = readtable(NetAudioLogClient{1}, 'FileType', 'text', 'Delimiter', '\t');
% minTime = NetAudioLogClientTab.WorldTimeStamp(1);
% maxTime = NetAudioLogClientTab.WorldTimeStamp(end);
% for k=2:numel(NetAudioLogClient) 
%     temp = readtable(NetAudioLogClient{k}, 'FileType', 'text', 'Delimiter', '\t');
%     NetAudioLogClientTab = [NetAudioLogClientTab; temp];
%     minTime = min(minTime, temp.WorldTimeStamp(1));
%     maxTime = max(maxTime, temp.WorldTimeStamp(end));
% end


Anne's avatar
Anne committed
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
%% Protocolstatus ersetzten
Protocol = {'100', 'NP_CLIENT_OPEN';...
    '101', 'NP_CLIENT_CLOSE';...
    '111', 'NP_CLIENT_SENDING_RINGBUFFER_FREE_SAMPLES';...
    '200', 'NP_SERVER_OPEN';...
    '201', 'NP_SERVER_CLOSE';...
    '211', 'NP_SERVER_GET_RINGBUFFER_FREE_SAMPLES';...
    '222', 'NP_SERVER_SENDING_SAMPLES'};
%NumPro = zeros(size(NetAudioLogServerTab.ProtocolStatus));
for k = (1:size(Protocol,1))
%NumPro( NetAudioLogServerTab.ProtocolStatus == 211) = 'NP_SERVER_GET_RINGBUFFER_FREE_SAMPLES';
end


%% Plot Protocol
plot(NetAudioLogServerTab.WorldTimeStamp, NetAudioLogServerTab.ProtocolStatus)
hold on;
51
%plot(NetAudioLogServerTab.WorldTimeStamp, NetAudioLogServerTab.FreeSamples)