Skip to content
Snippets Groups Projects
Commit f1c29832 authored by Lennart Goedhart's avatar Lennart Goedhart
Browse files

First commit of MedtronicUploader to support 640g.

parents
No related branches found
No related tags found
No related merge requests found
Showing
with 77 additions and 0 deletions
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
package com.nightscout.android.medtronic;
import java.util.Date;
public class DataLog {
int numEntries;
Date[] dateField = new Date [4096];
char[] entryType = new char [4096];
int[] glucose = new int [4096];
int[] calFactor = new int [4096];
}
package com.nightscout.android.medtronic;
import com.nightscout.android.medtronic.message.MessageUtils;
/**
* Created by lgoedhart on 26/03/2016.
*/
public class MedtronicCNLSession {
private final static byte[] HMAC = MessageUtils.hexStringToByteArray("e28fe4e5cf3c1eb6d6a2ec5a093093d4f397237dc60b3f2c1ef64f31e32077c4");
private final static byte[] KEY = MessageUtils.hexStringToByteArray("57833334130906a587b7a0437bc28a69");
private final static long linkMAC = 1055866 + 0x0023F70682000000L;
private final static long pumpMAC = 1057941 + 0x0023F745EE000000L;
private byte radioChannel;
private int bayerSequenceNumber = 1;
private int medtronicSequenceNumber = 1;
public byte[] getHMAC() {
return HMAC;
}
public static byte[] getKEY() {
return KEY;
}
public byte[] getIV() {
byte[] iv = HMAC;
iv[0] = (byte) radioChannel;
return iv;
}
public static long getLinkMAC() {
return linkMAC;
}
public static long getPumpMAC() {
return pumpMAC;
}
public int getBayerSequenceNumber() {
return bayerSequenceNumber;
}
public int getMedtronicSequenceNumber() {
return medtronicSequenceNumber;
}
public byte getRadioChannel() {
return radioChannel;
}
}
package com.nightscout.android.medtronic;
public class MedtronicCalibration {
}
This diff is collapsed.
package com.nightscout.android.medtronic.message;
/**
* Created by lgoedhart on 26/03/2016.
*/
public class ChecksumException extends Throwable {
public ChecksumException(String message) {
super(message);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment