/
nxa.AddItemEvent
nxa.AddItemEvent
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 of the source server item that triggers the event. |
OnReceived | bool | M | Similar to the OnReceive parameter of the task definition, this parameter indicates that the event is triggered if a read request is received on the given item. |
OnSend | bool | M | Similar to the OnSent parameter of the task definition, this parameter indicates that the event is triggered if a new value is sent to the given item. |
OnSet | bool | M | Similar to the OnSet parameter of the task definition, this parameter indicates that the event is triggered if a new value is set. |
Delay | number | M | 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. |
, multiple selections available,
Related content
Task definitions
Task definitions
More like this
nxa.GetItemIds2
nxa.GetItemIds2
Read with this
nxa.AddSetTask
nxa.AddSetTask
More like this
nxa.GetValue, nxa.Value
nxa.GetValue, nxa.Value
Read with this
nxa.AddReadTask
nxa.AddReadTask
More like this
nxa.AddWriteTask
nxa.AddWriteTask
More like this