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.
It receives a list of requests received to the system.
Return Value: Returns a list of requests to the system as an array.
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;
}
}
}
Deletes a request to the system.
object requests: The request object in the list.
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;
}
}
}
It gives information about the system resources and usage amounts.
Return Value: Does not return any value.
var system=ins.getSystemStats();
return system;
Turns off the system.
Return Value: Does not return any value.
ins.shutdown();
Restarts the system.
Return Value: Does not return any value.
ins.restart();
Last modified 3yr ago