com.biocomfort.SDK
Interface SDK


public interface SDK

This interface was developed to provide an easy-to-use component for the communication with medical devices. These devices have to be bound with the system / the application in order to communicate with them or to receive measurement data from them.


Field Summary
static int DATETIME
          Ease-of-use constant for the SDK methods getDeviceConfigurations(), getDeviceConfigurationsAndWait(), setDeviceConfigurations() or setDeviceConfigurationsAndWait().
static int DEVICE_STATUS
          Ease-of-use constant for the SDK methods getDeviceConfigurations(), getDeviceConfigurationsAndWait(), setDeviceConfigurations() or setDeviceConfigurationsAndWait().
static short DEVICE_TYPE_BLOOD_GLUCOSE
          Type constant that represents a special type of a medical device.
static short DEVICE_TYPE_BLOOD_PRESSURE
          Type constant that represents a special type of a medical device.
static short DEVICE_TYPE_SCALE
          Type constant that represents a special type of a medical device.
static int FIRMWARE
          Ease-of-use constant for the SDK methods getDeviceConfigurations(), getDeviceConfigurationsAndWait(), setDeviceConfigurations() or setDeviceConfigurationsAndWait().
static int IEEE_ADDRESS
          Ease-of-use constant for the SDK methods getDeviceConfigurations(), getDeviceConfigurationsAndWait(), setDeviceConfigurations() or setDeviceConfigurationsAndWait().
static int SERIAL_NUMBER
          Ease-of-use constant for the SDK methods getDeviceConfigurations(), getDeviceConfigurationsAndWait(), setDeviceConfigurations() or setDeviceConfigurationsAndWait().
static int USER_SETTING
          Ease-of-use constant for the SDK methods getDeviceConfigurations(), getDeviceConfigurationsAndWait(), setDeviceConfigurations() or setDeviceConfigurationsAndWait().
 
Method Summary
 void addSDKDataListener(SDKDataListener listener)
          Adds the specified data listener to receive data events of the devices.
 void addSDKDevicesListener(SDKDevicesListener listener)
          Adds the specified devices listener to receive device events.
 void addSDKErrorListener(SDKErrorListener listener)
          Adds the specified error listener to receive sdk error events.
 void addSDKListener(SDKListener listener)
          Adds the specified sdk listener to receive general sdk events.
 void bindAllUnboundDevices()
          Binds all unbound devices.
 boolean bindDevice(MedicalDeviceTO medicalDevice)
          Binds a single unbound device.
 boolean bindDevices(java.util.List<MedicalDeviceTO> medicalDevices)
          Binds a list of unbound devices.
 void clearBindingActions()
          Clears the binding actions for all types of devices.
 void clearUnbindingActions()
          Clears the unbinding actions for all types of devices.
 void exit()
          Exits the sdk and waits for it.
 void exitAndWait()
          Exits the sdk.
 AutoUpdatePolicy getBoundAutoUpdatePolicy()
          Returns the current automatic update configuration for bound devices.
 boolean getDeviceConfigurations(MedicalDeviceTO medicalDevice, int configurations)
          Requests information of the specified device.
 MedicalDeviceTO getDeviceConfigurationsAndWait(MedicalDeviceTO medicalDevice, int configurations)
          Requests information of the specified device.
 boolean getDeviceData(MedicalDeviceTO medicalDevice)
          Requests the stored measurement data of the specified device.
 SDKState getState()
          Returns the current state of the sdk.
 AutoUpdatePolicy getUnboundAutoUpdatePolicy()
          Returns the current automatic update configuration for unbound devices.
 boolean getUserParameters(MedicalDeviceTO medicalDevice, TO userParameters)
          Requests user parameters of the specified device.
 TO getUserParametersAndWait(MedicalDeviceTO medicalDevice, TO userParameters)
          Requests user parameters of the specified device.
 void removeSDKDataListener(SDKDataListener listener)
          Removes the specified data listener so that it no longer receives data events.
 void removeSDKDevicesListener(SDKDevicesListener listener)
          Removes the specified devices listener so that it no longer receives device events.
 void removeSDKErrorListener(SDKErrorListener listener)
          Removes the specified error listener so that it no longer receives error events.
 void removeSDKListener(SDKListener listener)
          Removes the specified sdk listener so that it no longer receives sdk events.
 void setBindingAction(SDKAction action)
          Defines a binding action.
 void setBindingAction(SDKAction action, int deviceType)
          Defines a binding action for the specified device type.
 void setBoundAutoUpdatePolicy(AutoUpdatePolicy autoUpdatePolicy)
          Defines the automatic update policy of missing device information for bound devices.
 boolean setDeviceClearMem(MedicalDeviceTO medicalDevice)
          Clears the memory of the specified device.
 MedicalDeviceTO setDeviceClearMemAndWait(MedicalDeviceTO medicalDevice)
          Clears the memory of the specified device.
 boolean setDeviceConfigurations(MedicalDeviceTO medicalDevice, int configurations)
          Writes information to the specified device.
 MedicalDeviceTO setDeviceConfigurationsAndWait(MedicalDeviceTO medicalDevice, int configurations)
          Writes information to the specified device.
 void setUnbindingAction(SDKAction action)
          Defines an unbinding action.
 void setUnbindingAction(SDKAction action, int deviceType)
          Defines an unbinding action for the specified device type.
 void setUnboundAutoUpdatePolicy(AutoUpdatePolicy autoUpdatePolicy)
          Defines the automatic update policy of missing device information for unbound devices.
 boolean setUserParameters(MedicalDeviceTO medicalDevice, TO userParameters)
          Writes user parameters to the specified device.
 TO setUserParametersAndWait(MedicalDeviceTO medicalDevice, TO userParameters)
          Writes information to the specified device.
 void start()
          Starts the sdk.
 void startAndWait()
          Starts the sdk and waits for it.
 void unbindAllBoundDevices()
          Unbinds all bound devices.
 boolean unbindDevice(MedicalDeviceTO medicalDevice)
          Unbinds a single bound device.
 boolean unbindDevices(java.util.List<MedicalDeviceTO> medicalDevices)
          Unbinds a list of bound devices.
 

