public class PhysilogManager
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
activateRecording(android.bluetooth.BluetoothDevice device) |
void |
addNewPhysilog(android.bluetooth.BluetoothDevice device)
Create a new Physilog, add it to the list
|
boolean |
areAllPhysilogsFirstSynced() |
boolean |
areAllPhysilogsLastSynced() |
boolean |
checkAndRequestPermissions(android.app.Activity activity) |
void |
clearPhysilogList() |
void |
connectToPhysilog(android.bluetooth.BluetoothDevice device) |
void |
deactivateRecording(android.bluetooth.BluetoothDevice device) |
void |
disconnectFromPhysilog(android.bluetooth.BluetoothDevice device) |
protected com.gaitup.lib.physilog.BluetoothLEService |
getBLEService()
Returns the instance of BluetoothLEService used by physilogManager
|
android.bluetooth.BluetoothAdapter |
getBluetoothAdapter()
Returns the instance of BluetoothAdapter used by physilogManager
|
android.bluetooth.BluetoothGatt |
getBluetoothGatt(android.bluetooth.BluetoothDevice device) |
java.util.ArrayList<Physilog> |
getConnectedPhysilogs() |
static android.content.Context |
getContext()
Return the context used by the physilogManager
|
java.lang.String |
getFilesDirectory()
Return the folder where measurements recorded on file will be stored
|
static PhysilogManager |
getInstance(android.content.Context c) |
int |
getNumberConnectedPhysilog() |
Physilog |
getPhysilog(android.bluetooth.BluetoothDevice device) |
ConnectionState |
getPhysilogConnectionState(android.bluetooth.BluetoothDevice device) |
java.util.List<Physilog> |
getPhysilogs() |
void |
initActivity() |
void |
isAll(android.bluetooth.BluetoothDevice device,
byte[] config) |
boolean |
isNewPhysilog(android.bluetooth.BluetoothDevice device)
Check if the physilog is already in the list
|
boolean |
isRecording(android.bluetooth.BluetoothDevice device) |
void |
loadPhysilogsConfig() |
int |
nbrPhysilogConnected() |
void |
newPhysilogConnected(android.bluetooth.BluetoothDevice device)
Call when a new connection has been successful.
|
void |
physilogConfigRead(android.bluetooth.BluetoothDevice device,
byte[] config) |
void |
physilogDisconnected(android.bluetooth.BluetoothDevice device)
Call when a BLE connection has been lost with a Physilog.
|
void |
physilogSensorSettingsRead(android.bluetooth.BluetoothDevice device,
byte[] config) |
void |
physilogStateRead(android.bluetooth.BluetoothDevice device,
byte state) |
void |
physilogTimerConfigured(android.bluetooth.BluetoothDevice device) |
void |
prepareForRecording() |
void |
readBatteryConnectedPhysilogs() |
void |
readStateConnectedPhysilogs() |
void |
setBluetoothGatt(android.bluetooth.BluetoothDevice device,
android.bluetooth.BluetoothGatt bluetoothGatt) |
void |
setFilesDirectory(java.lang.String path)
Set the path of the folder where measurements recored on file will be stored
|
void |
setPhysilogConnectionState(android.bluetooth.BluetoothDevice device,
ConnectionState ConnectionState)
Set the Connection state of a particular physilog
|
void |
startAllFiles() |
void |
stopAllConfigs() |
void |
stopAllFiles() |
void |
stopAllStreams() |
public static PhysilogManager getInstance(android.content.Context c)
public void initActivity()
public void readStateConnectedPhysilogs()
public void readBatteryConnectedPhysilogs()
public void prepareForRecording()
public void stopAllStreams()
public void startAllFiles()
public void stopAllFiles()
public void stopAllConfigs()
public void newPhysilogConnected(android.bluetooth.BluetoothDevice device)
device
- The newly physilog connectedpublic void addNewPhysilog(android.bluetooth.BluetoothDevice device)
device
- a connected bluetoothDevicepublic boolean isNewPhysilog(android.bluetooth.BluetoothDevice device)
public void clearPhysilogList()
public int nbrPhysilogConnected()
public java.util.List<Physilog> getPhysilogs()
public Physilog getPhysilog(android.bluetooth.BluetoothDevice device)
public void connectToPhysilog(android.bluetooth.BluetoothDevice device)
public java.util.ArrayList<Physilog> getConnectedPhysilogs()
public ConnectionState getPhysilogConnectionState(android.bluetooth.BluetoothDevice device)
public boolean areAllPhysilogsFirstSynced()
public boolean areAllPhysilogsLastSynced()
public void setPhysilogConnectionState(android.bluetooth.BluetoothDevice device, ConnectionState ConnectionState)
public void setBluetoothGatt(android.bluetooth.BluetoothDevice device, android.bluetooth.BluetoothGatt bluetoothGatt)
public android.bluetooth.BluetoothGatt getBluetoothGatt(android.bluetooth.BluetoothDevice device)
public void physilogDisconnected(android.bluetooth.BluetoothDevice device)
device
- The physilog BLE device disconnectedpublic void disconnectFromPhysilog(android.bluetooth.BluetoothDevice device)
public void loadPhysilogsConfig()
public void physilogStateRead(android.bluetooth.BluetoothDevice device, byte state)
public void physilogTimerConfigured(android.bluetooth.BluetoothDevice device)
public void isAll(android.bluetooth.BluetoothDevice device, byte[] config)
public void physilogConfigRead(android.bluetooth.BluetoothDevice device, byte[] config)
public void physilogSensorSettingsRead(android.bluetooth.BluetoothDevice device, byte[] config)
public void activateRecording(android.bluetooth.BluetoothDevice device)
public void deactivateRecording(android.bluetooth.BluetoothDevice device)
public boolean isRecording(android.bluetooth.BluetoothDevice device)
public int getNumberConnectedPhysilog()
public boolean checkAndRequestPermissions(android.app.Activity activity)
public android.bluetooth.BluetoothAdapter getBluetoothAdapter()
protected com.gaitup.lib.physilog.BluetoothLEService getBLEService()
public java.lang.String getFilesDirectory()
public void setFilesDirectory(java.lang.String path)
public static android.content.Context getContext()