inSCADA
Ver 2020 EN
Search…
⌃K

System Functions

System functions are used to access the hardware resources on which the inSCADA Platform is running. It is also used to shut down, restart, and manage the list of requests made from the system.

Get System Requests

ins.getSystemRequests()

It receives a list of requests received to the system.
Return Value: Returns a list of requests to the system as an array.

Syntax

var requests=ins.getSystemRequests();
var i=0;
if (requests!==null) { return -1};
if (requests.length>0) { // check new a req
for (i=0;i<requests.length;i++) {
switch (requests[i].type) {
case "warm_restart":
// to do
ins.deleteSystemRequests(requests[i]);
break;
case "cold_restart":
// to do
ins.deleteSystemRequests(requests[i]);
break;
case "set_date_time":
// to do
ins.deleteSystemRequests(requests[i]);
break;
default:
// undefined System Requests
ins.deleteSystemRequests(requests[i]);
break;
}
}
}

Delete System Requests

ins.deleteSystemRequests(object requests)

Deletes a request to the system.
object requests: The request object in the list.

Syntax

var requests=ins.getSystemRequests();
var i=0;
if (requests!==null) { return -1};
if (requests.length>0) { // check new a req
for (i=0;i<requests.length;i++) {
switch (requests[i].type) {
case "warm_restart":
// to do
ins.deleteSystemRequests(requests[i]);
break;
case "cold_restart":
// to do
ins.deleteSystemRequests(requests[i]);
break;
case "set_date_time":
// to do
ins.deleteSystemRequests(requests[i]);
break;
default:
// undefined System Requests
ins.deleteSystemRequests(requests[i]);
break;
}
}
}

Get System Status

ins.getSystemStats()

It gives information about the system resources and usage amounts.
Return Value: Does not return any value.

Syntax

var system=ins.getSystemStats();
return system;

Shutdown System

ins.shutdown()

Turns off the system.
Return Value: Does not return any value.

Syntax

ins.shutdown();

Restart System

ins.restart()

Restarts the system.
Return Value: Does not return any value.

Syntax

ins.restart();