public class BIAApplication extends CommonApplication
Constructor and Description |
---|
BIAApplication(PacketManager packetManager) |
Modifier and Type | Method and Description |
---|---|
HSRTIAPacket |
calibrateHSResistorTIA(HSResistorTIA hsResistorTIA)
Calibrate High Speed Resistor Trans Impedance Amplifier.
|
BIADCBCommandPacket |
deleteDeviceConfigurationBlock(DCBConfigBlockIndex dcbBlockIndex)
Deletes ECG Device configuration block.
|
void |
disableCSVLogging(Stream stream)
Stop logging stream data into CSV.
|
void |
enableCSVLogging(java.io.File file,
Stream stream)
Start logging stream data into CSV.
|
BIADCFGPacket |
getDeviceConfiguration(long[] addresses)
Get device configuration.
|
int |
getPacketLostCount(Stream stream)
Returns number of packets lost during stream.
|
StreamStatusPacket |
getSensorStatus(Stream stream)
Returns packet with number of subscribers and number of sensor start request registered.
|
BIADFTWindow[] |
getSupportedDFTWindows()
List all supported DFT window for BCM.
|
HSResistorTIA[] |
getSupportedHSResistorTIAs()
List all supported High Speed Resistor Trans Impedance Amplifier for BCM.
|
Stream[] |
getSupportedStreams()
List all supported streams for PPG.
|
CommandPacket |
loadDeviceConfiguration()
Load device configuration.
|
BIADCBPacket |
readDeviceConfigurationBlock(DCBConfigBlockIndex dcbBlockIndex)
Returns entire device configuration block.
|
BIALibraryConfigPacket |
readLibraryConfiguration(long[] fields)
Reads library configuration from specified field values.
|
void |
setCallback(java.lang.Object userCallback,
Stream stream)
Sets the callback for the stream data.
|
BIADCFGPacket |
setDeviceConfiguration(long[][] addressesValues)
Set device configuration.
|
BIADFTPacket |
setDiscreteFourierTransformation(BIADFTWindow dftWindow)
Set Discrete Fourier Transformation for BCM.
|
StreamPacket[] |
startAndSubscribeStream(Stream stream)
Starts PPG sensor and also subscribe to the PPG stream.
|
StreamPacket |
startSensor()
Start PPG sensor.
|
StreamPacket[] |
stopAndUnsubscribeStream(Stream stream)
Stops PPG sensor and also Unsubscribe the PPG stream.
|
StreamPacket |
stopSensor()
Stops PPG sensor.
|
StreamPacket |
subscribeStream(Stream stream)
Subscribe to the specified PPG stream.
|
void |
subscribeStreamData(Stream stream)
Add custom callback for raw stream packets.
|
StreamPacket |
unsubscribeStream(Stream stream)
Unsubscribe the specified PPG stream.
|
void |
unsubscribeStreamData(Stream stream)
Remove custom callback for raw stream packets.
|
void |
updateSubscribeTimestamp(java.util.Calendar cal,
Stream stream,
boolean generateTS)
Update timestamp for subscribing, only to be used when changing the base
reference time for the stream.
|
CommandPacket |
writeDCBToLCFG()
Writes Device configuration block data to library configuration.
|
BIADCBCommandPacket |
writeDeviceConfigurationBlock(long[][] addressesValues,
DCBConfigBlockIndex dcbBlockIndex)
Writes the device configuration block values of specified addresses.
|
BIADCBCommandPacket |
writeDeviceConfigurationBlockFromFile(java.io.File file,
DCBConfigBlockIndex dcbBlockIndex)
Writes the device configuration block values of specified addresses from file.
|
BIALibraryConfigPacket |
writeLibraryConfiguration(long[][] fieldsValues)
Writes library configuration from List of fields and values.
|
setTimeout
public HSResistorTIA RESISTOR_200
public HSResistorTIA RESISTOR_1K
public HSResistorTIA RESISTOR_5K
public Stream STREAM_BIA
public Stream STREAM_BCM
public DCBConfigBlockIndex BIA_LCFG_BLOCK
public DCBConfigBlockIndex BIA_DCFG_BLOCK
public BIADFTWindow DFT_WINDOW_4
public BIADFTWindow DFT_WINDOW_8
public BIADFTWindow DFT_WINDOW_16
public BIADFTWindow DFT_WINDOW_32
public BIADFTWindow DFT_WINDOW_64
public BIADFTWindow DFT_WINDOW_128
public BIADFTWindow DFT_WINDOW_256
public BIADFTWindow DFT_WINDOW_512
public BIADFTWindow DFT_WINDOW_1024
public BIADFTWindow DFT_WINDOW_2048
public BIADFTWindow DFT_WINDOW_4096
public BIADFTWindow DFT_WINDOW_8192
public BIADFTWindow DFT_WINDOW_16384
public BIAApplication(PacketManager packetManager)
public Stream[] getSupportedStreams()
public void setCallback(java.lang.Object userCallback, Stream stream)
userCallback
- Callback function for specified adpd stream.stream
- Callback for specified stream.public int getPacketLostCount(Stream stream)
stream
- stream.public BIADFTWindow[] getSupportedDFTWindows()
public HSResistorTIA[] getSupportedHSResistorTIAs()
public HSRTIAPacket calibrateHSResistorTIA(HSResistorTIA hsResistorTIA)
hsResistorTIA
- High Speed Resistor Trans Impedance Amplifier to calibrate,
use get_supported_hs_resistor_tia_ids() to list all supported resistor.public BIADFTPacket setDiscreteFourierTransformation(BIADFTWindow dftWindow)
dftWindow
- DFT window for Discrete Fourier Transformation, use getSupportedDFTWindows()
to list all supported DFT window.public BIALibraryConfigPacket readLibraryConfiguration(long[] fields)
fields
- array of field values to read.+----------------------+----------------------+ | Fields Lower Limit | Fields Upper Limit | +----------------------+----------------------+ | 0x00 | 0x03 | +----------------------+----------------------+
public BIALibraryConfigPacket writeLibraryConfiguration(long[][] fieldsValues)
fieldsValues
- array of fields and values to write.+----------------------+----------------------+ | Fields Lower Limit | Fields Upper Limit | +----------------------+----------------------+ | 0x00 | 0x03 | +----------------------+----------------------+
public CommandPacket writeDCBToLCFG()
public BIADCBCommandPacket deleteDeviceConfigurationBlock(DCBConfigBlockIndex dcbBlockIndex)
public BIADCBPacket readDeviceConfigurationBlock(DCBConfigBlockIndex dcbBlockIndex)
public BIADCBCommandPacket writeDeviceConfigurationBlock(long[][] addressesValues, DCBConfigBlockIndex dcbBlockIndex)
addressesValues
- array of addresses and values to write.+----------------------+----------------------+ | Address Lower Limit | Address Upper Limit | +----------------------+----------------------+ | 0x00 | 0x02 | +----------------------+----------------------+
public BIADCBCommandPacket writeDeviceConfigurationBlockFromFile(java.io.File file, DCBConfigBlockIndex dcbBlockIndex) throws java.io.IOException
file
- dcb file.+----------------------+----------------------+ | Address Lower Limit | Address Upper Limit | +----------------------+----------------------+ | 0x00 | 0x02 | +----------------------+----------------------+
java.io.IOException
public void enableCSVLogging(java.io.File file, Stream stream)
file
- csv file.stream
- stream enum.public void disableCSVLogging(Stream stream)
stream
- stream enum.public BIADCFGPacket getDeviceConfiguration(long[] addresses)
addresses
- List of field values to read.public BIADCFGPacket setDeviceConfiguration(long[][] addressesValues)
addressesValues
- List of addresses and values to set.public CommandPacket loadDeviceConfiguration()
public StreamStatusPacket getSensorStatus(Stream stream)
public StreamPacket[] startAndSubscribeStream(Stream stream)
public StreamPacket startSensor()
public StreamPacket[] stopAndUnsubscribeStream(Stream stream)
public StreamPacket stopSensor()
public StreamPacket subscribeStream(Stream stream)
stream
- Stream to subscribe.public StreamPacket unsubscribeStream(Stream stream)
stream
- Stream to unsubscribe.public void updateSubscribeTimestamp(java.util.Calendar cal, Stream stream, boolean generateTS)
public void subscribeStreamData(Stream stream)
public void unsubscribeStreamData(Stream stream)