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

NameTypeMandatory/OptionalDescription
ItemIDstringMItemID of the source server item that triggers the event.
OnReceivedboolMSimilar 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.
OnSendboolMSimilar 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.
OnSetboolMSimilar to the OnSet parameter of the task definition, this parameter indicates that the event is triggered if a new value is set.
DelaynumberMDelay in milliseconds.
LUAScriptstringMLUA script that is executed when the event is triggered.

Return

TypeDescription
stringTaskID that identifies the created task.

Related pages