DLLDataCollectionGetStatus
函数 DLLDataCollectionGetStatus 查询当前数据采集的状态。(返回已采集样本数、写指针位置、采集状态和连续/有限模式标志。)
C/C++
ErrorCode DLLDataCollectionGetStatus(INT_PTR hClientHandle, unsigned int* pointsToCollect, unsigned int* writeIndex, int* state, unsigned short* capturedSamples, int* continuous);
C#
Controller.DataCollection 门面为本版本内部 API;请使用本 C API 或 Digital Scope 应用。
参数
hClientHandle (INT_PTR)
客户端会话句柄,由 DLLSysConnect 获取。
pointsToCollect (unsigned int*)
输出。接收配置的总采样点数(即 DLLDataCollectionConfigure 时指定的 pointsToCollect)。
writeIndex (unsigned int*)
输出。接收采集缓冲区当前写指针位置(已采集的样本数)。
state (int*)
输出。接收采集状态值(0=空闲,1=运行,2=已停止等,具体定义参见固件文档)。
capturedSamples (unsigned short*)
输出。接收实际已采集的样本点总数(如果采集已完成或被停止,该值可能小于 pointsToCollect)。
continuous (int*)
输出。接收连续采集标志:非零表示连续模式,零表示有限点采集模式。
返回值
返回 ErrorCode;NoError (0) 表示成功,正值为错误码,详见 SDK 发布头 ErrorCode.h。
示例
unsigned int points = 0, writeIndex = 0;
int state = 0, continuous = 0;
unsigned short captured = 0;
DLLDataCollectionGetStatus(handle, &points, &writeIndex, &state, &captured, &continuous);