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 functionalities for retrieving device information provided by the Samsung Product API.
The SystemControl module provides additional functionalities for Samsung B2B devices as a WebAPI.
You can use this WebAPI to retrieve and manage the system information for B2B devices.

Since : 6.5

Product : B2B

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

Whether the feature is enabled.

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

The following values are supported

  • ON : Enabled
  • OFF : Disabled

Since : 6.5

1.2 ScreenOrientation

Screen orientation of the device.

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

The following values are supported

  • LANDSCAPE : Horizontal orientation
  • PORTRAIT : Vertical orientation
  • AUTO : Automatic based on the screen rotation

Since : 6.5

1.3 PCConnection

Computer connection type of the device.

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

The following values are supported

  • RJ45 : RJ45 connection
  • RS232 : RS-232 connection
  • INVALID : Invalid connection type

Since : 6.5

2. Interfaces

2.1 LampScheduleInfo

Object containing lamp schedule settings.

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

Attributes

  • Activation use
    Lamp schedule status.
  • DOMString firstTime
    First scheduled time of day, in the format "hours:minutes".
  • long level1
    Lamp level for the first scheduled time. The value is a number between 0 and 100.
  • DOMString secondTime
    Second scheduled time of day, in the format "hours:minutes".
  • long level2
    Lamp level for the second scheduled time. The value is a number between 0 and 100.

2.2 SystemControlManagerObject

Defines a WebApi object instance of the Samsung Product API.
The webapis.systemcontrol object enables access to SystemControl API functionality.

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

Attributes

2.3 UpdateFirmwareProgressChangedCallback

Defines the firmware update progress callback.

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

Methods

onchange

Method that is invoked when the firmware update progress changes.

void onchange(long progress);

Privilege Level : Partner

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

Parameters :

  • progress : Operation status

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

Provides methods for 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

Retrieves the SystemControl module version on the device.

DOMString getVersion();

Product : B2B

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 for any other error

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

Creates a screen capture of the device. 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 for any other error

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

Reboots (switches off and on again) the device.

void rebootDevice();

Product : B2B

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 for any other error

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

Retrieves the device serial number.

DOMString getSerialNumber();

Product : B2B

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 for any other error

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

Updates 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 firmware ID
  • SWUFileName : BEM file name
  • SWVersion : Firmware version
  • SWURL : Full path to the BEM file
  • SWTotalBytes : BEM 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 any input parameter contains an invalid value
    • with the error type NotSupportedError if this feature is not supported
    • with the error type TypeMismatchError if an input parameter is not compatible with its expected type

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

Registers an asynchronous onchange firmware update progress callback.

void setUpdateFirmwareListener(UpdateFirmwareProgressChangedCallback onchange);

Product : B2B (LFD)

Privilege Level : Partner

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

Parameters :

  • onchange : Callback method to invoke

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 an input parameter is not compatible with its expected type

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

Unregisters the asynchronous onChange firmware update progress callback.

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

Defines the screen lamp schedule for the device, consisting of time of day and lamp brightness level.

void setScreenLampSchedule(LampScheduleInfo info);

Product : B2B (LFD)

Privilege Level : Partner

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

Parameters :

  • info : Object containing the times and levels to be 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

Retrieves screen lamp schedule information for the device.

LampScheduleInfo getScreenLampSchedule();

Product : B2B (LFD)

Privilege Level : Partner

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

Return Value :

  • LampScheduleInfo : LampScheduleInfo object containing time and level information

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

Enables or disables panel mute on the device.

void setPanelMute(Activation enable);

Product : B2B (LFD)

Privilege Level : Partner

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

Parameters :

  • enable : Whether panel mute is enabled: ON to enable, OFF to disable

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

Retrieves the panel mute status of the device.

Activation getPanelMute();

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 for any other error

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

Enables or disables the safety lock on the device. When the safety lock is enabled, PIN entry
is required when an input signal is received.

void setSafetyLock(Activation enable);

Product : B2B (LFD)

Privilege Level : Partner

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

Parameters :

  • enable : Whether the safety lock is enabled: ON to enable, OFF to disable

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

Retrieves the safety lock status of the device.

Activation getSafetyLock();

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 for any other error

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

Retrieves the menu orientation of the 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 for any other error

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

Retrieves the 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 this feature is not supported
    • with the error type UnknownError for any other error

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

Sets the computer connection type for the device.

void setPCConnection(PCConnection type);

Product : B2B (LFD)

Privilege Level : Partner

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

Parameters :

  • type : Computer connection type

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

Retrieves the computer connection type for the 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 for any other error

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

Enables or disables On Screen Display (OSD) for system messages on the device.
The following messages are affected by this setting:
Source Info, No Signal message, MDC message.

void setMessageDisplay(Activation enable);

Product : B2B (LFD)

Privilege Level : Partner

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

Parameters :

  • enable : OSD message display status: ON to enable, OFF to disable

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

Retrieves the OSD message display status of the device. The following messages are affected by this setting:
Source Info, No Signal message, MDC message.
If any of these message types is set to ON, this method returns ON.

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 for any other error

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();
  };

};