Материал из Module developer
IR.EVENT_OFFLINE
the identifier of the event which is activated at disconnection from equipment
Syntax
IR.AddListener(IR.EVENT_OFFLINE, driver, function, [pointer]);
| input | sample | description |
| driver | IR.CreateDevice(IR.DEVICE_BLE_DEVICE) | type: object the reference to the driver |
| function | function() {} | type: function the unnamed function or reference to the function |
| pointer | - | type: object the pointer to the function which serves the function (optional) |
| output |
-
Example:
var device = IR.CreateDevice(IR.DEVICE_BLE_DEVICE) IR.AddListener(IR.EVENT_OFFLINE, device, function() { IR.Log("Offline"); })
