GetDCIValuesEx
- GetDCIValuesEx(node, dciId, startTime, endTime, rawValues): Array
-
Get all values for period of DCI with given ID on given node, returning them as DataPoint objects containing both timestamp and value.
Table 1. Parameters node
Data collection target object instance
dciId
Integer
DCI ID
startTime
Integer
Start of the period (as UNIX timestamp)
endTime
Integer
End of the period (as UNIX timestamp). Optional, current time will be used if not specified
rawValues
Boolean
FALSE - return transformed values. TRUE - return raw values. Optional, FALSE by default
ReturnArray of DataPoint objects ordered from latest to earliest for given DCI, or NULL if DCI with given ID does not exist or has no collected values. Each DataPoint contains both the timestamp and the value. This function cannot be used for table DCIs.
// Get data points for the last hour
dataPoints = GetDCIValuesEx($node, FindDCIByName($node, "Status"), time() - 3600, time());
for (dp : dataPoints) {
println("Timestamp: " .. dp->timestamp .. ", Value: " .. dp->value);
}