classdef Point < handle
    % Implementing Sldv.Point in MCOS
    properties
        name % string
        
    end
    properties (SetAccess = private)
        value % read only
    end
    
    methods 
        
        function v = getFlatValue(obj)
            v = obj.value;
            if isa(v, 'embedded.fi')
                v = v.double;
            end
        end
        
        % Constructor
        function point = Point(varargin)
            checkargin(nargin, varargin);
            point.value = varargin{1};
        end
    end
   
end

function checkargin(n, args)
    if n~=1 || ~(isnumeric(args{1}) || islogical(args{1})) 
        error(message('Sldv:Point:ArgCheck'));
    end
end