Skip to content

Latest commit

 

History

History
27 lines (26 loc) · 872 Bytes

File metadata and controls

27 lines (26 loc) · 872 Bytes

PushDCIData

PushDCIData(node, dciId, value, timestamp) ⇒ int

Push new DCI value from script.

Changed in version 6.0: added optional timestamp parameter; return type changed from void to int.

Table 1. Parameters

node

[class-node]

Node object instance.

dciId

Integer

DCI id for which new value will be pushed (DCI source must be set to "Push").

value

Integer or String

New value for DCI.

timestamp

Integer

Timestamp in milliseconds since epoch (1 Jan 1970 00:00:00 UTC). Optional, current time is used if not specified.

Return

1 on success, 0 on failure.

PushDCIData($node, 46, 13); // Push value "13" to DCI with id 46 using current time
PushDCIData($node, 46, 13, time() * 1000); // Push with explicit timestamp in milliseconds