UHNCGMControllerDelegate Protocol Reference

Conforms to NSObject
Declared in UHNCGMController.h

Overview

The UHNCGMControllerDelegate protocol defines the methods that a delegate of a UHNCGMController object must adopt. The optional methods of the protocol allow the delegate to monitor, request, or command the CGM sensor. The required methods of the protocol indicates discovery, connectivity, and reporting current glucose measurements with the CGM sensor.

– cgmController:didDiscoverCGMWithName:services:RSSI: required method

Notifies the delegate when a CGM sensor has been discovered

- (void)cgmController:(UHNCGMController *)controller didDiscoverCGMWithName:(NSString *)cgmDeviceName services:(NSArray *)serviceUUIDs RSSI:(NSNumber *)RSSI

Parameters

controller

The UHNCGMController which with the CGM sensor was discovered

cgmDeviceName

The device name of the CGM sensor

serviceUUIDs

An array of NSString representing the UUID of the services available for the CGM sensor. This array includes all the provided required services and potentially additional services.

RSSI

The rssi power of the CGM Sensor

Discussion

This method is invoked when a CGM sensor with the required services is discovered. If required services were provided during instantiation, the only CGM sensors with all of those services will be notified to the delegate. If no required services were provided, all discovered CGM sensor offering the mandatory services will be notified to the delegate.

Declared In

UHNCGMController.h

– cgmController:didConnectToCGMWithName: required method

Notifies the delegate when a CGM sensor did connect

- (void)cgmController:(UHNCGMController *)controller didConnectToCGMWithName:(NSString *)cgmDeviceName

Parameters

controller

The UHNCGMController that is managing the CGM sensor

cgmDeviceName

The device name of the CGM sensor

Discussion

This method is invoked when a CGM sensor is connected

Declared In

UHNCGMController.h

– cgmController:didDisconnectFromCGM: required method

Notifies the delegate when a CGM sensor was disconnected

- (void)cgmController:(UHNCGMController *)controller didDisconnectFromCGM:(NSString *)cgmDeviceName

Parameters

controller

The UHNCGMController that was managing the CGM sensor

cgmDeviceName

The device name of the peripheral

Discussion

This method is invoked when a CGM sensor is disconnected

Declared In

UHNCGMController.h

– cgmController:measurementDetails: required method

Notifies the delegate when a CGM sensor has a measurement to report

- (void)cgmController:(UHNCGMController *)controller measurementDetails:(NSDictionary *)measurementDetails

Parameters

controller

The UHNCGMController that was managing the CGM sensor

measurementDetails

A NSDictionary including all the measurement details

Discussion

This method is invoked when a CGM sensor has a measurement to report. This measurement may be the most current measurement or a stored measurement as requested by a RACP get stored records procedure. The time information in the measurement details may help determine the age of the measurement.

Convenience methods for querying the contents of the measurement details dictionary are available with NSDictionary+CGMExtensions.h

Declared In

UHNCGMController.h

– cgmController:didReadSessionStartTime: required method

Notifies the delegate when the CGM sensor session start time characteristic has been read

- (void)cgmController:(UHNCGMController *)controller didReadSessionStartTime:(NSDate *)sessionStartTime

Parameters

controller

The UHNCGMController which with the characteristic was read

sessionStartTime

A NSDate representing the session start time

Discussion

This method is invoked when the CGM Session Start Time Characteristic has been read successfully

Declared In

UHNCGMController.h

– cgmController:notificationMeasurement:

Notifies the delegate when the CGM Measurement characteristic notification has been enabled or disabled

- (void)cgmController:(UHNCGMController *)controller notificationMeasurement:(BOOL)enabled

Parameters

controller

The UHNCGMController which with the characteristic was read

enabled

If YES indicates that the notification was enabled. NO indicates that the notification was disabled

Discussion

This method is invoked when the CGM Measurement Characteristic notification has enabled or disabled

The CGM Measurement Characteristic needs to be enabled to received glucose measurements

Declared In

UHNCGMController.h

– cgmController:notificationRACP:

Notifies the delegate when the CGM RACP characteristic indication has been enabled or disabled

- (void)cgmController:(UHNCGMController *)controller notificationRACP:(BOOL)enabled

Parameters

controller

The UHNCGMController which with the characteristic was read

enabled

If YES indicates that the indication was enabled. NO indicates that the notifications were disabled

Discussion

This method is invoked when the CGM RACP Characteristic indication has enabled or disabled