Field Detail

DATETIME

static final int DATETIME
Ease-of-use constant for the SDK methods getDeviceConfigurations(), getDeviceConfigurationsAndWait(), setDeviceConfigurations() or setDeviceConfigurationsAndWait().

See Also:
getDeviceConfigurations(MedicalDeviceTO, int), getDeviceConfigurationsAndWait(MedicalDeviceTO, int), setDeviceConfigurations(MedicalDeviceTO, int), setDeviceConfigurationsAndWait(MedicalDeviceTO, int), Constant Field Values

SERIAL_NUMBER

static final int SERIAL_NUMBER
Ease-of-use constant for the SDK methods getDeviceConfigurations(), getDeviceConfigurationsAndWait(), setDeviceConfigurations() or setDeviceConfigurationsAndWait().

See Also:
getDeviceConfigurations(MedicalDeviceTO, int), getDeviceConfigurationsAndWait(MedicalDeviceTO, int), setDeviceConfigurations(MedicalDeviceTO, int), setDeviceConfigurationsAndWait(MedicalDeviceTO, int), Constant Field Values

FIRMWARE

static final int FIRMWARE
Ease-of-use constant for the SDK methods getDeviceConfigurations(), getDeviceConfigurationsAndWait(), setDeviceConfigurations() or setDeviceConfigurationsAndWait().

See Also:
getDeviceConfigurations(MedicalDeviceTO, int), getDeviceConfigurationsAndWait(MedicalDeviceTO, int), setDeviceConfigurations(MedicalDeviceTO, int), setDeviceConfigurationsAndWait(MedicalDeviceTO, int), Constant Field Values

IEEE_ADDRESS

static final int IEEE_ADDRESS
Ease-of-use constant for the SDK methods getDeviceConfigurations(), getDeviceConfigurationsAndWait(), setDeviceConfigurations() or setDeviceConfigurationsAndWait().

