         }
     }
 
+    private func notify() {
+        if !waitingForSentryPackets {
+            NSNotificationCenter.defaultCenter().postNotificationName(self.dynamicType.LoopDataUpdatedNotification, object: self)
+        }
+    }
+
+    /**
+     Retrieves the current state of the loop, calculating
+     
+     This operation is performed asynchronously and the completion will be executed on an arbitrary background queue.
+
+     - parameter resultsHandler: A closure called once the values have been retrieved. The closure takes the following arguments:
+        - predictedGlucose:     The calculated timeline of predicted glucose values
+        - recommendedTempBasal: The recommended temp basal based on predicted glucose
+        - lastTempBasal:        The last set temp basal
+        - lastLoopCompleted:    The last date at which a loop completed, from prediction to dose (if dosing is enabled)
+        - error:                An error object explaining why the retrieval failed
+     */
     func getLoopStatus(resultsHandler: (predictedGlucose: [GlucoseValue]?, recommendedTempBasal: TempBasalRecommendation?, lastTempBasal: DoseEntry?, lastLoopCompleted: NSDate?, error: ErrorType?) -> Void) {
         dispatch_async(dataAccessQueue) {
             var error: ErrorType?

            lastLoopError = error
        }

        NSNotificationCenter.defaultCenter().postNotificationName(self.dynamicType.LoopDataUpdatedNotification, object: self)
    }

    // References to registered notification center observers

                        self.lastLoopCompleted = NSDate()
                    }

                    self.notify()
                }

                // Delay the notification until we know the result of the temp basal