The CGM RACP Characteristic needs to be enabled to conduct RACP procedures. Also some RACP procedures also require CGM Measurement Characteristic notification enabled

Declared In

UHNCGMController.h

– cgmController:notificationCGMCP:

Notifies the delegate when the CGMCP characteristic indication has been enabled or disabled

- (void)cgmController:(UHNCGMController *)controller notificationCGMCP:(BOOL)enabled

Parameters

controller

The UHNCGMController which with the characteristic was read

enabled

If YES indicates that the indication was enabled. NO indicates that the notifications were disabled

Discussion

This method is invoked when the CGMCP Characteristic indication has enabled or disabled

The CGMCP Characteristic needs to be enabled to conduct CGMCP procedures.

Declared In

UHNCGMController.h

– cgmController:didReadFeatures:

Notifies the delegate when the CGM sensor features characteristic has been read

- (void)cgmController:(UHNCGMController *)controller didReadFeatures:(NSDictionary *)features

Parameters

controller

The UHNCGMController which with the characteristic was read

features

A NSDictionary including all the support features of the CGM sensor

Discussion

This method is invoked when the CGM Feature Characteristic has been read successfully

Convenience methods for querying the contents of the features dictionary are available with NSDictionary+CGMExtensions.h

Declared In

UHNCGMController.h

– cgmController:didReadSessionRunTime:

Notifies the delegate when the CGM sensor session run time characteristic has been read

- (void)cgmController:(UHNCGMController *)controller didReadSessionRunTime:(NSDate *)sessionRunTime

Parameters

controller

The UHNCGMController which with the characteristic was read

sessionRunTime

A NSDate representing the session run time

Discussion

This method is invoked when the CGM Session Run Time Characteristic has been read successfully

Declared In

UHNCGMController.h

– cgmController:didReadStatus:

Notifies the delegate when the CGM sensor status characteristic has been read

- (void)cgmController:(UHNCGMController *)controller didReadStatus:(NSDictionary *)status

Parameters

controller

The UHNCGMController which with the characteristic was read

status

A NSDictionary including the status of the CGM sensor

Discussion

This method is invoked when the CGM Status Characteristic has been read successfully

Convenience methods for querying the contents of the status dictionary are available with NSDictionary+CGMExtensions.h

Declared In

UHNCGMController.h

– cgmController:CGMCPOperationSuccessful:

Notifies the delegate when a CGMCP operation has been completed successfully

- (void)cgmController:(UHNCGMController *)controller CGMCPOperationSuccessful:(CGMCPOpCode)opCode

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

opCode

The requested operation that was completed successfully. The CGMCP op codes are defined in UHNCGMConstants.h

Discussion

This method is invoked when a CGMCP operation has been completed successfully

Declared In

UHNCGMController.h

– cgmController:CGMCPOperation:failed:

Notifies the delegate when a CGMCP operation has failed

- (void)cgmController:(UHNCGMController *)controller CGMCPOperation:(CGMCPOpCode)opCode failed:(CGMCPResponseCode)responseCode

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

opCode

The requested operation that failed. The CGMCP op codes are defined in UHNCGMConstants.h

responseCode

The value of the response code to help determine the cause of the failed CGMCP operation

Discussion

This method is invoked when a CGMCP operation has failed

Declared In

UHNCGMController.h

– cgmController:CGMCPResponseOpCode:didGetValue:

Notifies the delegate when a CGMCP get operations has been completed successfully

- (void)cgmController:(UHNCGMController *)controller CGMCPResponseOpCode:(CGMCPOpCode)responseOpCode didGetValue:(NSNumber *)value

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

responseOpCode

The Response Op Code related to the operation. The CGMCP op codes are defined in UHNCGMConstants.h

value

A NSNumber representing the value of the CGMCP response

Discussion

This method is invoked when a get CGMCP operation has been completed successfully. This is used for all CGMCP get operations, except the get calibration operation

Declared In

UHNCGMController.h

– cgmControllerDidStartSession:

Notifies the delegate when the CGM sensor session has been started

- (void)cgmControllerDidStartSession:(UHNCGMController *)controller

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

Discussion

This method is invoked when the CGMCP start session operation has been completed successfully

Declared In

UHNCGMController.h

– cgmControllerDidStopSession:

Notifies the delegate when the CGM sensor session has been stopped

- (void)cgmControllerDidStopSession:(UHNCGMController *)controller

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

Discussion

This method is invoked when the CGMCP stop session operation has been completed successfully

