HI_ExchangeBuffer

Cogent API and Utilities: Version 4.1
Prev |  | Next

# `HI_ExchangeBuffer`

`HI_ExchangeBuffer` -- swaps `X` and `Y` values.

## Syntax

    #include <cogent/cogent.h>

``ST_STATUS HI_ExchangeBuffer`(int nvalues, HI_stVALUE* values);`

## Parameters

`nvalues`

  The number of values in the `values` array.

`values`

  An array of `HI_stVALUE` structures.

## Returns

`t` (true) if the transformation was performed with no errors, otherwise `nil`.

## Description

This function swaps the `X` and `Y` values for each data pair in the buffer. The buffer is modified in place (i.e., a new buffer is not created, and the old values cannot be recovered).

This function is used to obtain certain data queries that are not directly supported by the Cascade Historian's interpolation services. For example, if we want to interpolate `x` (typically time or position) at all actual (non-interpolated) values of `y`, the Cascade Historian does not directly support this, since the interpolator services only interpolate the `Y` value. The desired result can be obtained by making the inverse query and exchanging the buffer results.

This function corresponds to the Cascade Historian `hist_exchange_buffer` dynamic libary function.

Prev | Home | Next
`HI_Enable` | Up | `HI_FileBase`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.