Skip to content
Snippets Groups Projects
Select Git revision
  • bd4f3929da4b67c70292a320ee1c6518e49a2e7e
  • master default protected
  • dev_2022
  • patch-1
  • develop
  • 50-use-ubuntus-libhidapi
  • issue-highLevelDispatch
  • issue-highLevelDesign
  • issue-motorStartBug
  • issue-commandLayerDesign
  • v1.0
  • v0.4-rc.13
  • v0.4-rc.12
  • v0.4-rc.11
  • v0.4-rc.10
  • v0.4-rc.9
  • v0.3-rc.8
  • v0.3-rc.7
  • v0.3-rc.6
  • v0.3-rc.5
  • v0.3-rc.4
  • v0.3-rc.3
  • v0.3-rc.2
  • v0.3-rc.1
  • v0.3-rc
  • v0.2
  • v0.1.1
  • v0.1
28 results

EV3.m

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    createLinkedHDF5.m 928 B
    function [status] = createLinkedHDF5(SourceFile,TargetPath,ID)
    %createLinkedHDF5 creates a HDF file that references the Sourcefile
    %   TargetPath is the storage location, ID the foldername
    %   Status returns true if the function was sucessfull
    
    plist_id = 'H5P_DEFAULT';
    
    %catches error of wrong file type
    if iscell(SourceFile)
        SourceFile = SourceFile{1};
    end
    
    [~,filename,ext] = fileparts(SourceFile);
    
    % try
        %old
        %fid = H5F.create(fullfile(TargetPath,ID,[ID,'_data.h5']));
        
        fid = H5F.create(fullfile(TargetPath,ID,[filename,ext]));
        %create External Link to Sourcefile in the Group linkToExternal
        H5L.create_external(['..\data\',SourceFile],'/',fid, SourceFile ,plist_id,plist_id);
        H5F.close(fid);
        disp([fullfile(TargetPath,ID,[filename,ext]),' created']);
        status = 1;
    % catch
    %     warning('No linked HDF file was created');
    %     status = 0;
    % end
    
    end