LG_Tolerance

LG_Tolerance — sets the maximum gap between timestamps of any two points.

Syntax

#include <cogent.h>
ST_STATUS LG_Tolerance(IP_Task*  myself,
 IP_Task*  textlog,
 char*  retbuf,
 int  buflen,
 long  seconds,
 long  nanoseconds);

Arguments

myself

A pointer to this task's IP_Task structure normallly generated by a call to IP_NserveInit.

textlog

A pointer to the Cascade TextLogger's IP_Task structure, normally generated by a call to IP_TaskFindName.

retbuf

A pointer to a character buffer to hold the return from the call.

buflen

The length of retbuf, in bytes.

seconds

The number of seconds in the collection tolerance.

nanoseconds

The number of nanoseconds in the collection tolerance.

Returns

ST_OK on success. Otherwise ST_ERROR, and the retbuf will contain a more detailed error message (see tolerance in the Cascade TextLogger documentation). If the return value is ST_OK, the retbuf may not contain useful information.

Description

This function sets timestamp tolerance. The tolerance is the maximum gap between the timestamps of any two points on a line. Whenever a point is to be logged, the Cascade TextLogger checks the current log line in the buffer. If the timestamp gap between this point and any other point in the buffer has exceeded the tolerance, the existing line in the buffer is written first, and then this point is logged on a new line in the buffer.

The tolerance is globally applied to all logs all the time. There is no way to prevent it from being applied, but you can effectively ignore it by setting it to a very high number. The default tolerance is one millisecond.

This function corresponds to the Cascade TextLogger tolerance command. Please refer to that document for an example.