def dynamicActionRequestor(self): return BinaryDataDecoder.readByte(self.eventData, 0x01) # self.eventData[0x01];
def estimateModifiedByUser(self): return (BinaryDataDecoder.readUInt32BE(self.eventData, 0x30) & 0x01) == 0x01
def patternNumber(self): # See NGPUtil.NGPConstants.CARB_UNITS return BinaryDataDecoder.readByte(self.eventData, 0x0B) #return this.eventData[0x0B];
def iob(self): return BinaryDataDecoder.readUInt32BE(self.eventData, 0x23) / 10000.0
def bolusWizardEstimate(self): return BinaryDataDecoder.readUInt32BE(self.eventData, 0x2B) / 10000.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
def highBgTarget(self): bgTarget = BinaryDataDecoder.readUInt16BE(self.eventData, 0x19) return bgTarget if self.bgUnits == NGPConstants.BG_UNITS.MG_DL else bgTarget / 10.0
def programmedAmount(self): return BinaryDataDecoder.readUInt32BE( self.eventData, 0x0E ) / 10000.0 #return this.eventData.readUInt32BE(0x12) / 10000.0;
def activeInsulin(self): return BinaryDataDecoder.readUInt32BE( self.eventData, 0x16 ) / 10000.0 #return this.eventData.readUInt32BE(0x16) / 10000.0;
def presetBolusNumber(self): # See NGPUtil.NGPConstants.BOLUS_PRESET_NAME return BinaryDataDecoder.readByte(self.eventData, 0x0D) #return this.eventData[0x0D];
def deliveredAmount(self): return BinaryDataDecoder.readUInt32BE( self.eventData, 0x12 ) / 10000.0 #return this.eventData.readUInt32BE(0x12) / 10000.0;
def bolusNumber(self): return BinaryDataDecoder.readByte(self.eventData, 0x0C) #return this.eventData[0x0C];
def bolusSource(self): return BinaryDataDecoder.readByte(self.eventData, 0x0B) #return this.eventData[0x0B];
def bgValue(self): # bgValue is always in mg/dL. return BinaryDataDecoder.readUInt16BE( self.eventData, 0x0C) #this.eventData.readUInt16BE(0x0C);
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
def minutesBetweenReadings(self): return BinaryDataDecoder.readByte(self.eventData, 0x0B) #return this.eventData[0x0B];
def foodEstimate(self): return BinaryDataDecoder.readUInt32BE(self.eventData, 0x1F) / 10000.0
def numberOfReadings(self): return BinaryDataDecoder.readByte(self.eventData, 0x0C) #return this.eventData[0x0C];
def isf(self): isf = BinaryDataDecoder.readUInt16BE(self.eventData, 0x11) return isf if self.bgUnits == NGPConstants.BG_UNITS.MG_DL else isf / 10.0
def predictedSg(self): return BinaryDataDecoder.readUInt16BE( self.eventData, 0x0D) #return this.eventData.readUInt16BE(0x0D);
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
def source(self): # No idea what "source" means. return BinaryDataDecoder.readByte(self.eventData, 0x01) # self.eventData[0x01];
def iobAdjustment(self): return BinaryDataDecoder.readUInt32BE(self.eventData, 0x27) / 10000.0
def bgUnits(self): # See NGPUtil.NGPConstants.BG_UNITS return BinaryDataDecoder.readByte(self.eventData, 0x0B) #return this.eventData[0x0B];
def finalEstimate(self): return BinaryDataDecoder.readUInt32BE(self.eventData, 0x31) / 10000.0
def bolusStepSize(self): # See NGPUtil.NGPConstants.BOLUS_STEP_SIZE return BinaryDataDecoder.readByte(self.eventData, 0x2F) #return this.eventData[0x2F];
def rate(self): return BinaryDataDecoder.readUInt32BE( self.eventData, 0x0D ) / 10000.0 # return this.eventData.readUInt32BE(0x0D) / 10000.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
def segmentNumber(self): # See NGPUtil.NGPConstants.CARB_UNITS return BinaryDataDecoder.readByte(self.eventData, 0x0C) #return this.eventData[0x0C];
def timestamp(self): return DateTimeHelper.decodeDateTime( BinaryDataDecoder.readUInt64BE(self.eventData, 0x03))