Sync from remote server: 2025-10-12 18:56:41

This commit is contained in:
2025-10-12 18:56:59 +02:00
commit 7e8ee264aa
553 changed files with 161447 additions and 0 deletions

54
RSN/SWSearch.m Executable file
View File

@@ -0,0 +1,54 @@
function yesMusa = SWSearch(idTool,conn,FileName)
fileID = fopen(FileName,'a');
fmt = '%s \r';
text = 'SWSearch function started';
fprintf(fileID,fmt,text);
yesMusa = 0;
%% Baro Musa Link
comando = ['select num, depth from nodes where tool_id = ''' idTool ''' and nodetype_id = 41 order by num'];
Leggo = fetch(conn,comando);
[~,cL] = size(Leggo);
if cL > 1
yesMusa = 1;
text = 'Baro Musa Links identified, Musa relaunch activated';
fprintf(fileID,fmt,text);
end
%% Humidity link
comando = ['select num, depth from nodes where tool_id = ''' idTool ''' and nodetype_id = 35 order by num'];
Leggo = fetch(conn,comando);
[~,cL] = size(Leggo);
if cL > 1
yesMusa = 1;
text = 'Humidity Links identified, Musa relaunch activated';
fprintf(fileID,fmt,text);
end
%% CO2 Link
comando = ['select num, depth from nodes where tool_id = ''' idTool ''' and nodetype_id = 33 order by num'];
Leggo = fetch(conn,comando);
[~,cL] = size(Leggo);
if cL > 1
yesMusa = 1;
text = 'CO2 Links identified, Musa relaunch activated';
fprintf(fileID,fmt,text);
end
%% Lux Link
comando = ['select num, depth from nodes where tool_id = ''' idTool ''' and nodetype_id = 34 order by num'];
Leggo = fetch(conn,comando);
[~,cL] = size(Leggo);
if cL > 1
yesMusa = 1;
text = 'Lux Links identified, Musa relaunch activated';
fprintf(fileID,fmt,text);
end
text = 'SWScheme function ended';
fprintf(fileID,fmt,text);
fclose(fileID);
end