SystemControl API

To use Samsung Product API,

<script type="text/javascript" src="$WEBAPIS/webapis/webapis.js"></script>

Should be loaded in index.html

This module defines the functionalities of getting device information provided by the Samsung Product API.
The SystemControl module provides a special functionality provided by Samsung B2B devices as a WebAPI.
You can use the provided WebAPI to obtain or control the unique system information of B2B devices.

Since : 6.5

Product : B2B (LFD, IWB, HTV)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Summary of Interfaces and Methods

Interface Method
LampScheduleInfo

SystemControlManagerObject

UpdateFirmwareProgressChangedCallback

void onchange(long progress);

SystemControlManager

DOMString getVersion();
void captureScreen();
void rebootDevice();
DOMString getSerialNumber();
void updateFirmware(DOMString SoftwareID, DOMString SWUFileName, DOMString SWVersion, DOMString SWURL, long SWTotalBytes);
void setUpdateFirmwareListener(UpdateFirmwareProgressChangedCallback onchange);
void unsetUpdateFirmwareListener();
void setScreenLampSchedule(LampScheduleInfo info);
LampScheduleInfo getScreenLampSchedule();
void setPanelMute(Activation enable);
Activation getPanelMute();
void setSafetyLock(Activation enable);
Activation getSafetyLock();
ScreenOrientation getOnScreenMenuOrientation();
ScreenOrientation getSourceOrientation();
void setPCConnection(PCConnection type);
PCConnection getPCConnection();
void setMessageDisplay(Activation enable);
Activation getMessageDisplay();

1. Type Definitions

1.1 Activation

Enabled or disabled value for a device.

enum Activation {
  "ON",
  "OFF"
};

The following values are supported

  • ON : Enabled
  • OFF : Disabled

Since : 6.5

1.2 ScreenOrientation

Screen orientation of a device.

enum ScreenOrientation {
  "LANDSCAPE",
  "PORTRAIT",
  "AUTO"
};

The following values are supported

  • LANDSCAPE : Horizontal orientation
  • PORTRAIT : Vertical orientation
  • AUTO : Orientation selected according to screen angle

Since : 6.5

1.3 PCConnection

PCConnection value.

enum PCConnection {
  "RJ45",
  "RS232",
  "INVALID"
};

The following values are supported

  • RJ45 : PCConnection set to RJ45
  • RS232 : PCConnection set to RS232
  • INVALID : Invalid PCConnection value

Since : 6.5

2. Interfaces

2.1 LampScheduleInfo

Lamp schedule settings information object.

[NoInterfaceObject] interface LampScheduleInfo {
  attribute Activation use;
  attribute DOMString firstTime;
  attribute long level1;
  attribute DOMString secondTime;
  attribute long level2;
};

Attributes

  • Activation use
    Lamp schedule activation state.
  • DOMString firstTime
    First scheduled time (in the format "hours:minutes").
  • long level1
    First lamp level value (between 0 and 100).
  • DOMString secondTime
    Second scheduled time (in the format "hours:minutes").
  • long level2
    Second lamp level value (between 0 and 100).

2.2 SystemControlManagerObject

The interface defines what is instantiated by the SystemControl object of the Samsung Product API.
A webapis.systemcontrol object allows access to the functionality of the SystemControl API.

[NoInterfaceObject] interface SystemControlManagerObject {
  readonly attribute SystemControlManager systemcontrol;
};
WebApi implements SystemControlManagerObject;

Attributes

2.3 UpdateFirmwareProgressChangedCallback

This callback interface defines the device information error callback.

[Callback = FunctionOnly, NoInterfaceObject] interface UpdateFirmwareProgressChangedCallback {
  void onchange(long progress);
};

Methods

onchange

This method is the callback parameter.

void onchange(long progress);

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Parameters :

  • progress : Status of the operation

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method

Since : 6.5

Code Example :