Declared In

UHNCGMController.h

– cgmControllerDidResetDeviceSpecificAlert:

Notifies the delegate when the CGM sensor session has been stopped

- (void)cgmControllerDidResetDeviceSpecificAlert:(UHNCGMController *)controller

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

Discussion

This method is invoked when the CGMCP stop session operation has been completed successfully

Declared In

UHNCGMController.h

– cgmControllerDidSetCommunicationInterval:

Notifies the delegate when the CGM sensor communication interval has been successfully updated

- (void)cgmControllerDidSetCommunicationInterval:(UHNCGMController *)controller

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

Discussion

This method is invoked when the CGMCP set communication interval operation has been completed successfully

Declared In

UHNCGMController.h

– cgmControllerDidSetCalibration:

Notifies the delegate when the CGM sensor calibration was been set successfully

- (void)cgmControllerDidSetCalibration:(UHNCGMController *)controller

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

Discussion

This method is invoked when the CGMCP set calibration operation has been completed successfully

After a CGMCP response indicating calibration was set successfully, one should check the status of the calibration by a read of the most current calibration data record. If the calibration data was rejected or was out-of-range, there may be the need for a new calibration.

Declared In

UHNCGMController.h

– cgmControllerDidSetAlertLevelPatientHigh:

Notifies the delegate when the patient high alert level was been set successfully

- (void)cgmControllerDidSetAlertLevelPatientHigh:(UHNCGMController *)controller

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

Discussion

This method is invoked when the CGMCP set patient high alert level operation has been completed successfully

Declared In

UHNCGMController.h

– cgmControllerDidSetAlertLevelPatientLow:

Notifies the delegate when the patient low alert level was been set successfully

- (void)cgmControllerDidSetAlertLevelPatientLow:(UHNCGMController *)controller

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

Discussion

This method is invoked when the CGMCP set patient low alert level operation has been completed successfully

Declared In

UHNCGMController.h

– cgmControllerDidSetAlertLevelHypo:

Notifies the delegate when the hypo alert level was been set successfully

- (void)cgmControllerDidSetAlertLevelHypo:(UHNCGMController *)controller

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

Discussion

This method is invoked when the CGMCP set hypo alert level operation has been completed successfully

Declared In

UHNCGMController.h

– cgmControllerDidSetAlertLevelHyper:

Notifies the delegate when the hyper alert level was been set successfully

- (void)cgmControllerDidSetAlertLevelHyper:(UHNCGMController *)controller

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

Discussion

This method is invoked when the CGMCP set hyper alert level operation has been completed successfully

Declared In

UHNCGMController.h

– cgmControllerDidSetAlertLevelRateDecrease:

Notifies the delegate when the rate decrease alert level was been set successfully

- (void)cgmControllerDidSetAlertLevelRateDecrease:(UHNCGMController *)controller

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

Discussion

This method is invoked when the CGMCP set rate decrease alert level operation has been completed successfully

Declared In

UHNCGMController.h

– cgmControllerDidSetAlertLevelRateIncrease:

Notifies the delegate when the rate increase alert level was been set successfully

- (void)cgmControllerDidSetAlertLevelRateIncrease:(UHNCGMController *)controller

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

Discussion

This method is invoked when the CGMCP set rate increase alert level operation has been completed successfully

Declared In

UHNCGMController.h

– cgmController:didGetCommunicationInterval:

Notifies the delegate of the current communication interval of the CGM sensor

- (void)cgmController:(UHNCGMController *)controller didGetCommunicationInterval:(NSNumber *)commInterval

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

commInterval

The current communication interval

Discussion

This method is invoked when the CGMCP get communication interval operation has been completed successfully

Declared In

UHNCGMController.h

– cgmController:didGetCalibrationDetails:

Notifies the delegate when the get calibration data record CGMCP operation has been completed successfully

- (void)cgmController:(UHNCGMController *)controller didGetCalibrationDetails:(NSDictionary *)calibrationDetails

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

calibrationDetails

A NSDictionary including the calibration data record

Discussion

This method is invoked when the get calibration data record CGMCP operation has been read successfully

Convenience methods for querying the contents of the calibration data record dictionary are available with NSDictionary+CGMExtensions.h

Declared In

UHNCGMController.h

– cgmController:didGetPatientAlertLevelHigh:

Notifies the delegate of the current patient high alert level of the CGM sensor

