Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/pt/ptmtrendchangedata.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/pt/ptmtrendchangedata.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/pt/ptmtrendchangedata.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/pt/ptmtrendchangedata.html on line 8
Add or change data for a PtMTrend widget
void PtMTrendAddData( PtWidget_t *widget,
unsigned graph_no,
const int *newdata,
unsigned nsamples );
void PtMTrendChangeData( PtWidget_t *widget,
unsigned graph_no,
int const *newdata,
unsigned last_sample,
unsigned nsamples );
- widget
- A pointer to a widget of type PtMTrend.
- graph_no
- The number of the graph to be added to or changed, in the range 0 to trend count - 1, inclusive.
- newdata
- A pointer to an array of the new data (see below).
- nsamples
- The number of samples in the array.
- last_sample (PtMTrendChangeData() only)
- The index of the newest sample to replace, where 0 is considered to be the index of the most recently added sample.
PtMTrendAddData() lets you add data for a PtMtrend, while PtMTrendChangeData() lets you change existing data.
The newdata array is ordered with the oldest sample at
newdata[0], and the newest at
newdata[nsamples - 1]. The oldest sample to be
replaced has an index of last_sample +
nsamples - 1;
The samples in the trend are replaced as follows:
- trend sample[last_sample] =
newdata[nsamples - 1].
- trend sample[last_sample + 1] =
newdata[nsamples - 2].
- ...
- trend sample[last_sample + nsamples - 1] =
newdata[0].
If last_sample + nsamples - 1 is outside the
range of samples for the widget, some initial portion of
the new data is discarded.
Photon
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/pt/ptmtrendchangedata.html on line 143
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/pt/ptmtrendchangedata.html on line 143