(interpolate history function [start [duration [arg...]]])
A query ID number (queries are numbered sequentially, starting with 0) for the interpolation if successful, otherwise
(error "Interpolation failed: Invalid arguments") (error "Interpolation failed: No data") (error "History history does not exist") (error "Undefined interpolation function: function")
This command performs a query on history data, placing the result in a buffer for subsequent transfer. It generates a unique, sequentially numbered ID 'handle' for each query that is made, so clients can access the resulting buffer. The IDs have no meaning outside the Cascade Historian, and are only valid after a query and until the buffer is freed with the bufferIdDestroy command, the HIBufferIDDestroy Cogent C API function, or the hist_buffer_id_destroy dynamic library function, as appropriate.
This is the first of four steps (which can be done as commands, dynamic libary functions, or API functions) required to make an interpolation:
This task has been divided into four steps for convenience and performance. A buffer, once created, remains available to be read as required, potentially by multiple users, until it is no longer needed and can be destroyed. The buffers can also be very large, exceeding typical IPC message sizes, and requiring a relatively long time to transfer. That problem can be addressed by transferring the data in predictably-sized portions, allowing other processing to be done in between. The multi-step process defined above provides the flexibility needed for just such tailoring to the user's requirements. To run all four steps with one function call, see HI_InterpolateData in the Cogent C API manual or the hist_interpolate_data dynamic library function.
The following choices are available for the function argument:
![]() | The NoInterpolator function is currently the only one that requires no additional parameters, making it possible to not supply start or duration. For the other interpolator functions, setting start or duration to 0 forces the default values. |
This command corresponds to the Cogent C API function HI_Interpolate and the hist_interpolate dynamic library function.
[sh]$ lsend Hist Hist> (interpolate p6 NoInterpolator) (interpolate 2) Hist> (bufferIdLength 2) (bufferIdLength 2 135) Hist> (bufferIdDataAscii 2 131 3) (bufferIdDataAscii 2 131 (996592363.010848 10010.000000) (996592363.016539 1000.000000) (996842447.310491 11.000000)) Hist> (bufferIdDestroy 2) t Hist> (bufferIdLength 2) (error "Invalid buffer id 2") Hist>
Copyright © 1995-2012 by Cogent Real-Time Systems, Inc. All rights reserved.