Mercurial > hg > fxanalyse
view data-provider.h @ 99:dad4414051c4
Add 'KK_FX80E.dll' to the distributed files
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Tue, 26 Mar 2013 18:23:29 +0100 |
parents | 99cbe2b57530 |
children | 8b90fbba59ef |
line wrap: on
line source
#ifndef __DATA_PROVIDER_H__ #define __DATA_PROVIDER_H__ #include <future.h> /* data acquisition flag */ extern int acquiring; /* data queue */ extern CmtTSQHandle dataQueue; /* callback receiving messages in the main thread */ void CVICALLBACK MessageCB (void *callbackData); /* data acquisition event */ struct event { struct timeval time; double data[4]; }; /* message buffer */ static char messages[256][16]; static unsigned int messageid = 0; #define SendMessage(threadId, ...) \ do { \ char *message = messages[messageid++ % 16]; \ snprintf(message, sizeof(message), ##__VA_ARGS__); \ PostDeferredCallToThread(MessageCB, message, threadId); \ } while (0) #endif