« Back to Product

Documentation

AC_AddLoggedValues

Require: IP-Symcon >= 5.1

 boolean AC_AddLoggedValues (int $InstanceID, int $VariableID, array $Datasets) 

Parameters

InstanceID

ID for the archive

VariableID

ID of the variable to which the datasets are to be added

Datasets

An array with datasets, where each set is an array with the following key => value pairs:

Parameters Type Description
TimeStamp Integer Time of the new data record as a Unix Timestamp
Value by variable The value of the new data record - the type of the value must match the type of the variable

Returns

If the command succeeds, it returns TRUE, otherwise FALSE.

Description

This function adds the data records Datasets to the logged raw data of the variable with the ID VariableID.

Warning

After this function, the aggregated data of the variable is invalid and must be re-aggregated.

Example

// Add three additional data records to an Integer variable
AC_AddLoggedValues(12345, 34567, [
  [
    'TimeStamp' => 1128255120,
    'Value' => 30
  ],
  [
    'TimeStamp' => 1128257851,
    'Value' => 50
  ],
  [
    'TimeStamp' => 1128278514,
    'Value' => 130
  ]
]);
Any questions?