Description
This function adds a new event that is triggered whenever the given item changes.
Signature
string nxa.AddItemEvent (string, bool, bool, bool, number, string)
Parameters
Name | Type | Mandatory/Optional | Description |
---|
ItemID | string | M |
itemID Server Item server item that triggers the event. |
OnReceived | bool | M |
similar OnReceive OnReceive parameter of the task definition |
(cf. Section 4.5.2),thisparameterindicatesthattheeventistriggered , this parameter indicates that the event is triggered if a read request is received on the given item. |
OnSend | bool | M |
similar OnSent OnSent parameter of the task definition |
(cf. Section 4.5.2),thisparameterindicatesthattheeventistriggered , this parameter indicates that the event is triggered if a new value is sent to the given item. |
OnSet | bool | M |
similar OnSet OnSet parameter of the task definition |
(cf. Section 4.5.2),thisparameterindicatesthattheeventistriggered , this parameter indicates that the event is triggered if a new value is set. |
Delay | number | M |
delay Delay in milliseconds. |
LUAScript | string | M | LUA script that is executed when the event is triggered. |
Return
...
Type | Description |
---|
string | TaskID that identifies the created task. |