- Vytvoril D2000 Dev Team na okt 13, 2017
GETARCHCOL action
GETARCHCOL archIdent, locRecDstIdent, timeFromIdent_TmA, timeToIdent_TmA, stepIdent_Int, maxValsIdent_Int, statusIdent_Int [,archivInstance_Int] [TIMEBYROW | TIMEBYCOL]
archIdent | in |
Reference to item
of:
or reference to one-column historical value. |
locRecDstIdent | out | Local structured variable for read result. |
timeFromIdent_TmA | in | Identifier of Absolute time type - interval beginning. |
timeToIdent_TmA | in | Identifier of Absolute time type - interval end. |
stepIdent_Int | in | Identifier of Int type - time step for archive values oversampling. |
maxValsIdent_Int | in |
Maximum number of values. If given interval contains more data, the action will trim off the data and return ERR_MORE_DATA warning in the parameter statusIdent_Int. |
statusIdent_Int | out | Read success. |
TIMEBYROW | Places result values by time into rows. | |
TIMEBYCOL | Places result values by time into columns. | |
archivInstance_Int | in | Optional identifier of Int type - identification of archive instance. If the parameter is not defined, the value 0 will replace it. |
The parameter archIdent can be defined by one of the following ways:
- Column of local variable of „typed
ALIAS“ type
Example:
ALIAS (structure definition) _lAT
SET _lAT AS SV.Struct
GETARCHCOL _lAT[0]^Item1 , ...
Individual read requests are ALWAYS addressed to items in given column of the structure SV.Struct (even if the column contains items of Object type).
- Column of object of Structured variable type
Example:
GETARCHCOL SV.Struct[0]^Item2 , ...
Request addressing is the same as described in the article 1.
- Column of local variable of Record
type
Example:
RECORD (structure definition) _lRec
REDIM _lRec[3]
SET _lRec[1]^Item2 AS Sec
SET _lRec[2]^Item2 AS SysTime
SET _lRec[3]^Item2 AS M.MeranyBod
.....
GETARCHCOL _lRec[0]^Item2, ...
The column must be of Object type. Individual read requests are to be addressed to the objects the column items refer to.
If any item doesn't refer to object, the action is to be terminated and returns the ERR_NO_ASSIGNED_ALIAS error.
- Column of structured historical value
Example:
GETARCHCOL H.Struct[0]^Item2, ...
Individual read requests are gradually addressed to all items in given column. The object H.Struct cannot be a one-column historical value.
- One-column historical value
Example:
GETARCHCOL H.Struct, ...
Individual read requests are to be gradually addressed to all items.
Read result is stored in the local structured variable defined by the parameter _locRecDstIdent. Result of every request is either one value or a sequence of values. Every sequence of values is stored in the local variable _locRecDstIdent:
- in rows (analogous to the action
GETARCHROW) - the first column
contains the values obtained by the read request of first row
(respective column), the second column contains the values obtained
by the read request of first row, .... Structured variable
_locRecDstIdent must be of correct size. If not, the action
automatically resizes it to required size,
- in columns - every sequence of values is written into one row of the local variable _locRecDstIdent. If some of the sequences contains more values than the number of columns, the variable statusIdent_Int gets the value of _ERR_MORE_DATA, but the values that could be written will be inserted into the local variable _locRecDstIdent.
Value of parameter archivInstance_Int defines
the instance of archive which executes the request. If the parameter is not
defined (or the value is 0), the active instance of archive will execute the
request.
The variable statusIdent_Int indicates the success of reading the
action. If this variable acquires the value _ERR_NO_DATA(22), it means that
all archives, which were used when reading, do not contain any data. If at
least one of the archives contains data, the action returns _ERR_NO_ERR(0).
Related pages:
0 komentárov