top

HEALTHCAREDEVICE.HEALTHCAREDEVICE

This class receives kinds of healthcare device and id. It consists of callback methods that can set to receive a device event.

Add the following line for healthcaredevice.HealthcareDevice class into a html file your own :

  script type="text/javascript" src="$MANAGER_WIDGET/Common/webapi/1.0/deviceapis.js">/script>

You can declare healthcaredevice.HealthcareDevice class like this :

  ex) var healthcaredevice = deviceapis.healthcaredevice;


Methods

getDeviceID

Description
get device ID of the healthcaredevice.
Parameters
none
Return■DOMString
  - device ID of healthcaredevice
Emulator SupportYes
SDK ConstraintNone
Example
var healthcaredevice = window.deviceapis.healthcaredevice || {};
var device1 = null;

Main.keyDown = function()
{
    healthcaredevice.getHealthcareDevices(Main.onHealthcareDevicesObtained);
    ....
}

Main.onHealthcareDevicesObtained = function(healthcaredevices)
{
    device1 = healthcaredevices[0];
}

string strDeviceID = device1.getDeviceID();

getName

Description
get name of the healthcare device.
Parameters
none
Return■DOMString
  - name of healthcare device
Emulator SupportYes
SDK ConstraintNone
Example
var healthcaredevice = window.deviceapis.healthcaredevice || {};
var device1 = null;

Main.keyDown = function()
{
    healthcaredevice.getHealthcareDevices(Main.onHealthcareDevicesObtained);
    ....
}

Main.onHealthcareDevicesObtained = function(healthcaredevices)
{
    device1 = healthcaredevices[0];
}

string strName = device1.getName();

getType

Description
get type of the healthcare device
Parameters
none
Return■Number
  - Unsigned short
  - Type of the healthcare device
Emulator SupportYes
SDK ConstraintNone
Example
var healthcaredevice = window.deviceapis.healthcaredevice || {};
var device1 = null;

Main.keyDown = function()
{
    healthcaredevice.getHealthcareDevices(Main.onHealthcareDevicesObtained);
    ....
}

Main.onHealthcareDevicesObtained = function(healthcaredevices)
{
    device1 = healthcaredevices[0];
}

unsinged short nType = device1.getType();

getUniqueID

Description
get unique ID of the healthcaredevice.
Parameters
none
Return■DOMString
  - uniqueID
  - address/uniqueID of healthcaredevice
Emulator SupportYes
SDK ConstraintNone
Example
var healthcaredevice = window.deviceapis.healthcaredevice || {};
var device1 = null;

Main.keyDown = function()
{
    healthcaredevice.getHealthcareDevices(Main.onHealthcareDevicesObtained);
    ....
}

Main.onHealthcareDevicesObtained = function(healthcaredevices)
{
    device1 = healthcaredevices[0];
}

string strUniqueID = device1.getUniqueID();

registerDeviceCallback

Description
to register a device instance for receiving device event.
Parameters
■callbackFn 
  - Function 
  - callback function that has prototype given as “void callbackFn(HealthcareDeviceInfo)”
Return■ None
Emulator SupportYes
SDK ConstraintNone
Example
var healthcaredevice = window.deviceapis.healthcaredevice || {};
var device1 = null;

Main.keyDown = function()
{
    healthcaredevice.getHealthcareDevices(Main.onHealthcareDevicesObtained);
    ....
}

Main.onHealthcareDevicesObtained = function(healthcaredevices)
{
    device1 = healthcaredevices[0];
}

device1.registerDeviceCallback(deviceCallback);