See Also:
getDeviceConfigurations(MedicalDeviceTO, int), getDeviceConfigurationsAndWait(MedicalDeviceTO, int), setDeviceConfigurations(MedicalDeviceTO, int), setDeviceConfigurationsAndWait(MedicalDeviceTO, int), Constant Field Values

USER_SETTING

static final int USER_SETTING
Ease-of-use constant for the SDK methods getDeviceConfigurations(), getDeviceConfigurationsAndWait(), setDeviceConfigurations() or setDeviceConfigurationsAndWait().

See Also:
getDeviceConfigurations(MedicalDeviceTO, int), getDeviceConfigurationsAndWait(MedicalDeviceTO, int), setDeviceConfigurations(MedicalDeviceTO, int), setDeviceConfigurationsAndWait(MedicalDeviceTO, int), Constant Field Values

DEVICE_STATUS

static final int DEVICE_STATUS
Ease-of-use constant for the SDK methods getDeviceConfigurations(), getDeviceConfigurationsAndWait(), setDeviceConfigurations() or setDeviceConfigurationsAndWait().

See Also:
getDeviceConfigurations(MedicalDeviceTO, int), getDeviceConfigurationsAndWait(MedicalDeviceTO, int), setDeviceConfigurations(MedicalDeviceTO, int), setDeviceConfigurationsAndWait(MedicalDeviceTO, int), Constant Field Values

DEVICE_TYPE_BLOOD_PRESSURE

