Mercurial > hg > fxanalyse
view data-provider.h @ 91:4102fe614df2
Fix timestamping. Cleanup data providers
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Fri, 22 Mar 2013 16:32:15 +0100 |
parents | |
children | 99cbe2b57530 |
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 */ static char message[1024]; #define SendMessage(threadId, ...) \ do { \ snprintf(message, sizeof(message) - 1, ##__VA_ARGS__); \ PostDeferredCallToThread(MessageCB, message, threadId); \ } while (0) #endif