annotate future.h @ 265:da38cbbc7ec8

Add DDS clients test code To verify the portabiolity of the clients code and to make testing easier the test code is independent of the CVI environment and runtime.
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Sun, 21 Jun 2015 14:44:33 +0200
parents 4db8746bd575
children
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
244
4db8746bd575 Add NaN and isnan() compatibility macros to future.h
Daniele Nicolodi <daniele@grinta.net>
parents: 240
diff changeset
6 #define NaN NotANumber()
4db8746bd575 Add NaN and isnan() compatibility macros to future.h
Daniele Nicolodi <daniele@grinta.net>
parents: 240
diff changeset
7 #define isnan(v) IsNotANumber(v)
4db8746bd575 Add NaN and isnan() compatibility macros to future.h
Daniele Nicolodi <daniele@grinta.net>
parents: 240
diff changeset
8
239
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
9 /* 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
10 #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
11
227
a2f99632a80c Implement N estimate tacking into account measured beatnote frequency
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 208
diff changeset
12 #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
13 #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
14
16
9d57d1fcbcd5 Implementation of the C99 round() function
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
diff changeset
15 double round(double x);
81
be814b934eca Implement gettimeofday()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 16
diff changeset
16
239
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
17 /* 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
18 * 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
19 * 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
20 * 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
21 struct __timeval {
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
22 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
23 long tv_usec;
81
be814b934eca Implement gettimeofday()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 16
diff changeset
24 };
be814b934eca Implement gettimeofday()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 16
diff changeset
25
239
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
26 #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
27
ec81395bf08d Solve name collisions and other problems caused by including Windows headers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 227
diff changeset
28 /* 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
29 struct timezone;
81
be814b934eca Implement gettimeofday()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 16
diff changeset
30
be814b934eca Implement gettimeofday()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 16
diff changeset
31 int gettimeofday(struct timeval *tp, struct timezone *tzp);
be814b934eca Implement gettimeofday()
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 16
diff changeset
32
91
4102fe614df2 Fix timestamping. Cleanup data providers
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents: 81
diff changeset
33 #endif