static final short DEVICE_TYPE_BLOOD_PRESSURE
Type constant that represents a special type of a medical device. Ease-of-use constant for setBindingAction() and setUnbindingAction(().

See Also:
setBindingAction(SDKAction), setBindingAction(SDKAction, int), setUnbindingAction(SDKAction), setUnbindingAction(SDKAction, int), Constant Field Values

DEVICE_TYPE_BLOOD_GLUCOSE

static final short DEVICE_TYPE_BLOOD_GLUCOSE
Type constant that represents a special type of a medical device. Ease-of-use constant for setBindingAction() and setUnbindingAction(().

See Also:
setBindingAction(SDKAction), setBindingAction(SDKAction, int), setUnbindingAction(SDKAction), setUnbindingAction(SDKAction, int), Constant Field Values

DEVICE_TYPE_SCALE

static final short DEVICE_TYPE_SCALE
Type constant that represents a special type of a medical device. Ease-of-use constant for setBindingAction() and setUnbindingAction(().

See Also:
setBindingAction(SDKAction), setBindingAction(SDKAction, int), setUnbindingAction(SDKAction), setUnbindingAction(SDKAction, int), Constant Field Values
Method Detail

addSDKListener

void addSDKListener(SDKListener listener)
Adds the specified sdk listener to receive general sdk events. If listener l is null, no exception is thrown and no action is performed.

Parameters:
listener - the sdk listener.

removeSDKListener

void removeSDKListener(SDKListener listener)
Removes the specified sdk listener so that it no longer receives sdk events. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added. If listener l is null, no exception is thrown and no action is performed.

Parameters:
listener - the sdk listener

addSDKDevicesListener

void addSDKDevicesListener(SDKDevicesListener listener)
Adds the specified devices listener to receive device events. If listener l is null, no exception is thrown and no action is performed.

Parameters:
listener - the devices listener

removeSDKDevicesListener

void removeSDKDevicesListener(SDKDevicesListener listener)
Removes the specified devices listener so that it no longer receives device events. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added. If listener l is null, no exception is thrown and no action is performed.

Parameters:
listener - the devices listener

addSDKDataListener

void addSDKDataListener(SDKDataListener listener)
Adds the specified data listener to receive data events of the devices. If listener l is null, no exception is thrown and no action is performed.

Parameters:
listener - the data listener

removeSDKDataListener

void removeSDKDataListener(SDKDataListener listener)
Removes the specified data listener so that it no longer receives data events. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added. If listener l is null, no exception is thrown and no action is performed.

Parameters:
listener - the data listener

addSDKErrorListener

void addSDKErrorListener(SDKErrorListener listener)
Adds the specified error listener to receive sdk error events. If listener l is null, no exception is thrown and no action is performed.

Parameters:
listener - the error listener

removeSDKErrorListener

void removeSDKErrorListener(SDKErrorListener listener)
Removes the specified error listener so that it no longer receives error events. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added. If listener l is null, no exception is thrown and no action is performed.

Parameters:
listener - the error listener

start

void start()
Starts the sdk. This method or the method startAndWait() has to be called before using the sdk.

Because it is asynchronous it will return before the sdk is actually started and ready to use. If the sdk is started successfully the event onStarted() of the listener SDKListener is fired. In case of an error the event onStartError() of the SDKErrorListener is fired.

Use the method startAndWait() instead if you need a synchronous behavior of this function.


startAndWait

void startAndWait()
                  throws SDKStartException
Starts the sdk and waits for it. This method or the method start() has to be called before using the sdk.

Because it is synchronous it will block the executing thread until the sdk has been started successfully. In case of an error the event onStartError() of the SDKErrorListener is fired and a SDKStartException is thrown.

Use the method start() instead if you need a asynchronous behavior of this function.

Throws:
SDKStartException - if an error occurs while starting the sdk

exit

void exit()
Exits the sdk and waits for it. This method or the method exitAndWait() has to be called after using the sdk.

Because it is asynchronous it will return before the sdk is actually exited. If the sdk is exited successfully the event onExited() of the listener SDKListener is fired. In case of an error the event onExitError() of the SDKErrorListener is fired.

Use the method exitAndWait() instead if you need a synchronous behavior of this function.


exitAndWait

void exitAndWait()
                 throws SDKExitException
Exits the sdk. This method or the method exit() has to be called after using the sdk.

Because it is synchronous it will block the executing thread until the sdk has been exited successfully. In case of an error the event onExitError() of the SDKErrorListener is fired and a SDKExitException is thrown.

Use the method exit() instead if you need a asynchronous behavior of this function.

Throws:
SDKExitException - if an error occurs while exiting the sdk

getState

SDKState getState()
Returns the current state of the sdk. Only if the state is SDKState.STARTED the sdk can be used.

Returns:
the state of the sdk

bindDevice

boolean bindDevice(MedicalDeviceTO medicalDevice)
Binds a single unbound device. This function is asynchronous and returns before the device is actually bound.

Parameters:
medicalDevice - the medical device description
Returns:
undefined at this time. Do not use this value!

bindDevices

boolean bindDevices(java.util.List<MedicalDeviceTO> medicalDevices)
Binds a list of unbound devices. This function is asynchronous and returns before the devices are actually bound.

Parameters:
medicalDevices - a list of medical device descriptions
Returns:
undefined at this time. Do not use this value!

bindAllUnboundDevices

void bindAllUnboundDevices()
Binds all unbound devices. This function is asynchronous and returns before the devices are actually bound.


unbindDevice

boolean unbindDevice(MedicalDeviceTO medicalDevice)
Unbinds a single bound device. This function is asynchronous and returns before the device is actually unbound.

Parameters:
medicalDevice - the medical device description
Returns:
undefined at this time. Do not use this value!

unbindDevices

boolean unbindDevices(java.util.List<MedicalDeviceTO> medicalDevices)
Unbinds a list of bound devices. This function is asynchronous and returns before the devices are actually unbound.

Parameters:
medicalDevices - a list of medical device descriptions
Returns:
undefined at this time. Do not use this value!

unbindAllBoundDevices

void unbindAllBoundDevices()
Unbinds all bound devices. This function is asynchronous and returns before the devices are actually unbound.


getDeviceConfigurations

boolean getDeviceConfigurations(MedicalDeviceTO medicalDevice,
                                int configurations)
Requests information of the specified device. This function is asynchronous and will return before the information is available.

Use getDeviceConfigurationsAndWait instead if you need a synchronous behavior of this function.

Parameters:
medicalDevice - the medical device description. Only the parameter deviceId is used.
configurations - the configurations to request. Use the constants SDK.DATETIME, SDK.SERIAL_NUMBER, SDK.FIRMWARE, SDK.IEEE_MAC_ADDRESS, USER_SETTINGS or combinations with bit-or (|) to specify the configurations.
Returns:
undefined at this time. Do not use this value!

getDeviceConfigurationsAndWait

MedicalDeviceTO getDeviceConfigurationsAndWait(MedicalDeviceTO medicalDevice,
                                               int configurations)
                                               throws SDKDeviceException
Requests information of the specified device. This function is synchronous and will block the executing thread until the information is available.

Use getDeviceConfigurations instead if you need a asynchronous behavior of this function.

Parameters:
medicalDevice - the medical device description. Only the parameter deviceId is used.
configurations - the configurations to request. Use the constants SDK.DATETIME, SDK.SERIAL_NUMBER, SDK.FIRMWARE, SDK.IEEE_MAC_ADDRESS, USER_SETTINGS or combinations with bit-or (|) to specify the configurations.
Returns:
the medical device description with the requested information
Throws:
SDKDeviceException - if a communication error occurs.

setDeviceConfigurations

boolean setDeviceConfigurations(MedicalDeviceTO medicalDevice,
                                int configurations)
Writes information to the specified device. This function is asynchronous and will return before the information is written.

Use setDeviceConfigurationsAndWait instead if you need a synchronous behavior of this function.

Parameters:
medicalDevice - the medical device description.
configurations - the configurations to request. Use the constants SDK.DATETIME, SDK.SERIAL_NUMBER, SDK.FIRMWARE, SDK.IEEE_MAC_ADDRESS, USER_SETTINGS or combinations with bit-or (|) to specify the configurations.
Returns:
undefined at this time. Do not use this value!

setDeviceConfigurationsAndWait

MedicalDeviceTO setDeviceConfigurationsAndWait(MedicalDeviceTO medicalDevice,
                                               int configurations)
                                               throws SDKDeviceException
Writes information to the specified device. This function is synchronous and will block the executing thread until the information was written.

Use setDeviceConfigurations instead if you need a asynchronous behavior of this function.

Parameters:
medicalDevice - the medical device description.
configurations - the configurations to request. Use the constants SDK.DATETIME, SDK.SERIAL_NUMBER, SDK.FIRMWARE, SDK.IEEE_MAC_ADDRESS, USER_SETTINGS or combinations with bit-or (|) to specify the configurations.
Returns:
the medical device description with the updated information
Throws:
SDKDeviceException - if a communication error occurs.

getUserParameters

boolean getUserParameters(MedicalDeviceTO medicalDevice,
                          TO userParameters)
Requests user parameters of the specified device. This function is asynchronous and will return before the information is available.

Use getUserParametersAndWait instead if you need a synchronous behavior of this function. Note: Not all devices support this function! At this time only scales support it.

Parameters:
medicalDevice - the medical device description. Only the parameter deviceId is used.
userParameters - the user parameters. Only the parameter userIndex is used.
Returns:
undefined at this time. Do not use this value!

getUserParametersAndWait

TO getUserParametersAndWait(MedicalDeviceTO medicalDevice,
                            TO userParameters)
                            throws SDKDeviceException
Requests user parameters of the specified device. This function is synchronous and will block the executing thread until the information is available.

Use getUserParameters instead if you need a asynchronous behavior of this function.

Note: Not all devices support this function! At this time only scales support it.

Parameters:
medicalDevice - the medical device description. Only the parameter deviceId is used.
userParameters - the user parameters. Only the parameter userIndex is used.
Returns:
the user parameters.
Throws:
SDKDeviceException - if a communication error occurs.

setUserParameters

boolean setUserParameters(MedicalDeviceTO medicalDevice,
                          TO userParameters)
Writes user parameters to the specified device. This function is asynchronous and will return before the information is written.

Use setUserParametersAndWait instead if you need a synchronous behavior of this function.

Note: Not all devices support this function! At this time only scales support it.

Parameters:
medicalDevice - the medical device description. Only the parameter deviceId is used.
userParameters - the user parameters
Returns:
undefined at this time. Do not use this value!

setUserParametersAndWait

TO setUserParametersAndWait(MedicalDeviceTO medicalDevice,
                            TO userParameters)
                            throws SDKDeviceException
Writes information to the specified device. This function is synchronous and will block the executing thread until the information was written.

Use SetDeviceConfigurations instead if you need a asynchronous behavior of this function.

Note: Not all devices support this function! At this time only scales support it.

Parameters:
medicalDevice - the medical device description. Only the parameter deviceId is used.
userParameters - the user parameters.
Returns:
the updated user parameters
Throws:
SDKDeviceException - if a communication error occurs.

setDeviceClearMem

boolean setDeviceClearMem(MedicalDeviceTO medicalDevice)
Clears the memory of the specified device. This function is asynchronous and will return before the memory is cleared.

Use setDeviceClearMemAndWait instead if you need a synchronous behavior of this function.

Parameters:
medicalDevice - the medical device description. Only the parameter deviceId is used.
Returns:
undefined at this time. Do not use this value!

setDeviceClearMemAndWait

MedicalDeviceTO setDeviceClearMemAndWait(MedicalDeviceTO medicalDevice)
                                         throws SDKDeviceException
Clears the memory of the specified device. This function is synchronous and will block the executing thread until the memory was cleared.

Use setDeviceClearMem instead if you need a asynchronous behavior of this function.

Parameters:
medicalDevice - the medical device description. Only the parameter deviceId is used.
Returns:
the updated medical device description.
Throws:
SDKDeviceException - if a communication error occurs.

getDeviceData

boolean getDeviceData(MedicalDeviceTO medicalDevice)
Requests the stored measurement data of the specified device. This function is asynchronous and will return before the data is available.

Parameters:
medicalDevice - the medical device description. Only the parameter deviceId is used.
Returns:
undefined at this time. Do not use this value!

setBoundAutoUpdatePolicy

void setBoundAutoUpdatePolicy(AutoUpdatePolicy autoUpdatePolicy)
Defines the automatic update policy of missing device information for bound devices.

Possible values are:

Parameters:
autoUpdatePolicy - the auto update policy

getBoundAutoUpdatePolicy

AutoUpdatePolicy getBoundAutoUpdatePolicy()
Returns the current automatic update configuration for bound devices.

Returns:
the auto update policy

setUnboundAutoUpdatePolicy

void setUnboundAutoUpdatePolicy(AutoUpdatePolicy autoUpdatePolicy)
Defines the automatic update policy of missing device information for unbound devices.

Possible values are:

Parameters:
autoUpdatePolicy - the auto update policy

getUnboundAutoUpdatePolicy

AutoUpdatePolicy getUnboundAutoUpdatePolicy()
Returns the current automatic update configuration for unbound devices.

Returns:
the auto update policy

setBindingAction

void setBindingAction(SDKAction action)
Defines a binding action. This action is performed for every device immediately after it was bound.

Parameters:
action - the sdk action.

setBindingAction

void setBindingAction(SDKAction action,
                      int deviceType)
Defines a binding action for the specified device type. This action is performed for all devices of the specified type immediately after they were bound.

Parameters:
action - the sdk action.
deviceType - the device type. Use one of the constants SDK.DEVICE_TYPE_BLOOD_PRESSURE, SDK.DEVICE_TYPE_BLOOD_GLUCOSE or SDK.DEVICE_TYPE_SCALE to define it.

clearBindingActions

void clearBindingActions()
Clears the binding actions for all types of devices.


setUnbindingAction

void setUnbindingAction(SDKAction action)
Defines an unbinding action. This action is performed for every device before unbinding it.

Parameters:
action - the sdk action.

setUnbindingAction

void setUnbindingAction(SDKAction action,
                        int deviceType)
Defines an unbinding action for the specified device type. This action is performed for all devices of the specified type before unbinding it.

Parameters:
action - the sdk action.
deviceType - the device type. Use one of the constants SDK.DEVICE_TYPE_BLOOD_PRESSURE, SDK.DEVICE_TYPE_BLOOD_GLUCOSE or SDK.DEVICE_TYPE_SCALE to define it.

clearUnbindingActions

void clearUnbindingActions()
Clears the unbinding actions for all types of devices.