inSCADA
Ver 2022 TR
Search
K
Comment on page

In-Memory DB Functions

In-Memory Database Functions
In-Memmory DB Fonksiyonları, hafıza bölgesine nesne yazma/okuma işlemlerini yapmak için kullanılır.

Get Object

Object ins.getGlobalObject(String name)

Hafızadaki bir nesneyi okur.
name : Nesne ismi.
Return Value : Bir JSON nesnesi geri döndürür.

Syntax

var obj=ins.getGlobalObject("My_Obj");
if (obj!==null) {
var item="Previous_Value";
if (obj[item]!==null) {
ins.notify("info","Get Global Object",obj[item]);
}
}
return obj[item];

Set Object

Object ins.setGlobalObject(String name)

Hafızaya bir nesne yazar.
name : Nesne ismi.
Return Value : Herhangi bir değer geri döndürmez.

Syntax

var My_Obj={};
My_Obj.Previous_Value=0;
My_Obj.Message="Hello World";
ins.setGlobalObject("My_Obj",My_Obj);