var onchange = function(data) {
  console.log("[UpdateCallback] progress :" + data + " changed");
};

try {
  webapis.systemcontrol.setUpdateFirmwareListener(onchange);
} catch (e) {
  console.log("setUpdateFirmwareListener exception [" + e.code + "] name: " + e.name + " message: " + e.message););
}

2.4 SystemControlManager

This interface provides methods to use SystemControl functionalities.

[NoInterfaceObject] interface SystemControlManager {
  DOMString getVersion();
  void captureScreen();
  void rebootDevice();
  DOMString getSerialNumber();
  void updateFirmware(DOMString SoftwareID, DOMString SWUFileName, DOMString SWVersion, DOMString SWURL, long SWTotalBytes);
  void setUpdateFirmwareListener(UpdateFirmwareProgressChangedCallback onchange);
  void unsetUpdateFirmwareListener();
  void setScreenLampSchedule(LampScheduleInfo info);
  LampScheduleInfo getScreenLampSchedule();
  void setPanelMute(Activation enable);
  Activation getPanelMute();
  void setSafetyLock(Activation enable);
  Activation getSafetyLock();
  ScreenOrientation getOnScreenMenuOrientation();
  ScreenOrientation getSourceOrientation();
  void setPCConnection(PCConnection type);
  PCConnection getPCConnection();
  void setMessageDisplay(Activation enable);
  Activation getMessageDisplay();
};

Since : 6.5

Methods

getVersion

This interface provides a method to get the SystemControl module version.

DOMString getVersion();

Product : B2B (LFD, IWB, HTV)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Return Value :

  • DOMString : DOMString SystemControl plug-in version

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type NotSupportedError if this feature is not supported
    • with the error type UnknownError in any other error case

Since : 6.5

Code Example :

