Java Code Examples for com.eveningoutpost.dexdrip.ImportedLibraries.dexcom.Constants#EGV_VALUE_MASK
The following examples show how to use
com.eveningoutpost.dexdrip.ImportedLibraries.dexcom.Constants#EGV_VALUE_MASK .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EGVRecord.java From xDrip with GNU General Public License v3.0 | 5 votes |
public EGVRecord(byte[] packet) { // system_time (UInt), display_time (UInt), glucose (UShort), trend_arrow (Byte), crc (UShort)) super(packet); bGValue = ByteBuffer.wrap(packet).order(ByteOrder.LITTLE_ENDIAN).getShort(8) & Constants.EGV_VALUE_MASK; byte trendAndNoise = ByteBuffer.wrap(packet).order(ByteOrder.LITTLE_ENDIAN).get(10); int trendValue = trendAndNoise & Constants.EGV_TREND_ARROW_MASK; byte noiseValue = (byte) ((trendAndNoise & Constants.EGV_NOISE_MASK) >> 4); trend = Constants.TREND_ARROW_VALUES.values()[trendValue]; noise = noiseValue; }
Example 2
Source File: EGVRecord.java From xDrip-plus with GNU General Public License v3.0 | 5 votes |
public EGVRecord(byte[] packet) { // system_time (UInt), display_time (UInt), glucose (UShort), trend_arrow (Byte), crc (UShort)) super(packet); bGValue = ByteBuffer.wrap(packet).order(ByteOrder.LITTLE_ENDIAN).getShort(8) & Constants.EGV_VALUE_MASK; byte trendAndNoise = ByteBuffer.wrap(packet).order(ByteOrder.LITTLE_ENDIAN).get(10); int trendValue = trendAndNoise & Constants.EGV_TREND_ARROW_MASK; byte noiseValue = (byte) ((trendAndNoise & Constants.EGV_NOISE_MASK) >> 4); trend = Constants.TREND_ARROW_VALUES.values()[trendValue]; noise = noiseValue; }
Example 3
Source File: EGVRecord.java From xDrip-Experimental with GNU General Public License v3.0 | 5 votes |
public EGVRecord(byte[] packet) { // system_time (UInt), display_time (UInt), glucose (UShort), trend_arrow (Byte), crc (UShort)) super(packet); bGValue = ByteBuffer.wrap(packet).order(ByteOrder.LITTLE_ENDIAN).getShort(8) & Constants.EGV_VALUE_MASK; byte trendAndNoise = ByteBuffer.wrap(packet).order(ByteOrder.LITTLE_ENDIAN).get(10); int trendValue = trendAndNoise & Constants.EGV_TREND_ARROW_MASK; byte noiseValue = (byte) ((trendAndNoise & Constants.EGV_NOISE_MASK) >> 4); trend = Constants.TREND_ARROW_VALUES.values()[trendValue]; noise = noiseValue; }
Example 4
Source File: EGVRecord.java From xDrip with GNU General Public License v3.0 | 5 votes |
public EGVRecord(byte[] packet) { // system_time (UInt), display_time (UInt), glucose (UShort), trend_arrow (Byte), crc (UShort)) super(packet); bGValue = ByteBuffer.wrap(packet).order(ByteOrder.LITTLE_ENDIAN).getShort(8) & Constants.EGV_VALUE_MASK; byte trendAndNoise = ByteBuffer.wrap(packet).order(ByteOrder.LITTLE_ENDIAN).get(10); int trendValue = trendAndNoise & Constants.EGV_TREND_ARROW_MASK; byte noiseValue = (byte) ((trendAndNoise & Constants.EGV_NOISE_MASK) >> 4); trend = Constants.TREND_ARROW_VALUES.values()[trendValue]; noise = noiseValue; }