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 XSTR(s) STR(s)
26 #define TANGO_EXCEPTION_RE_THROW_(tango_ex, b) do{\
27 std::string location(__FILE__);\
28 location += " line : ";\
29 location += XSTR(__LINE__);\
30 ERROR_STREAM << (b) << tango_ex << location;\
31 Tango::Except::re_throw_exception(tango_ex,\
32 static_cast<const char*>(b),\
33 static_cast<const char*>(""),\
34 static_cast<const char*>(location.c_str()));\
37 #define TANGO_EXCEPTION_RE_THROW_WITHOUT_LOG_(tango_ex, b) do{\
38 std::string location(__FILE__);\
39 location += " line : ";\
40 location += XSTR(__LINE__);\
41 Tango::Except::re_throw_exception(tango_ex,\
42 static_cast<const char*>(b),\
43 static_cast<const char*>(""),\
44 static_cast<const char*>(location.c_str()));\
47 #define TANGO_EXCEPTION_THROW(a,b) do {\
48 std::string location(__FILE__);\
49 location += " line : ";\
50 location += XSTR(__LINE__);\
51 ERROR_STREAM << (a) << (b) << location;\
52 Tango::Except::throw_exception(static_cast<const char*>((a)),\
53 static_cast<const char *>((b)),\
54 static_cast<const char *>(location.c_str()));\
57 #define TANGO_EXCEPTION_THROW_WITHOUT_LOG(a,b) do {\
58 std::string location(__FILE__);\
59 location += " line : ";\
60 location += XSTR(__LINE__);\
61 Tango::Except::throw_exception(static_cast<const char*>((a)),\
62 static_cast<const char *>((b)),\
63 static_cast<const char *>(location.c_str()));\
66 #define TANGO_EXCEPTION_RE_THROW(tango_ex) do{\
67 TANGO_EXCEPTION_RE_THROW_(tango_ex, "TANGO_ERROR");\
70 inline void compose_state(Tango::DevState
& state
, Tango::DevState
const & axe_state
)
74 if (state
== Tango::MOVING
|| state
== Tango::STANDBY
)
78 if (state
== Tango::STANDBY
)
79 state
= Tango::MOVING
;