var Version = null;
try {
  Version = webapis.systemcontrol.getVersion();
} catch (e) {
  console.log("[getVersion] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}
if(null !== Version){
  console.log("[getVersion] call syncFunction type: " + Version);
}

captureScreen

This interface provides a method to capture the screen. The screen capture is saved at: /opt/share/magicinfo/ScreenCapture.jpg.

void captureScreen();

Product : B2B (LFD)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type NotSupportedError if this feature is not supported
    • with the error type UnknownError in any other error case

Since : 6.5

Code Example :

try {
  webapis.systemcontrol.captureScreen();
} catch (e) {
  console.log("[captureScreen] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}

rebootDevice

This interface provides a method to reboot the device (power off the device and restart).

void rebootDevice();

Product : B2B (LFD, IWB, HTV)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type NotSupportedError if this feature is not supported
    • with the error type UnknownError in any other error case

Since : 6.5

Code Example :

try {
  webapis.systemcontrol.rebootDevice();
} catch (e) {
  console.log("[rebootDevice] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}

getSerialNumber

This interface provides a method to get the device serial number.

DOMString getSerialNumber();

Product : B2B (LFD, IWB, HTV)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Return Value :

  • DOMString : Device serial number

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type NotSupportedError if this feature is not supported
    • with the error type UnknownError in any other error case

Since : 6.5

Code Example :

var SerialNumber = null;

try {
  SerialNumber = webapis.systemcontrol.getSerialNumber();
} catch (e) {
  console.log("[getSerialNumber] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}

if (null !== SerialNumber) {
  console.log("[getSerialNumber] call syncFunction type: " + SerialNumber);
}

updateFirmware

This interface provides a method to update the device firmware.

void updateFirmware(DOMString SoftwareID, DOMString SWUFileName, DOMString SWVersion, DOMString SWURL, long SWTotalBytes);

Product : B2B (LFD)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Parameters :

  • SoftwareID : Unique software ID
  • SWUFileName : .bem file name
  • SWVersion : Version of the software .bem file
  • SWURL : Full path of the .bem file
  • SWTotalBytes : Software file size

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type InvalidValuesError if invalid values are passed for an input parameter
    • with the error type NotSupportedError if this feature is not supported
    • with the error type TypeMismatchError if invalid values are passed for an input parameter

Since : 6.5

Code Example :

var SoftwareID 		=	"0";
var SWUFileName 		=	"upgrade.bem";
var SWVersion		=	"T-HKMLAKUC 0227.20";
var SWURL 			=	"http://10.88.43.36:8080/New2016/Saurabh/swupdate/T-HKMLAKUC_0227_20/image/upgrade.bem";
var SWTotalBytes 	=    1007396825;
webapis.systemcontrol.updateFirmware(SoftwareID, SWUFileName, SWVersion, SWURL, SWTotalBytes);

setUpdateFirmwareListener

This method adds the asynchronous onChange callback for the firmware update progress to a module.

void setUpdateFirmwareListener(UpdateFirmwareProgressChangedCallback onchange);

Product : B2B (LFD)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Parameters :

  • onchange : The callback function

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type NotSupportedError if this feature is not supported
    • with the error type TypeMismatchError if invalid values are passed for an input parameter

Since : 6.5

Code Example :

var onchange = function(data) {
  console.log("[UpdateFirmwareProgressChangedCallback] progress :" + data + " changed");
}

try {
  webapis.systemcontrol.setUpdateFirmwareListener(onchange);
} catch (e) {
  console.log("setUpdateFirmwareListener exception [" + e.code + "] name: " + e.name + " message: " + e.message););
}

unsetUpdateFirmwareListener

This method removes the asynchronous onChange callback for the firmware update progress from a module.

void unsetUpdateFirmwareListener();

Product : B2B (LFD)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type NotSupportedError if this feature is not supported

Since : 6.5

Code Example :

function unsetUpdateFirmwareListener() {
  try {
    console.log("begin unsetUpdateFirmwareListener");
    webapis.systemcontrol.unsetUpdateFirmwareListener();
  } catch (e) {
    console.log("unsetUpdateFirmwareListener exception [" + e.code + "] name: " + e.name + " message: " + e.message);
    return;
  }
}

setScreenLampSchedule

This interface provides a method to set the screen lamp schedule, which contains values for time and lamp brightness level.

void setScreenLampSchedule(LampScheduleInfo info);

Product : B2B (LFD)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Parameters :

  • info : Time and level value set

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type TypeMismatchError if an input parameter is not compatible with its expected type
    • with the error type NotSupportedError if this feature is not supported
    • with the error type InvalidValuesError if any input parameter contains an invalid value

Since : 6.5

Code Example :

var info = {
  "use" : "ON",
  "firstTime"   : "08:55",
  "level1"      : 30,
  "secondTime"  : "16:50",
  "level2"      : 80
};

try {
  webapis.systemcontrol.setScreenLampSchedule(info);
} catch (e) {
  console.log("[setScreenLampSchedule] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}

getScreenLampSchedule

This interface provides a method to get screen lamp schedule information.

LampScheduleInfo getScreenLampSchedule();

Product : B2B (LFD)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Return Value :

  • LampScheduleInfo : LampScheduleInfo object, containing time and light level values

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type NotSupportedError if this feature is not supported

Since : 6.5

Code Example :

var ScreenLampSchedule = null;

try {
  ScreenLampSchedule = webapis.systemcontrol.getScreenLampSchedule();
} catch (e) {
  console.log("[getScreenLampSchedule] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}

if (null !== ScreenLampSchedule) {
  console.log("[getScreenLampSchedule] call syncFunction type: " + ScreenLampSchedule);
}

setPanelMute

This interface provides a method to set the panel mute state of a device.

void setPanelMute(Activation enable);

Product : B2B (LFD)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Parameters :

  • enable : on/off state of the panel mute feature

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type TypeMismatchError if an input parameter is not compatible with its expected type
    • with the error type NotSupportedError if this feature is not supported
    • with the error type InvalidValuesError if any input parameter contains an invalid value

Since : 6.5

Code Example :

try {
  webapis.systemcontrol.setPanelMute("ON");
} catch (e) {
  console.log("[setPanelMute] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}

getPanelMute

This interface provides a method to get the current panel mute state of a device.

Activation getPanelMute();

Product : B2B (LFD)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Return Value :

  • Activation : Current on/off state of the panel mute feature

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type NotSupportedError if this feature is not supported
    • with the error type UnknownError in any other error case

Since : 6.5

Code Example :

var PanelMuteOnOff = null;

try {
  PanelMuteOnOff = webapis.systemcontrol.getPanelMute();
} catch (e) {
  console.log("[getPanelMute] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}

if (null !== PanelMuteOnOff) {
  console.log("[getPanelMute] call syncFunction type: " + PanelMuteOnOff);
}

setSafetyLock

This interface provides a method to set the safety lock status of a device. When the safety lock is set to ON, a PIN number
input window appears when an input signal is received by the device.

void setSafetyLock(Activation enable);

Product : B2B (LFD)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Parameters :

  • enable : on/off state of the safety lock feature

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type TypeMismatchError if an input parameter is not compatible with its expected type
    • with the error type NotSupportedError if this feature is not supported
    • with the error type InvalidValuesError if any input parameter contains an invalid value

Since : 6.5

Code Example :

try {
  webapis.systemcontrol.setSafetyLock("ON");
} catch (e) {
  console.log("[setSafetyLock] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}

getSafetyLock

This interface provides a method to get the current safety lock status of a device.

Activation getSafetyLock();

Product : B2B (LFD)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Return Value :

  • Activation : Current on/off status of the safety lock feature

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type NotSupportedError if this feature is not supported
    • with the error type UnknownError in any other error case

Since : 6.5

Code Example :

var SafetyLock = null;

try {
  SafetyLock = webapis.systemcontrol.getSafetyLock();
} catch (e) {
  console.log("[getSafetyLock] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}

if (null !== SafetyLock) {
  console.log("[getSafetyLock] call syncFunction type: " + SafetyLock);
}

getOnScreenMenuOrientation

This interface provides a method to get the current menu orientation of a device.

ScreenOrientation getOnScreenMenuOrientation();

Product : B2B (LFD)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Return Value :

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type NotSupportedError if this feature is not supported
    • with the error type UnknownError in any other error case

Since : 6.5

Code Example :

var onScreenMenuOrientation = null;

try {
  onScreenMenuOrientation = webapis.systemcontrol.getOnScreenMenuOrientation();
} catch (e) {
  console.log("[getOnScreenMenuOrientation] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}

if (null !== onScreenMenuOrientation) {
  console.log("[getOnScreenMenuOrientation] call syncFunction type: " + onScreenMenuOrientation);
}

getSourceOrientation

This interface provides a method to get the current source orientation of the device.

ScreenOrientation getSourceOrientation();

Product : B2B (LFD)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Return Value :

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type NotSupportedError if the input source is not supported in the model
    • with the error type UnknownError in any other error case

Since : 6.5

Code Example :

var Result = null;

try {
  Result = webapis.systemcontrol.getSourceOrientation();
} catch (e) {
  console.log("[getSourceOrientation] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}

setPCConnection

This interface provides a method to set the PCConnection value of a device.

void setPCConnection(PCConnection type);

Product : B2B (LFD)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Parameters :

  • type : PCConnection value

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type TypeMismatchError if an input parameter is not compatible with its expected type
    • with the error type NotSupportedError if this feature is not supported
    • with the error type InvalidValuesError if any input parameter contains an invalid value

Since : 6.5

Code Example :

try {
  webapis.systemcontrol.setPCConnection("RJ45");
} catch (e) {
  console.log("[setPCConnection] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}

getPCConnection

This interface provides a method to get the PCConnection value of a device.

PCConnection getPCConnection();

Product : B2B (LFD)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Return Value :

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type NotSupportedError if this feature is not supported
    • with the error type UnknownError in any other error case

Since : 6.5

Code Example :

var PCConnection = null;
try {
  PCConnection = webapis.systemcontrol.getPCConnection();
} catch (e) {
  console.log("[getPCConnection] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}
if(null !== PCConnection){
  console.log("[getPCConnection] call syncFunction type: " + PCConnection);
}

setMessageDisplay

This interface provides a method to enable or disable OSD (On Screen Display) messages on the device. This controls the display of system messages
on the device screen. The following messages are affected by this setting:
Source Info, No Signal message, MDC message, Download Status message.

void setMessageDisplay(Activation enable);

Product : B2B (LFD)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Parameters :

  • enable : on/off status of the OSD message display

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type TypeMismatchError if an input parameter is not compatible with its expected type
    • with the error type NotSupportedError if this feature is not supported
    • with the error type InvalidValuesError if any input parameter contains an invalid value

Since : 6.5

Code Example :

try {
  webapis.systemcontrol.setMessageDisplay("ON");
} catch (e) {
  console.log("[setMessageDisplay] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}

getMessageDisplay

This interface provides a method to get the OSD message display status of the device. The following messages are affected by this setting:
Source Info, No Signal message, MDC message, Download Status message.

Activation getMessageDisplay();

Product : B2B (LFD)

Privilege Level : Partner

Privilege : http://developer.samsung.com/privilege/systemcontrol

Return Value :

Exceptions :

  • WebAPIException
    • with the error type SecurityError if the application does not have the privilege to call this method
    • with the error type NotSupportedError if this feature is not supported
    • with the error type UnknownError in any other error case

Since : 6.5

Code Example :

var MessageDisplay = null;
try {
  MessageDisplay = webapis.systemcontrol.getMessageDisplay();
} catch (e) {
  console.log("[getMessageDisplay] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}
if(null !== MessageDisplay){
  console.log("[getMessageDisplay] call syncFunction type: " + MessageDisplay);
}

3. Full WebIDL

module SystemControl {
  enum Activation {
    "ON",
    "OFF"
  };

  enum ScreenOrientation {
    "LANDSCAPE",
    "PORTRAIT",
    "AUTO"
  };

  enum PCConnection {
    "RJ45",
    "RS232",
    "INVALID"
  };

  [NoInterfaceObject] interface LampScheduleInfo {
    attribute Activation use;
    attribute DOMString firstTime;
    attribute long level1;
    attribute DOMString secondTime;
    attribute long level2;
  };

  [NoInterfaceObject] interface SystemControlManagerObject {
    readonly attribute SystemControlManager systemcontrol;
  };

  WebApi implements SystemControlManagerObject;

  [Callback = FunctionOnly, NoInterfaceObject] interface UpdateFirmwareProgressChangedCallback {
    void onchange(long progress);
  };

  [NoInterfaceObject] interface SystemControlManager {
    DOMString getVersion();
    void captureScreen();
    void rebootDevice();
    DOMString getSerialNumber();
    void updateFirmware(DOMString SoftwareID, DOMString SWUFileName, DOMString SWVersion, DOMString SWURL, long SWTotalBytes);
    void setUpdateFirmwareListener(UpdateFirmwareProgressChangedCallback onchange);
    void unsetUpdateFirmwareListener();
    void setScreenLampSchedule(LampScheduleInfo info);
    LampScheduleInfo getScreenLampSchedule();
    void setPanelMute(Activation enable);
    Activation getPanelMute();
    void setSafetyLock(Activation enable);
    Activation getSafetyLock();
    ScreenOrientation getOnScreenMenuOrientation();
    ScreenOrientation getSourceOrientation();
    void setPCConnection(PCConnection type);
    PCConnection getPCConnection();
    void setMessageDisplay(Activation enable);
    Activation getMessageDisplay();
  };

};