Function GetBufferInfo

TMSi Data Acquisition SDK

 
TMS International BV

GetBufferInfo

BOOLEAN GetBufferInfo( 
IN HANDLE Handle,
OUT PULONG Overflow,
OUT PULONG PercentFull
);

Parameters

Handle
   
Handle of the library

Overflow
   This value will increment each time the input buffer overruns. This happens if the rate at which the driver fills the buffer exceeds the rate at which it is read by the application. If a buffer overflow occurs all data in that buffer is lost. This value is reset automatically at Start() and Stop().

PercentFull
    Can be anything between 0 and 100%. Used to indicate the amount of samples available to the application. If 100% is reached the Overflow will increment and the PercentFull parameter will be reset to 0. In that case one buffer of samples is lost. If this percentage increases during a measurement, the application cannot keep up with the data rate of the drivers. To prevent data loss the application can increase its thread priority, or use a larger buffer when calling GetSamples.

    

Return Value

If successful this function returns TRUE. If the function return FALSE, use GetErrorCode to get the error code.

Comments

This function only works after Start() is called and before Stop() is called.

 Also see

SetSignalBuffer, GetSamples