public class ADP5360Application extends CommonApplication
Modifier and Type | Field and Description |
---|---|
Stream |
STREAM_BATTERY |
Constructor and Description |
---|
ADP5360Application(PacketManager packetManager) |
Modifier and Type | Method and Description |
---|---|
ADP5360DCBCommandPacket |
deleteDeviceConfigurationBlock()
Deletes ADP5360Command 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.
|
BatteryInfoPacket |
getBatteryInfo()
Returns device current battery information.
|
BatteryThresholdPacket |
getBatteryThreshold()
getBatteryThreshold
|
ADP5360DCBPacket |
readDeviceConfigurationBlock()
Returns entire device configuration block.
|
ADP5360RegisterReadPacket |
readRegister(int[] addresses)
Reads the register values of specified addresses.
|
CommandPacket |
setBatteryThreshold(short lowLevel,
short criticalLevel,
short downloadLevel,
int voltageLow,
int voltageCritical,
int voltageCriticalDownload)
setBatteryThreshold
|
void |
setCallback(BatteryInfoCallback userCallback)
Sets the callback for the stream data.
|
StreamPacket |
subscribeStream(Stream stream)
Subscribe to the specified ADPD stream.
|
void |
subscribeStreamData(Stream stream)
Add custom callback for raw stream packets.
|
StreamPacket |
unsubscribeStream(Stream stream)
Unsubscribe the specified ADPD 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.
|
ADP5360DCBCommandPacket |
writeDeviceConfigurationBlock(long[][] addressesValues)
Writes the device configuration block values of specified addresses.
|
ADP5360DCBCommandPacket |
writeDeviceConfigurationBlockFromFile(java.io.File file)
Writes the device configuration block values of specified addresses from file.
|
ADP5360RegisterWritePacket |
writeRegister(int[][] addressesValues)
Writes the register values of specified addresses.
|
setTimeout
public Stream STREAM_BATTERY
public ADP5360Application(PacketManager packetManager)
public CommandPacket setBatteryThreshold(short lowLevel, short criticalLevel, short downloadLevel, int voltageLow, int voltageCritical, int voltageCriticalDownload)
public BatteryThresholdPacket getBatteryThreshold()
public BatteryInfoPacket getBatteryInfo()
public ADP5360RegisterReadPacket readRegister(int[] addresses)
addresses
- array of register addresses to read.+----------------------+----------------------+ | Address Lower Limit | Address Upper Limit | +----------------------+----------------------+ | 0x00 | 0x36 | +----------------------+----------------------+
public ADP5360RegisterWritePacket writeRegister(int[][] addressesValues)
addressesValues
- array of register addresses and values to write.+---------------------------------------------------------------------------+ | Address Ranges | +---------------------------------------------------------------------------+ | [0x2-0x7], [0xA-0xE], [0x11-0x22], [0x27-0x2E], [0x30-0x33], [0x36] | +---------------------------------------------------------------------------+
public ADP5360DCBCommandPacket deleteDeviceConfigurationBlock()
public ADP5360DCBPacket readDeviceConfigurationBlock()
public ADP5360DCBCommandPacket writeDeviceConfigurationBlock(long[][] addressesValues)
addressesValues
- array of addresses and values to write.public ADP5360DCBCommandPacket writeDeviceConfigurationBlockFromFile(java.io.File file) throws java.io.IOException
file
- dcb file.java.io.IOException
public StreamPacket subscribeStream(Stream stream)
stream
- Stream to subscribe.public void updateSubscribeTimestamp(java.util.Calendar cal, Stream stream, boolean generateTS)
public StreamPacket unsubscribeStream(Stream stream)
stream
- Stream to unsubscribe.public void subscribeStreamData(Stream stream)
public void unsubscribeStreamData(Stream stream)
public void setCallback(BatteryInfoCallback userCallback)
userCallback
- Callback function for specified adxl stream.public void enableCSVLogging(java.io.File file, Stream stream)
file
- csv file.stream
- stream enum.public void disableCSVLogging(Stream stream)
stream
- stream enum.