Skip to content
Snippets Groups Projects
Commit ebdec22a authored by Federico Felici's avatar Federico Felici
Browse files

Fixes and cleanup

parent efacc5f5
No related branches found
No related tags found
No related merge requests found
...@@ -112,34 +112,19 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous ...@@ -112,34 +112,19 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
% parameter, otherwise it is taken from the global shot number % parameter, otherwise it is taken from the global shot number
% given to the actualize command % given to the actualize command
if obj.overrideshot == 1 if obj.overrideshot == 1
localshot = obj.overrideshotn; localshot = obj.overrideshotn;
else else
localshot = shot; localshot = shot;
end end
s=mdsopen(obj.mdstree, localshot); mdsconnect(obj.mdsserver);
openok=true; [~,s] = mdsopen(obj.mdstree, localshot);
if isempty(s) if ~rem(s,2)
openok=false; warning('SCDclass_mdspar:MDSerror','MDS+ tree open error for parameter %s. Actualization skipped.',obj.modelparam);
end
if openok
if ~isnumeric(s) || s~=localshot
openok=false;
end
end
if openok
if s~=localshot
openok=false;
end
end
if ~openok
warning('SCDclass_mdspar:MDSerror','MDS+ tree open error for parameter %s. Actualization skipped.',obj.modelparam);
obj.actualizable=false; obj.actualizable=false;
end end
%str=sprintf('SCDclass_mdsparam (%s), failed opening MDS+ tree', obj.modelparam);
%assert(s==localshot, str);
end end
function obj=setactualizecmds(obj, shot) function obj=setactualizecmds(obj)
pointspos=strfind(obj.modelparam,'.'); pointspos=strfind(obj.modelparam,'.');
baseparam=obj.modelparam(1:pointspos(1)-1); baseparam=obj.modelparam(1:pointspos(1)-1);
structparam=obj.modelparam(pointspos(1):end); structparam=obj.modelparam(pointspos(1):end);
...@@ -157,7 +142,7 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous ...@@ -157,7 +142,7 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
% Checking if data can be retrieved, updating get command % Checking if data can be retrieved, updating get command
[obj, obj.value]=obj.getdata(shot); [obj, obj.value]=obj.getdata(shot);
if ~obj.actualizable, return; end if ~obj.actualizable, return; end
obj=obj.setactualizecmds(shot); obj=obj.setactualizecmds;
end end
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment