0001 function [timeStamp, tag, type, rnum, rstring] = urbiParse(message)
0002
0003
0004
0005
0006
0007
0008
0009 string = strread(message, '%s') ;
0010
0011
0012 [timeStamp, tag] = strread(string{1}, '[%u:%s]', 'whitespace', ']') ;
0013
0014 f = sscanf(string{2}, '%f') ;
0015 s = sscanf(string{2}, '%s') ;
0016
0017 if ~isempty(f)
0018 type = 'numeric';
0019 rnum = f;
0020 rstring = '';
0021 else
0022 if strcmp(s, 'BIN')
0023 type = 'BIN';
0024 rnum = 0 ;
0025 rstring = string ;
0026 else
0027 if strcmp(s, '***')
0028 type = 'system';
0029 rnum = 0 ;
0030 rstring = string ;
0031 else
0032 type = 'string';
0033 rnum = 0 ;
0034 rstring = s ;
0035 end
0036 end
0037 end ;
0038