From OpenSCADAWiki
Jump to: navigation, search
Requesting the values of the value archive
Very generic request of values of the value archives.
REQ: <get path="/Archive/va_{ARCH}/%2fserv%2fval" tm="{time}" tm_grnd="{tmGrnd}" arch="{archiver}" local="{localReq}" per="{period}" mode="{mode}" round_perc="{rndPerc}" real_prec="{realPrec}" />
  • ARCH — identifier of the value archive;
  • time — time of the last requesting value in microseconds and the seconds part as the UNIX time stamp from 01.01.1970; for zero value there used the system current time;
  • tmGrnd — time of the first requesting value in microseconds and the seconds part as the UNIX time stamp from 01.01.1970; for zero value there performed only current value request;
  • archiver — whole identifier of the value archiver or empty for the priority request at the selection priority and from the best to the worst;
  • localReq — sign [0|1] of the local requesting without requesting the redundant station for the missing data;
  • period — period in which the values request, in microseconds; there used the maximum period from the archive period;
  • mode — mode of the archive values representing, see to the enumeration ServReqDtMode of the #TVArchive object;
  • DMSimple(0) — simple record, one item per line; in the case of the string archive type the values are encoded to exclude the newlines characters;
34.5678
23.6543
65.8754
34.6523
  • DMPack(1) — packed record, one adjacent equal (rounded) value per line; before each value there is indicated its position number separated by the space from the value;
0 34.5678
1 23.6543
4 65.8754
6 34.6523
  • DMBin(2) — array of unpacked binary values, encoded by Base64; cannot to be used for string archives.
  • rndPerc — percent of the real values rounding, that is meant as equal ones;
  • realPrec — precision of the real values at conversion in string, 15 by default.
RESP: <get path="/Archive/va_{ARCH}/%2fserv%2fval" tm="{time}" tm_grnd="{tmGrnd}" arch="{archiver}" local="{localReq}" per="{period}" mode="{mode}" round_perc="{rndPerc}" real_prec="{realPrec}" rez="0" vtp="{valType}">{values}</get>
  • archiver — is set to the selected archiver at empty here in the request;
  • time — is set to the requested value real time at the single value requesting or to time of the last-end value at the value block;
  • tmGrnd — is set to the first-ground value of the value block;
  • period — is set to the real data period in the value block;
  • valType — is set to the data type in the value block;
  • values — one value for the single value requesting or the value block formatted corresponding to the "mode".
<get arch="FSArch.1s" mode="1" path="/Archive/va_F3_var/%2fserv%2fval" per="10000000" real_prec="7" rez="0" round_perc="0.1"
     tm="1674581630000000" tm_grnd="1674581500000000" user="roman" vtp="4">
0 &lt;EVAL&gt;
7 45.23046
11 45.16198
13 45.08281
</get>