Published 2014-10-28 | (Compatible with SDK 4.5,5.0,5.1 and 2012,2013,2014 models)

Interface NServiceDevice
Constant type Constants


  • Number
  • for a message received from NService device


  • Number
  • NService device joined a group.


  • Number
  • NService device left a group

DOMString getUniqueID()

DOMString getDeviceID()

DOMString getName()

Number sendMessage(DOMString message)

void registerDeviceCallback(callbackFn(NServiceDeviceEventInfo))

void unregisterDeviceCallback()

Method DOMString getUniqueID()

gets unique ID of the device.

Parameter None
Return Value uniqueID DOMString : address/uniqueID of device

Method DOMString getDeviceID()

gets device ID of the device.

Parameter None
Return Value uniqueID DOMString : device ID of device

Method DOMString getName()

gets name of the device.

Parameter None
Return Value name DOMString : name of device

Method Number getType()

gets the type of the HHP device.

Parameter None
Return Value


  • int
  • Type of HPP device

Method unsigned short sendMessage(DOMString messasge)

sends message from DTV application to device.

Parameter messasge DOMString : message buffer
Return Value

ERROR_CODE unsigned short :

  • ERROR_CODE_NO_ERR if call is successful
  • ERROR_CODE_ERR otherwise.

Method void registerDeviceCallback( callbackFn(NServiceDeviceEventInfo) )

registers a callback function for receiving device event.

Parameter callbackFn function : callback function that has prototype given as void callbackFn(NServiceDeviceEventInfo)
Return Value None

Method void unregisterDeviceCallback()

This function unregisters device instance from receiving device event.

Parameter None
Return Value None