HI_Flush

HI_Flush — writes buffered data to disk.

Syntax

#include <cogent.h>
ST_STATUS HI_Flush(IP_hTASK  historian,
 char*  retbuf,
 int  buflen,
 char*  histpattern);

Arguments

historian

The task pointer to the Cascade Historian program.

retbuf

An optional buffer containing an error message.

buflen

The length in bytes of retbuf. If retbuf is non-NULL, this must be a valid non-zero length. If retbuf is NULL, this parameter is ignored.

histpattern

A globbing pattern specifying a group of histories.

Returns

ST_OK on success. Otherwise ST_ERROR, and the retbuf will contain a NULL-terminated character string with an error message. If the return value is ST_OK, the retbuf may not contain useful information.

Description

This function removes the data for the specified history or histories from the buffer and writes them to the associated files. If NULL or * are passed for histpattern, all buffers are flushed to file.

This function corresponds to the Cascade Historian flush command and the hist_flush dynamic library function.