CALCONDEMANDSTAT action


Function
Recalculation (calculation) of the values of:
  • statistical historical value
  • calculated historical value
statistical historical value or a calculated historical value - the parameter Compute on demand must be checked in its configuration.
Declaration
 CALCONDEMANDSTAT archIdent, timeFromIdent_TmA, timeToIdent_TmA, bCalcDepend[, statusIdent_Int] 

Parameters
archIdent in Reference to one value of historical value, column or row of structured historical value (see Note).
timeFromItemIdent_TmA in Identifier of AbsTime type - interval beginning.
timeToItemIdent_TmA in Identifier of AbsTime type - interval end.
bCalcDepend in Identifier of Bool type - recalculation of dependent OnDemand archives.
statusIdent_Int out Calculation (action) success.

Description

The action sends requests to the process D2000 Archiv to recalculate the statistical values of:

  1. one historical value (archIdent) - the value of the parameter bCalcDepend = @FALSE. The process Archiv will calculate only defined historical value (archIdent),
  2. one historical value (archIdent) and all the historical values depending on it (in dependence on a value of the parameter bCalcDepend) - the value of the parameter bCalcDepend = @TRUE. The process D2000 Archiv will calculate the given object (archIdent) and all archive objects that directly or indirectly depend on given archive object.

All the calculations are being executed for the time interval given by the parameters timeFromIdent_TmA and timeToIdent_TmA.

If the optional parameter statusIdent_Int is entered, the action will be terminated after terminating all required calculations on the process Archiv.

The parameter statusIdent_Int can get one of the following values:

  • _ERR_TRANS_ABORT
  • _ERR_TRANS_ERROR
  • _ERR_TRANS_IGNORED
  • _ERR_NO_ERROR

Note
The parameter archIdent can also contain the reference to a part (row or column) or entire structured historical value.
Example:
  • H.ColArchiv - reference to entire structured historical value
  • H.ColArchiv[2] - reference to all values of structured historical value within the row of 2
  • H.ColArchiv^ColName - reference to all values of structured historical value within the ColName column

Example
 TIME _bt 
 TIME _et 
 INT  _retCode 
 
 _bt := %StrToTime("00:00:00 16-10-2003")
 _et := %StrToTime("00:00:00 17-10-2003")
 
 CALCONDEMANDSTAT H.Primary, _bt, _et, @FALSE, _retCode
 
IF _retCode = _ERR_NO_ERROR THEN
   ; calculation executed
 ELSE
   ; an error occurred
 ENDIF


Related pages:

Napíšte komentár