%mandatory --> data;
%optional  --> dataSourceName;

function createDVPDataSource(data , dataSourceName)   
if nargin < 1
    error('not enough parameters');
end

if exist('dataSourceName','var')
    
if isempty(dataSourceName)
    dataSourceID = inputname(1);
else
        dataSourceID = dataSourceName;
end
else 
    dataSourceID = inputname(1);
end

if isempty(data)
    error('data cannot be empty');
end

if ~isnumeric(data)
    error('data cannot non be numeric');
end

    x = struct('requestType', 'create', 'operation', 'dataSource',...
        'config', struct('id', dataSourceID, 'data', data));
  
    sendDataToDVP(x);
end

