annotate future.h @ 240:7fd5cb857d07

Add data pubblication through ZMQ socket
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Thu, 12 Feb 2015 19:46:54 +0100
parents ec81395bf08d
children 4db8746bd575
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
91
4102fe614df2 Fix timestamping. Cleanup data providers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 81
diff changeset
1 #ifndef __FUTURE_H__
4102fe614df2 Fix timestamping. Cleanup data providers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 81
diff changeset
2 #define __FUTURE_H__
4102fe614df2 Fix timestamping. Cleanup data providers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 81
diff changeset
3
240
7fd5cb857d07 Add data pubblication through ZMQ socket
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 239
diff changeset
4 #define strdup(s) StrDup(s)
7fd5cb857d07 Add data pubblication through ZMQ socket
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 239
diff changeset
5
239
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
6 /* required for time_t definition */
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
7 #include <time.h>
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
8
227
a2f99632a80c Implement N estimate tacking into account measured beatnote frequency
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 208
diff changeset
9 #define PTR_TO_INT(p) ((int) ((intptr_t)(p)))
a2f99632a80c Implement N estimate tacking into account measured beatnote frequency
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 208
diff changeset
10 #define INT_TO_PTR(u) ((void *) ((intptr_t)(u)))
a2f99632a80c Implement N estimate tacking into account measured beatnote frequency
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 208
diff changeset
11
16
9d57d1fcbcd5 Implementation of the C99 round() function
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
12 double round(double x);
81
be814b934eca Implement gettimeofday()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 16
diff changeset
13
239
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
14 /* struct timeval is defined in `WinSock2.h` but we cannot safely include
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
15 * this header because it includes `Windows.h` and CVI does not like to
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
16 * have that included after his includes. resort to this ugly hack to
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
17 * avoid to include windows headers and to avoid name clashes */
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
18 struct __timeval {
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
19 time_t tv_sec;
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
20 long tv_usec;
81
be814b934eca Implement gettimeofday()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 16
diff changeset
21 };
be814b934eca Implement gettimeofday()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 16
diff changeset
22
239
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
23 #define timeval __timeval
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
24
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
25 /* we never use struct timezone so leave it as on opaque struct */
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
26 struct timezone;
81
be814b934eca Implement gettimeofday()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 16
diff changeset
27
be814b934eca Implement gettimeofday()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 16
diff changeset
28 int gettimeofday(struct timeval *tp, struct timezone *tzp);
be814b934eca Implement gettimeofday()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 16
diff changeset
29
91
4102fe614df2 Fix timestamping. Cleanup data providers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 81
diff changeset
30 #endif