Beispiel #1
0
 def dynamicActionRequestor(self):
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x01)  # self.eventData[0x01];
Beispiel #2
0
 def estimateModifiedByUser(self):
     return (BinaryDataDecoder.readUInt32BE(self.eventData, 0x30)
             & 0x01) == 0x01
Beispiel #3
0
 def patternNumber(self):
     # See NGPUtil.NGPConstants.CARB_UNITS
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x0B)  #return this.eventData[0x0B];
Beispiel #4
0
 def iob(self):
     return BinaryDataDecoder.readUInt32BE(self.eventData, 0x23) / 10000.0
Beispiel #5
0
 def bolusWizardEstimate(self):
     return BinaryDataDecoder.readUInt32BE(self.eventData, 0x2B) / 10000.0
Beispiel #6
0
 def carbRatio(self):
     carbRatio = BinaryDataDecoder.readUInt32BE(self.eventData, 0x13)
     return carbRatio / 10.0 if (
         self.carbUnits
         == NGPConstants.CARB_UNITS.GRAMS) else carbRatio / 1000.0
Beispiel #7
0
 def highBgTarget(self):
     bgTarget = BinaryDataDecoder.readUInt16BE(self.eventData, 0x19)
     return bgTarget if self.bgUnits == NGPConstants.BG_UNITS.MG_DL else bgTarget / 10.0
Beispiel #8
0
 def programmedAmount(self):
     return BinaryDataDecoder.readUInt32BE(
         self.eventData, 0x0E
     ) / 10000.0  #return this.eventData.readUInt32BE(0x12) / 10000.0;
Beispiel #9
0
 def activeInsulin(self):
     return BinaryDataDecoder.readUInt32BE(
         self.eventData, 0x16
     ) / 10000.0  #return this.eventData.readUInt32BE(0x16) / 10000.0;
Beispiel #10
0
 def presetBolusNumber(self):
     # See NGPUtil.NGPConstants.BOLUS_PRESET_NAME
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x0D)  #return this.eventData[0x0D];
Beispiel #11
0
 def deliveredAmount(self):
     return BinaryDataDecoder.readUInt32BE(
         self.eventData, 0x12
     ) / 10000.0  #return this.eventData.readUInt32BE(0x12) / 10000.0;
Beispiel #12
0
 def bolusNumber(self):
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x0C)  #return this.eventData[0x0C];
Beispiel #13
0
 def bolusSource(self):
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x0B)  #return this.eventData[0x0B];
Beispiel #14
0
 def bgValue(self):
     # bgValue is always in mg/dL.
     return BinaryDataDecoder.readUInt16BE(
         self.eventData, 0x0C)  #this.eventData.readUInt16BE(0x0C);
Beispiel #15
0
 def carbInput(self):
     carbs = BinaryDataDecoder.readUInt16BE(
         self.eventData, 0x0F)  #this.eventData.readUInt16BE(0x0F)
     return carbs if self.carbUnits == NGPConstants.CARB_UNITS.GRAMS else carbs / 10.0
Beispiel #16
0
 def minutesBetweenReadings(self):
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x0B)  #return this.eventData[0x0B];
Beispiel #17
0
 def foodEstimate(self):
     return BinaryDataDecoder.readUInt32BE(self.eventData, 0x1F) / 10000.0
Beispiel #18
0
 def numberOfReadings(self):
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x0C)  #return this.eventData[0x0C];
Beispiel #19
0
 def isf(self):
     isf = BinaryDataDecoder.readUInt16BE(self.eventData, 0x11)
     return isf if self.bgUnits == NGPConstants.BG_UNITS.MG_DL else isf / 10.0
Beispiel #20
0
 def predictedSg(self):
     return BinaryDataDecoder.readUInt16BE(
         self.eventData, 0x0D)  #return this.eventData.readUInt16BE(0x0D);
Beispiel #21
0
 def correctionEstimate(self):
     return ((BinaryDataDecoder.readByte(self.eventData, 0x1B) << 8) |
             (BinaryDataDecoder.readByte(self.eventData, 0x1C) << 8) |
             (BinaryDataDecoder.readByte(self.eventData, 0x1D) << 8)
             | BinaryDataDecoder.readByte(self.eventData, 0x1E)) / 10000.0
Beispiel #22
0
 def source(self):
     # No idea what "source" means.
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x01)  # self.eventData[0x01];
Beispiel #23
0
 def iobAdjustment(self):
     return BinaryDataDecoder.readUInt32BE(self.eventData, 0x27) / 10000.0
Beispiel #24
0
 def bgUnits(self):
     # See NGPUtil.NGPConstants.BG_UNITS
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x0B)  #return this.eventData[0x0B];
Beispiel #25
0
 def finalEstimate(self):
     return BinaryDataDecoder.readUInt32BE(self.eventData, 0x31) / 10000.0
Beispiel #26
0
 def bolusStepSize(self):
     # See NGPUtil.NGPConstants.BOLUS_STEP_SIZE
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x2F)  #return this.eventData[0x2F];
Beispiel #27
0
 def rate(self):
     return BinaryDataDecoder.readUInt32BE(
         self.eventData, 0x0D
     ) / 10000.0  # return this.eventData.readUInt32BE(0x0D) / 10000.0;
Beispiel #28
0
 def bgInput(self):
     bgInput = BinaryDataDecoder.readUInt16BE(
         self.eventData, 0x0D)  #this.eventData.readUInt16BE(0x0D);
     return bgInput if self.bgUnits == NGPConstants.BG_UNITS.MG_DL else bgInput / 10.0
Beispiel #29
0
 def segmentNumber(self):
     # See NGPUtil.NGPConstants.CARB_UNITS
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x0C)  #return this.eventData[0x0C];
Beispiel #30
0
 def timestamp(self):
     return DateTimeHelper.decodeDateTime(
         BinaryDataDecoder.readUInt64BE(self.eventData, 0x03))