- (void)cgmController:(UHNCGMController *)controller didGetPatientAlertLevelHigh:(NSNumber *)highLevel

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

highLevel

The current patient high alert level

Discussion

This method is invoked when the CGMCP get patient high alert level operation has been completed successfully

Declared In

UHNCGMController.h

– cgmController:didGetPatientAlertLevelLow:

Notifies the delegate of the current patient low alert level of the CGM sensor

- (void)cgmController:(UHNCGMController *)controller didGetPatientAlertLevelLow:(NSNumber *)lowLevel

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

lowLevel

The current patient low alert level

Discussion

This method is invoked when the CGMCP get patient low alert level operation has been completed successfully

Declared In

UHNCGMController.h

– cgmController:didGetAlertLevelHypo:

Notifies the delegate of the current hypo alert level of the CGM sensor

- (void)cgmController:(UHNCGMController *)controller didGetAlertLevelHypo:(NSNumber *)hypoLevel

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

hypoLevel

The current hypo alert level

Discussion

This method is invoked when the CGMCP get hypo alert level operation has been completed successfully

Declared In

UHNCGMController.h

– cgmController:didGetAlertLevelHyper:

Notifies the delegate of the current hyper alert level of the CGM sensor

- (void)cgmController:(UHNCGMController *)controller didGetAlertLevelHyper:(NSNumber *)hyperLevel

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

hyperLevel

The current hyper alert level

Discussion

This method is invoked when the CGMCP get hyper alert level operation has been completed successfully

Declared In

UHNCGMController.h

– cgmController:didGetAlertLevelRateDecrease:

Notifies the delegate of the current rate of decrease alert level of the CGM sensor

- (void)cgmController:(UHNCGMController *)controller didGetAlertLevelRateDecrease:(NSNumber *)decreaseLevel

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

decreaseLevel

The current rate of decrease alert level

Discussion

This method is invoked when the CGMCP get rate of decrease alert level operation has been completed successfully

Declared In

UHNCGMController.h

– cgmController:didGetAlertLevelRateIncrease:

Notifies the delegate of the current rate of increase alert level of the CGM sensor

- (void)cgmController:(UHNCGMController *)controller didGetAlertLevelRateIncrease:(NSNumber *)increaseLevel

Parameters

controller

The UHNCGMController which with the CGMCP operation was executed

increaseLevel

The current rate of increase alert level

Discussion

This method is invoked when the CGMCP get rate of increase alert level operation has been completed successfully

Declared In

UHNCGMController.h

– cgmController:RACPOperationSuccessful:

Notifies the delegate when a RACP procedure has been completed successfully

- (void)cgmController:(UHNCGMController *)controller RACPOperationSuccessful:(RACPOpCode)opCode

Parameters

controller

The UHNCGMController which with the RACP procedure was executed

opCode

The requested procedure that was completed successfully. The RACP op codes are defined in UHNRACPConstants.h in the UHNBLEController pod

Discussion

This method is invoked when a RACP procedure has been completed successfully

Declared In

UHNCGMController.h

– cgmController:RACPOperation:failed:

Notifies the delegate when a RAACP procedure has failed

- (void)cgmController:(UHNCGMController *)controller RACPOperation:(RACPOpCode)opCode failed:(RACPResponseCode)responseCode

Parameters

controller

The UHNCGMController which with the RACP procedure was executed

opCode

The requested procedure that failed. The RACP op codes are defined in UHNRACPConstants.h in the UHNBLEController pod

responseCode

The value of the response code to help determine the cause of the failed RACP procedure

Discussion

This method is invoked when a RACP procedure has failed

Declared In

UHNCGMController.h

– cgmControllerDidGetStoredRecords:

Notifies the delegate that the requested get of stored records has been completed successfully

- (void)cgmControllerDidGetStoredRecords:(UHNCGMController *)controller

Parameters

controller

The UHNCGMController which with the RACP procedure was executed

Discussion

This method is invoked when any of the RACP get stored records procedures has been completed successfully

Declared In

UHNCGMController.h

– cgmController:didGetNumberOfStoredRecords:

Notifies the delegate that the requested get number of stored records has been completed successfully

- (void)cgmController:(UHNCGMController *)controller didGetNumberOfStoredRecords:(NSNumber *)numOfRecords

Parameters

controller

The UHNCGMController which with the RACP procedure was executed

numOfRecords

The number of stored records

Discussion

This method is invoked when any of the RACP get number of stored records procedures has been completed successfully

Declared In

UHNCGMController.h