"curveValuesX"

Sets or queries the x values and statuses at certain times.

Synopsis

setValue(string shape, "curveValuesX", string curve, dyn_float Xvalue, dyn_time times, dyn_bit64 status);

getValue(string shape, "curveValuesX", string curve, dyn_float Xvalue, dyn_time times, dyn_bit64 status);

shape.curveValuesX(string curve, dyn_float Xvalue, dyn_time times, dyn_bit64 status);

Parameters

Parameter Description
shape Name of the object
curve Name of curve
Xvalue Values of the curve. Note that when you query values, the function only returns the values of the specified curve. The function does not return all values of a trend.
times Times
status The 64 bit status from the database (corresponds to _offline.._status)

Description

Sets the X values and statuses for a curve for the trend type value over value at certain times. The function also returns the values and statuses of a curve. You can use the function for both setting and querying values and statuses.

Example

The following example sets several values and statuses at different times.

main()
{
  dyn_float valX, valY;
  dyn_time timeX, timeY;
  dyn_bit64 status = makeDynBit64(0,0xFFFFFFFFFFFFFFFFul,0xF0F0F0F0F0F0F0F0ul, 0,0xF0F0F0F0F0F0F0F0ul,0xF0F0F0F0F0F0F0F0ul);
  valY = makeDynFloat(10, 90, 10, 60, 60, 5);
  valX = makeDynFloat(10, 50, 90, 10, 90, 5);
  time now = getCurrentTime();
  timeX = timeY = makeDynTime(now, now+1, now+2, now+3, now+4, now+5);
  this.curveValues("curve1", valY, timeY, status);
  this.curveValuesX("curve1", valX, timeX, status);
}

In the following example the function returns the values of the trend curve "curve1".

main()
{
  dyn_float value, value2;
  dyn_time ti, ti2;
  dyn_bit64 status, status2;
  getValue("TREND1", "curveValues", "curve1", value, ti, status);
  getValue("TREND1", "curveValuesX", "curve1", value2, ti2, status2);
  DebugN("YValue", value);
  DebugN("Time",ti);
  DebugN("State",status);
  DebugN("XValue", value2);
  DebugN("Time",ti2);
  DebugN("State",status2);
}

Assignment

Trend