Home > vbmeg > functions > device > eeg > vb_eeginfo_get_version.m

vb_eeginfo_get_version

PURPOSE ^

return version data from EEGinfo

SYNOPSIS ^

function [version] = vb_eeginfo_get_version(eeginfo)

DESCRIPTION ^

 return version data from EEGinfo
 [usage]
   [version] = vb_eeginfo_get_version(eeginfo)
 [input]
   eeginfo : <required> <<struct>> EEGinfo
 [output]
   version : version data
 [note]
   device dependent data
 [history]
   2011-05-27 (Sako) initial version

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function [version] = vb_eeginfo_get_version(eeginfo)
0002 % return version data from EEGinfo
0003 % [usage]
0004 %   [version] = vb_eeginfo_get_version(eeginfo)
0005 % [input]
0006 %   eeginfo : <required> <<struct>> EEGinfo
0007 % [output]
0008 %   version : version data
0009 % [note]
0010 %   device dependent data
0011 % [history]
0012 %   2011-05-27 (Sako) initial version
0013 %
0014 % Copyright (C) 2011, ATR All Rights Reserved.
0015 % License : New BSD License(see VBMEG_LICENSE.txt)
0016 
0017 % --- CHECK ARGUMENTS --- %
0018 if ~exist('eeginfo', 'var'), eeginfo = []; end
0019 [eeginfo] = inner_check_arguments(eeginfo);
0020 
0021 % --- MAIN PROCEDURE --------------------------------------------------------- %
0022 %
0023 version = [];
0024 
0025 if isfield(eeginfo, 'device_info')
0026   if isfield(eeginfo.device_info, 'Version')
0027     version = eeginfo.device_info.Version;
0028   else
0029 %     warning('device_info does not have ''Version'' field\n');
0030   end
0031 else
0032   if isfield(eeginfo, 'Version')
0033     version = eeginfo.Version;
0034   else
0035 %     warning('eeginfo does not have ''Version'' field\n');
0036   end
0037 end
0038 return;
0039 %
0040 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0041 
0042 % --- INNER FUNCTIONS -------------------------------------------------------- %
0043 %
0044 % --- inner_check_arguments()
0045 %
0046 function [eeginfo] = inner_check_arguments(eeginfo)
0047 func_ = mfilename;
0048 
0049 if isempty(eeginfo)
0050   error('(%s)eeginfo is a required parameter', func_);
0051 end
0052 return;
0053 %
0054 % --- end of inner_check_arguments()
0055 %
0056 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0057 
0058 %--- END OF FILE ---%

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005