Mercurial > hg > fxanalyse
view fake-data-provider.c @ 90:c9aec93005a4
Cleanup log file data provider
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Fri, 22 Mar 2013 18:49:58 +0100 |
parents | 9b7588cd4013 |
children | 4102fe614df2 |
line wrap: on
line source
/* FXAnalise fake data provider */ #include <userint.h> #include <utility.h> /* data acquisition flag */ extern int acquiring; /* data queue */ extern CmtTSQHandle dataQueue; int CVICALLBACK FakeDataProvider (void *functionData) { int mainThreadId; double mark; double data[5] = {0.0, 10000.0, 2.0, 3.0, 4.0}; /* get main thread id to post messages to it */ mainThreadId = CmtGetMainThreadID(); while (acquiring) { mark = Timer(); /* update data */ GetCurrentDateTime(&data[0]); data[1] = data[1] + 0.1; /* push data into the data queue */ CmtWriteTSQData(dataQueue, data, 5, TSQ_INFINITE_TIMEOUT, 0); /* wait till next second */ SyncWait(mark, 1.00); } return 0; }