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 signage devices as a WebAPI. You can use the provided WebAPI to obtain or control the unique System information of signage devices.

Since : 6.5

Product : B2B (LFD)

Summary of Interfaces and Methods

Interface Method
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();
SystemControlManagerObject  

1. Interfaces

1.1. SystemControlManager

This interface provides methods to use SystemControl functionalities..

Methods

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

DOMString getVersion();

Product: B2B (LFD)

Exceptions:

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

    • with the error type UnknownError in any other error case.

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.

     void captureScreen();

Product: B2B (LFD)

Exceptions:

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

      with the error type UnknownError in any other error case

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.

	void rebootDevice();

Product: B2B (LFD, IWB)

Exceptions:

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

      with the error type UnknownError in any other error case.

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)

Exceptions:

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

      with the error type UnknownError in any other error case.

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 stop Document playback.

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

Product: B2B (LFD)

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.

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)

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.

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)

Exceptions:

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

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.

  void setScreenLampSchedule(LampScheduleInfo info);

Product: B2B (LFD)

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 invalid values are passed for an input parameter.

      with the error type NotSupportedError if this feature is not supported.

      with the error type InvalidValuesError if invalid values are passed for an input parameter.

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)

Exceptions:

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

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)

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 invalid values are passed for an input parameter.

      with the error type NotSupportedError if this feature is not supported.

      with the error type InvalidValuesError if invalid values are passed for an input parameter.

Code example:


		try {
    webapis.systemcontrol.setPanelMute("ON");
} catch (e) {
    console.log("[setPanelMute] call syncFunction exception [" + e.code + "] name: " + e.name + " message: " + e.message);
}
		
setPanelMute
This interface provides a method to set the panel mute state of a device.

 void setPanelMute(Activation enable);

Product: B2B (LFD)

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 invalid values are passed for an input parameter.

      with the error type NotSupportedError if this feature is not supported.

      with the error type InvalidValuesError if invalid values are passed for an input parameter.

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)

Exceptions:

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

      with error type UnknownError in any other error case.

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.

 void setSafetyLock(Activation enable);

Product: B2B (LFD)

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 invalid values are passed for an input parameter.

      with the error type NotSupportedError if this feature is not supported.

      with the error type InvalidValuesError if invalid values are passed for an input parameter.

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)

Exceptions:

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

      with error type UnknownError in any other error case.

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);
		}
		
getSourceOrientation
This interface provides a method to get the current source orientation of the device.

 ScreenOrientation getSourceOrientation();

Product: B2B (LFD)

Exceptions:

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

      with error type NotSupportedError, if the input Source is not supported in the model.

      with error type UnknownError in any other error case.

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

		console.log("[getSourceOrientation] call syncFunction type: " + Result);
	
setPCConnection
This interface provides a method to set the PCConnection value of a device.

 void setPCConnection(PCConnection type);

Product: B2B (LFD)

Parameters:

  • type: PCConnection value.

Exceptions:

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

      with error type TypeMismatchError if invalid values are passed for an input parameter.

      with error type NotSupportedError if this feature is not supported.

      with error type InvalidValuesError if invalid values are passed for an input parameter.

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)

Exceptions:

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

      with error type UnknownError in any other error case.

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)

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.

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.

 Activation getMessageDisplay();

Product: B2B (LFD)

Exceptions:

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

      with error type UnknownError in any other error case.

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

1.2. SystemControlManagerObject

This 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.

SystemControl::SystemControlManagerObject

Attributes

  • readonly SystemControl SystemControlManager
    Namespace for the SystemControl API

1.3. Enum

Activation
Enable or disable a device.

Product: B2B (LFD)

Parameters:

  • ON: enable.
  • OFF: Disable.
PCConnection
PCConnection value.

Product: B2B (LFD)

Parameters:

  • RJ45: PCConnection set to RJ45.
  • RS232: PCConnection set to RS232.
  • INVALID: Invalid PCConnection value.
ScreenOrientation
Screen orientation of a device.

Product: B2B (LFD)

Parameters:

  • LANDSCAPE: Horizontal orientation.
  • PORTRAIT: Vertical orientation.
  • AUTO: According to screen slope orientation.