Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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
ItemIDstringM
itemID
ItemID of the source
Server Item
server item that triggers the event.
OnReceivedboolM
similar
Similar to the
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.
OnSendboolM
similar
Similar to the
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.
OnSetboolM
similar
Similar to the
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.
DelaynumberM
delay
Delay in milliseconds.
LUAScriptstringMLUA script that is executed when the event is triggered.

Return

...

TypeDescription
stringTaskID that identifies the created task.