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 #define XSTR(s) STR(s)
23 #define TANGO_EXCEPTION_RE_THROW_(tango_ex, b) do{\
24 std::string location(__FILE__);\
25 location += " line : ";\
26 location += XSTR(__LINE__);\
27 ERROR_STREAM << (b) << tango_ex << location;\
28 Tango::Except::re_throw_exception(tango_ex,\
29 static_cast<const char*>(b),\
30 static_cast<const char*>(""),\
31 static_cast<const char*>(location.c_str()));\
34 #define TANGO_EXCEPTION_RE_THROW_WITHOUT_LOG_(tango_ex, b) do{\
35 std::string location(__FILE__);\
36 location += " line : ";\
37 location += XSTR(__LINE__);\
38 Tango::Except::re_throw_exception(tango_ex,\
39 static_cast<const char*>(b),\
40 static_cast<const char*>(""),\
41 static_cast<const char*>(location.c_str()));\
44 #define TANGO_EXCEPTION_THROW(a,b) do {\
45 std::string location(__FILE__);\
46 location += " line : ";\
47 location += XSTR(__LINE__);\
48 ERROR_STREAM << (a) << (b) << location;\
49 Tango::Except::throw_exception(static_cast<const char*>((a)),\
50 static_cast<const char *>((b)),\
51 static_cast<const char *>(location.c_str()));\
54 #define TANGO_EXCEPTION_THROW_WITHOUT_LOG(a,b) do {\
55 std::string location(__FILE__);\
56 location += " line : ";\
57 location += XSTR(__LINE__);\
58 Tango::Except::throw_exception(static_cast<const char*>((a)),\
59 static_cast<const char *>((b)),\
60 static_cast<const char *>(location.c_str()));\
63 #define TANGO_EXCEPTION_RE_THROW(tango_ex) do{\
64 TANGO_EXCEPTION_RE_THROW_(tango_ex, "TANGO_ERROR");\
67 inline void compose_state(Tango::DevState
& state
, Tango::DevState
const & axe_state
)
71 if (state
== Tango::MOVING
|| state
== Tango::STANDBY
)
75 if (state
== Tango::STANDBY
)
76 state
= Tango::MOVING
;