Материал из Module developer
SubDevice.setData()
to set up data for module work. The data are saved after closing the project
Syntax
Module.getSubDevice(SubDeviceName).setData(data)
| input | sample | description |
| data | any | type: data the data you want to save |
| output |
-
Example:
var SubDevice = Module.getSubDevice("MySubDevice"); var cache = []; for (var i = 0; i < 10; i++){ // fill array with numbers cache[i] = i; } SubDevice.setData(cache); // save array
