Documentation
AC_SetCompaction
Require: IP-Symcon >= 6.3
boolean AC_SetCompaction (int $InstanceID, int $VariableID, int $MonthOffset, int $CompactionType)
Parameters
InstanceID | ID for the archive |
||||||||||||||||||||
VariableID | ID of the variable for which the compaction is to be set |
||||||||||||||||||||
MonthOffset | The number of months after which the compaction is applied; 0 = After the current month is ended, -1 = Compact values directly |
||||||||||||||||||||
CompactionType |
|
Returns
True if successful, otherwise False
Description
This function updates the compaction entry of the variable with the ID VariableID and the month offset MonthOffset and sets it to the compaction type CompactionType. Other compaction entries with different month offsets remain unaffected.
Afterwards a reaggregation of the variable is necessary.
Example
// Set the direct compaction of the variable "TestVariable" to 1 (One value per 5 minutes)
AC_SetCompaction(39147 /*[Archive]*/, 53716 /*[TestVariable]*/, -1, 1);