Changeset 81 for branches

Show
Ignore:
Timestamp:
12/07/07 19:27:20 (13 months ago)
Author:
follower
Message:

Add some comments to 'readMatch'.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/follower/wiz810mj/src/demo/WizDemo3/WizDemo3.pde

    r80 r81  
    202202 
    203203int readMatch(char *stringToMatch) { 
     204  /* 
     205 
     206    Routine to read and match bytes received. 
     207     
     208    (Essentially strcmp replacement without requiring a large receive buffer.) 
     209     
     210    NOTE: Failed matches drop all bytes read so far. (i.e. you can't check for 
     211          a bunch of possible matches from the same starting position). 
     212          TODO: Fix this. 
     213           
     214    Note: This blocks if there isn't enough data in the rx buffer. 
     215     
     216  */ 
    204217       
    205218  while (getSn_RX_RSR(testSocket) < strlen(stringToMatch)) { 
     
    208221  } 
    209222 
     223  // TODO: Do fancy string-matching techniques to avoid reading the whole string 
     224  //       on non-matches. :-) 
    210225  for (int currCharIdx = 0; currCharIdx < strlen(stringToMatch); currCharIdx++) { 
    211226    if (readByte() != stringToMatch[currCharIdx]) {