public class PacketManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
boolean |
debug |
Constructor and Description |
---|
PacketManager(BluetoothDevice device,
StudyWatchCallback watchCallback,
Context context,
int mtu,
boolean debug) |
Modifier and Type | Method and Description |
---|---|
void |
disconnect() |
void |
processFile(java.io.File file,
ProgressCallback progressCallback) |
void |
sendPacket(Packet packet) |
void |
sendPacketToCallback(byte[] packet) |
void |
subscribe(int packetId,
PacketCallback callback) |
void |
unsubscribe(int packetId,
PacketCallback callback) |
public PacketManager(BluetoothDevice device, StudyWatchCallback watchCallback, Context context, int mtu, boolean debug)
public void processFile(java.io.File file, ProgressCallback progressCallback) throws java.io.IOException
java.io.IOException
public void sendPacket(Packet packet)
public void subscribe(int packetId, PacketCallback callback)
public void unsubscribe(int packetId, PacketCallback callback)
public void disconnect()
public void sendPacketToCallback(byte[] packet)