7 # define strtok_r strtok_s
8 # define snprintf _snprintf
9 # define strcasecmp _stricmp
12 #define AXIS_ATTRIBUTE_POSITION_NAME "position"
13 #define AXIS_COMMAND_STOP_NAME "Stop"
15 #define MAX_LENGTH_COMPUTED_ANGLES 1000
17 // Comment the next line to forbide the proxy write part
18 //#define WRITE_TO_PROXY_ALLOWED
20 // version of the save/load format method
21 #define FORMAT_VERSION 1
23 #define AVAILABLE_DIFFRACTOMETER_TYPE "2CV, E4CV, K4CV, E6C, K6C, ZAXIS"
25 #define XSTR(s) STR(s)
28 #define TANGO_EXCEPTION_RE_THROW_(tango_ex, b) do{\
29 std::string location(__FILE__);\
30 location += " line : ";\
31 location += XSTR(__LINE__);\
32 ERROR_STREAM << (b) << tango_ex << location;\
33 Tango::Except::re_throw_exception(tango_ex,\
34 static_cast<const char*>(b),\
35 static_cast<const char*>(""),\
36 static_cast<const char*>(location.c_str()));\
39 #define TANGO_EXCEPTION_RE_THROW_WITHOUT_LOG_(tango_ex, b) do{\
40 std::string location(__FILE__);\
41 location += " line : ";\
42 location += XSTR(__LINE__);\
43 Tango::Except::re_throw_exception(tango_ex,\
44 static_cast<const char*>(b),\
45 static_cast<const char*>(""),\
46 static_cast<const char*>(location.c_str()));\
49 #define TANGO_EXCEPTION_THROW(a,b) do {\
50 std::string location(__FILE__);\
51 location += " line : ";\
52 location += XSTR(__LINE__);\
53 ERROR_STREAM << (a) << (b) << location;\
54 Tango::Except::throw_exception(static_cast<const char*>((a)),\
55 static_cast<const char *>((b)),\
56 static_cast<const char *>(location.c_str()));\
59 #define TANGO_EXCEPTION_THROW_WITHOUT_LOG(a,b) do {\
60 std::string location(__FILE__);\
61 location += " line : ";\
62 location += XSTR(__LINE__);\
63 Tango::Except::throw_exception(static_cast<const char*>((a)),\
64 static_cast<const char *>((b)),\
65 static_cast<const char *>(location.c_str()));\
68 #define TANGO_EXCEPTION_RE_THROW(tango_ex) do{\
69 TANGO_EXCEPTION_RE_THROW_(tango_ex, "TANGO_ERROR");\
72 inline void compose_state(Tango::DevState
& state
, Tango::DevState
const & axe_state
)
76 if (state
== Tango::MOVING
|| state
== Tango::STANDBY
)
80 if (state
== Tango::STANDBY
)
81 state
= Tango::MOVING
;