Sync from remote server: 2025-10-12 18:56:41
This commit is contained in:
54
RSN/SWSearch.m
Executable file
54
RSN/SWSearch.m
Executable 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
|
||||
Reference in New Issue
Block a user