Exemplo n.º 1
0
 def dynamicActionRequestor(self):
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x01)  # self.eventData[0x01];
Exemplo n.º 2
0
 def estimateModifiedByUser(self):
     return (BinaryDataDecoder.readUInt32BE(self.eventData, 0x30)
             & 0x01) == 0x01
Exemplo n.º 3
0
 def patternNumber(self):
     # See NGPUtil.NGPConstants.CARB_UNITS
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x0B)  #return this.eventData[0x0B];
Exemplo n.º 4
0
 def iob(self):
     return BinaryDataDecoder.readUInt32BE(self.eventData, 0x23) / 10000.0
Exemplo n.º 5
0
 def bolusWizardEstimate(self):
     return BinaryDataDecoder.readUInt32BE(self.eventData, 0x2B) / 10000.0
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 8
0
 def programmedAmount(self):
     return BinaryDataDecoder.readUInt32BE(
         self.eventData, 0x0E
     ) / 10000.0  #return this.eventData.readUInt32BE(0x12) / 10000.0;
Exemplo n.º 9
0
 def activeInsulin(self):
     return BinaryDataDecoder.readUInt32BE(
         self.eventData, 0x16
     ) / 10000.0  #return this.eventData.readUInt32BE(0x16) / 10000.0;
Exemplo n.º 10
0
 def presetBolusNumber(self):
     # See NGPUtil.NGPConstants.BOLUS_PRESET_NAME
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x0D)  #return this.eventData[0x0D];
Exemplo n.º 11
0
 def deliveredAmount(self):
     return BinaryDataDecoder.readUInt32BE(
         self.eventData, 0x12
     ) / 10000.0  #return this.eventData.readUInt32BE(0x12) / 10000.0;
Exemplo n.º 12
0
 def bolusNumber(self):
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x0C)  #return this.eventData[0x0C];
Exemplo n.º 13
0
 def bolusSource(self):
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x0B)  #return this.eventData[0x0B];
Exemplo n.º 14
0
 def bgValue(self):
     # bgValue is always in mg/dL.
     return BinaryDataDecoder.readUInt16BE(
         self.eventData, 0x0C)  #this.eventData.readUInt16BE(0x0C);
Exemplo n.º 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
Exemplo n.º 16
0
 def minutesBetweenReadings(self):
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x0B)  #return this.eventData[0x0B];
Exemplo n.º 17
0
 def foodEstimate(self):
     return BinaryDataDecoder.readUInt32BE(self.eventData, 0x1F) / 10000.0
Exemplo n.º 18
0
 def numberOfReadings(self):
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x0C)  #return this.eventData[0x0C];
Exemplo n.º 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
Exemplo n.º 20
0
 def predictedSg(self):
     return BinaryDataDecoder.readUInt16BE(
         self.eventData, 0x0D)  #return this.eventData.readUInt16BE(0x0D);
Exemplo n.º 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
Exemplo n.º 22
0
 def source(self):
     # No idea what "source" means.
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x01)  # self.eventData[0x01];
Exemplo n.º 23
0
 def iobAdjustment(self):
     return BinaryDataDecoder.readUInt32BE(self.eventData, 0x27) / 10000.0
Exemplo n.º 24
0
 def bgUnits(self):
     # See NGPUtil.NGPConstants.BG_UNITS
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x0B)  #return this.eventData[0x0B];
Exemplo n.º 25
0
 def finalEstimate(self):
     return BinaryDataDecoder.readUInt32BE(self.eventData, 0x31) / 10000.0
Exemplo n.º 26
0
 def bolusStepSize(self):
     # See NGPUtil.NGPConstants.BOLUS_STEP_SIZE
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x2F)  #return this.eventData[0x2F];
Exemplo n.º 27
0
 def rate(self):
     return BinaryDataDecoder.readUInt32BE(
         self.eventData, 0x0D
     ) / 10000.0  # return this.eventData.readUInt32BE(0x0D) / 10000.0;
Exemplo n.º 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
Exemplo n.º 29
0
 def segmentNumber(self):
     # See NGPUtil.NGPConstants.CARB_UNITS
     return BinaryDataDecoder.readByte(self.eventData,
                                       0x0C)  #return this.eventData[0x0C];
Exemplo n.º 30
0
 def timestamp(self):
     return DateTimeHelper.decodeDateTime(
         BinaryDataDecoder.readUInt64BE(self.eventData, 0x03))