code: function performRetry(devRes, scriptRes) {
      		var currentAttempt = context.currentAttempt;
  			var maxAttempts = context.maxAttempts;
  			var delay = context.delay;
  			debug('in performRetry', currentAttempt, maxAttempts, delay);
      		if(currentAttempt < maxAttempts) {
      			context.currentAttempt += 1;
      			setTimeout(checkDeviceValue, delay);
      		} else {
      			if(context.rejectOnError) {
      				reportResult(devRes, scriptRes, 'reject');
      			} else {
      				reportResult(devRes, scriptRes, 'resolve');
      			}
      		}
      	}
docs: This function performs the re-try logic.  It re-attempts a read or reports the results.